vii problem index
play

VII. Problem Index Yuxi Fu BASICS, Shanghai Jiao Tong University - PowerPoint PPT Presentation

VII. Problem Index Yuxi Fu BASICS, Shanghai Jiao Tong University Motivation By Church-Turing Thesis one may study computability theory using any of the computation models. It is much more instructive however to carry out the study in a model


  1. VII. Problem Index Yuxi Fu BASICS, Shanghai Jiao Tong University

  2. Motivation By Church-Turing Thesis one may study computability theory using any of the computation models. It is much more instructive however to carry out the study in a model independent manner. The first step is to assign index to computable function. Computability Theory, by Y. Fu VII. Problem Index 1 / 44

  3. Agenda We shall study three fundamental theorems about indexing. Computability Theory, by Y. Fu VII. Problem Index 2 / 44

  4. Synopsis 1. G¨ odel Index 2. S-m-n Theorem 3. Enumeration Theorem 4. Recursion Theorem Computability Theory, by Y. Fu VII. Problem Index 3 / 44

  5. 1. G¨ odel Index Computability Theory, by Y. Fu VII. Problem Index 4 / 44

  6. Basic Idea We see a number as an index for a problem/function if it is the G¨ odel number of a programme that solves/calculates the problem/function. Computability Theory, by Y. Fu VII. Problem Index 5 / 44

  7. Definition Suppose a ∈ ω and n ≥ 1. φ ( n ) = the n ary function computed by P a a f ( n ) = P n , W ( n ) the domain of φ ( n ) = = { ( x 1 , . . . , x n ) | P a ( x 1 , . . . , x n ) ↓} , a a E ( n ) the range of φ ( n ) = a . a The super script ( n ) is omitted when n = 1. Computability Theory, by Y. Fu VII. Problem Index 6 / 44

  8. Example Let a = 4127. Then P 4127 = S (2); T (2 , 1). If the program is seen to calculate a unary function, then φ 4127 ( x ) = 1 , = W 4127 ω, E 4127 = { 1 } . If the program is seen to calculate an n -ary function, then φ ( n ) 4127 ( x 1 , . . . , x n ) = x 2 + 1 , W n ω n , = 4127 E n ω + . = 4127 Computability Theory, by Y. Fu VII. Problem Index 7 / 44

  9. G¨ odel Index for Computable Function Suppose f is an n -ary computable function. A number a is an index for f if f = φ ( n ) a . Computability Theory, by Y. Fu VII. Problem Index 8 / 44

  10. Padding Lemma Padding Lemma . Every computable function has infinite indices. Moreover for each x we can effectively find an infinite recursive set A x of indices for φ x . Proof. Systematically add useless instructions to P x . Computability Theory, by Y. Fu VII. Problem Index 9 / 44

  11. Computable Functions are Enumerable We may list for example all the elements of C as φ 0 , φ 1 , φ 2 , . . . . Computability Theory, by Y. Fu VII. Problem Index 10 / 44

  12. Diagonal Method Fact . There is a total unary function that is not computable. Proof. Suppose φ 0 , φ 1 , φ 2 , . . . is an enumeration of C . Define � φ n ( n ) + 1 , if φ n ( n ) is defined , f ( n ) = 0 , if φ n ( n ) is undefined . By Church-Turing Thesis the function f ( n ) is not computable. Computability Theory, by Y. Fu VII. Problem Index 11 / 44

  13. 2. S-m-n Theorem Computability Theory, by Y. Fu VII. Problem Index 12 / 44

  14. How do different indexing systems relate? Computability Theory, by Y. Fu VII. Problem Index 13 / 44

  15. S-m-n Theorem, the Unary Case Given a binary function f ( x , y ), we get a unary computable function f ( a , y ) by fixing a value a for x . Let e be an index for f ( a , y ). Then f ( a , y ) ≃ φ e ( y ) . S-m-n Theorem states that the index e can be computed from a . Computability Theory, by Y. Fu VII. Problem Index 14 / 44

  16. S-m-n Theorem, the Unary Case Fact . Suppose that f ( x , y ) is a computable function. There is a primitive recursive function k ( x ) such that f ( x , y ) ≃ φ k ( x ) ( y ) . Computability Theory, by Y. Fu VII. Problem Index 15 / 44

  17. S-m-n Theorem, the Unary Case Let F be a program that computes f . Consider the following T (1 , 2) Z (1)  S (1)   . . a times .   S (1) F The above program can be effectively constructed from a . Let k ( a ) be the G¨ odel number of the above program. It can be effectively computed from the above program. Computability Theory, by Y. Fu VII. Problem Index 16 / 44

  18. Example 1. Let f ( x , y ) = y x . Then φ k ( x ) ( y ) = y x . For each fixed n , k ( n ) is an index for y n . � y , if y is a multiple of x , 2. Let f ( x , y ) ≃ . ↑ , otherwise . Then φ k ( n ) ( y ) is defined if and only if y is a multiple of n . Computability Theory, by Y. Fu VII. Problem Index 17 / 44

  19. S-m-n Theorem . For m , n , there is an injective primitive recursive ( m + 1)-function s m n ( x , � x ) such that for all e the following holds: φ m + n y ) ≃ φ n ( � x , � x ) ( � y ) . e s m n ( e , � S-m-n Theorem is also called Parameter Theorem . Computability Theory, by Y. Fu VII. Problem Index 18 / 44

  20. Proof of S-m-n Theorem Proof . Given e , x 1 , . . . , x m , we can effectively construct the following program and its index T ( n , m + n ) . . . T (1 , m + 1) Q (1 , x 1 ) . . . Q ( m , x m ) P e where Q ( i , x ) is the program Z ( i ) , S ( i ) , . . . , S ( i ) . � �� � x times The injectivity is achieved by padding enough useless instructions. Computability Theory, by Y. Fu VII. Problem Index 19 / 44

  21. 3. Enumeration Theorem Computability Theory, by Y. Fu VII. Problem Index 20 / 44

  22. What makes it possible that every C program can be executed in a computer? Computability Theory, by Y. Fu VII. Problem Index 21 / 44

  23. General Remark There are universal programs that embody all the programs. A program is universal if upon receiving the G¨ odel number of a program it simulates the program indexed by the number. Computability Theory, by Y. Fu VII. Problem Index 22 / 44

  24. Intuition Consider the function ψ ( x , y ) defined as follows ψ ( x , y ) ≃ φ x ( y ) . In an obvious sense ψ ( x , ) is a universal function for the unary functions φ 0 , φ 1 , φ 2 , φ 3 , . . . . Computability Theory, by Y. Fu VII. Problem Index 23 / 44

  25. Universal Function The universal function for n -ary computable functions is the ( n + 1)-ary function ψ ( n ) defined by U ψ ( n ) U ( e , x 1 , . . . , x n ) ≃ φ ( n ) e ( x 1 , . . . , x n ) . We write ψ U for ψ (1) U . Question: Is ψ ( n ) computable? U Computability Theory, by Y. Fu VII. Problem Index 24 / 44

  26. Enumeration Theorem . For each n , the universal function ψ ( n ) is computable. U Proof. Given a number e , decode the number to get the program P e ; and then simulate the program P e . If the simulation ever terminates, then return the number in R 1 . By Church-Turing Thesis, ψ ( n ) is U computable. Computability Theory, by Y. Fu VII. Problem Index 25 / 44

  27. Application: Undecidability Proposition . The problem ‘ φ x is total’ is undecidable. Proof. If ‘ φ x is total’ were decidable, then by Church’s Thesis � ψ U ( x , x ) + 1 , if φ x is total , f ( x ) = 0 , if φ x is not total . would be a total computable function that differs from every total computable function. Computability Theory, by Y. Fu VII. Problem Index 26 / 44

  28. Application: Effectiveness of Function Operation Proposition . There is a total computable function s ( x , y ) such that φ s ( x , y ) = φ x φ y for all x , y . Proof. Let f ( x , y , z ) ≃ φ x ( z ) φ y ( z ) ≃ ψ U ( x , z ) ψ U ( y , z ). By S-m-n Theorem there is a total function s ( x , y ) such that φ s ( x , y ) ( z ) ≃ f ( x , y , z ). Computability Theory, by Y. Fu VII. Problem Index 27 / 44

  29. Application: Effectiveness of Set Operation Proposition . There is a total computable function s ( x , y ) such that W s ( x , y ) = W x ∪ W y . Proof. Let � 1 , if z ∈ W x or z ∈ W y , f ( x , y , z ) = undefined , otherwise . By S-m-n Theorem there is a total function s ( x , y ) such that φ s ( x , y ) ( z ) ≃ f ( x , y , z ). Clearly W s ( x , y ) = W x ∪ W y . Computability Theory, by Y. Fu VII. Problem Index 28 / 44

  30. Application: Effectiveness of Recursion Consider f defined by the following recursion x , 0) ≃ φ ( n ) x ) ≃ ψ ( n ) f ( e 1 , e 2 , � e 1 ( � U ( e 1 , � x ) , and φ ( n +2) f ( e 1 , e 2 , � x , y + 1) ≃ ( � x , y , f ( e 1 , e 2 , � x , y )) e 2 ψ ( n +2) ≃ ( e 2 , � x , y , f ( e 1 , e 2 , � x , y )) . U By S-m-n Theorem, there is a total computable function r ( e 1 , e 2 ) such that φ ( n +1) r ( e 1 , e 2 ) ( � x , y ) ≃ f ( e 1 , e 2 , � x , y ) . Computability Theory, by Y. Fu VII. Problem Index 29 / 44

  31. Application: Non-Primitive Recursive Total Function Theorem . There is a total computable function that is not primitive recursive. Proof. 1. The primitive recursive functions have a universal function. 2. Such a function cannot be primitive recursive by diagonalisation. Computability Theory, by Y. Fu VII. Problem Index 30 / 44

  32. 4. Recursion Theorem Computability Theory, by Y. Fu VII. Problem Index 31 / 44

  33. Recursion Theorem (Kleene, 1938). Let f be a total unary computable function. Then there is a number n such that φ f ( n ) = φ n . Proof. By S-m-n Theorem there is an injective primitive recursive function s ( x ) such that for all x � φ φ x ( x ) ( y ) , if φ x ( x ) ↓ ; φ s ( x ) ( y ) ≃ (1) ↑ , otherwise . Let v be such that φ v = s ; f . Obviously φ v is total and φ v ( v ) ↓ . It follows from (1) that φ s ( v ) = φ φ v ( v ) = φ f ( s ( v )) . We are done by letting n be s ( v ). Computability Theory, by Y. Fu VII. Problem Index 32 / 44

Recommend


More recommend