Download presentation
Presentation is loading. Please wait.
1
Computability and Complexity 7-1 Computability and Complexity Andrei Bulatov Recursion Theorem
2
Computability and Complexity 7-2 Self-Printing Program A Turing Machine S (transducer) that on every input prints out its own description Claim For any string x, there is a TM,, that on every input outputs x Erase the input Print x Halt
3
Computability and Complexity 7-3 Example 01| |RR |0|R01 |111|R 01 |000|R
4
Computability and Complexity 7-4 Self-Printing Program (Cnt’d) H? T AB
5
Computability and Complexity 7-5 Claim There is a Turing Machine, T, that, for any string x, outputs the TM Set B=T, then Then S operates as follows: On the empty input Print the description of T Simulate T on the content of the tape (that is T )
6
Computability and Complexity 7-6 Recursion Theorem A TM (a program) can not just obtain its own description, but also perform any computation with it Theorem For any computable function, there is a TM such that, for every input x, Theorem For any computable function, there is a TM such that, for every input x, For example, a TM can use experience x to change itself, and so to learn
7
Computability and Complexity 7-7 Proof Idea H? ABTx T computes , B computes
8
Computability and Complexity 7-8 operation: prints the description of B and T on the tape ignoring the input, but not damaging it A passes control to B using the description of B and T from the tape B computes and prints the description of TM, that is A B passes control to T T computes the value of of the content of the tape, that is (ABT,x)
9
Computability and Complexity 7-9 Instance: A Turing Machine T. Question: Does T( ) print the description of T ? Self-Printing Theorem is undecidable. The corresponding language is: Proof - see next slide
10
Computability and Complexity 7-10 We show that For every input “ T;x ” of, let S be a machine operating on an input y as follows: Erase input y Simulate T on x If T(x) halts then write the description of S on the tape and “Accept” Observe that If T halts on x, then S prints itself on any input If T does not halt on x, then S does not print itself QED
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.