Question: question from chapter 3 or 4 Second Edition Computability, Complexity, and Languages Fundamentals of Theoretical Computer Science by Martin D. Davis, Ron Sigal, and Elaine
question from chapter 3 or 4 Second Edition Computability, Complexity, and Languages Fundamentals of Theoretical Computer Science by Martin D. Davis, Ron Sigal, and Elaine J. Weyuker
Take an 8 digits as a number x. Find program P such that #(P) = x.
let the eight digit numbers be 07011991



A Universal Program Coding Programs by Numbers We are going to associate with each program P of the language F a number, which we write #(go), in such a way that the program can be retrieved from its number. To begin with we arrange the variables in order follows: Y X, Z, X, Z, X3 Z Next we do the same for the labels: A, B1 C, D, E, B2 C2 D2 E2 A. We write #(V), #(L) for the position of a given variable or label in the appropriate ordering. Thus #(X2) 4, #(Z1) (Z) 3, #(E) 5, (B) Now let I be an instruction (labeled or unlabeled) of the language Then we write #(I) Ka, b, c where then a #(L) 1. if I is unlabeled, then a 0, if I is labeled L 2. if the variable V is mentioned in 1, then c 3#(V)- 1; 65 A Universal Program Coding Programs by Numbers We are going to associate with each program P of the language F a number, which we write #(go), in such a way that the program can be retrieved from its number. To begin with we arrange the variables in order follows: Y X, Z, X, Z, X3 Z Next we do the same for the labels: A, B1 C, D, E, B2 C2 D2 E2 A. We write #(V), #(L) for the position of a given variable or label in the appropriate ordering. Thus #(X2) 4, #(Z1) (Z) 3, #(E) 5, (B) Now let I be an instruction (labeled or unlabeled) of the language Then we write #(I) Ka, b, c where then a #(L) 1. if I is unlabeled, then a 0, if I is labeled L 2. if the variable V is mentioned in 1, then c 3#(V)- 1; 65
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
