theory of computer science
play

Theory of Computer Science D4. Halting Problem Variants & Rices - PowerPoint PPT Presentation

Theory of Computer Science D4. Halting Problem Variants & Rices Theorem Gabriele R oger University of Basel April 29, 2020 Other Halting Problem Variants Rices Theorem Summary Other Halting Problem Variants Other Halting


  1. Theory of Computer Science D4. Halting Problem Variants & Rice’s Theorem Gabriele R¨ oger University of Basel April 29, 2020

  2. Other Halting Problem Variants Rice’s Theorem Summary Other Halting Problem Variants

  3. Other Halting Problem Variants Rice’s Theorem Summary Overview: Computability Theory Turing-Computability Computability (Semi-)Decidability Undecidable Halting Problem Problems Reductions Rice’s Theorem

  4. Other Halting Problem Variants Rice’s Theorem Summary Reminder: Special Halting Problem Definition (Special Halting Problem) The special halting problem or self-application problem is the language K = { w ∈ { 0 , 1 } ∗ | M w started on w terminates } . German: spezielles Halteproblem, Selbstanwendbarkeitsproblem

  5. Other Halting Problem Variants Rice’s Theorem Summary General Halting Problem (1) Definition (General Halting Problem) The general halting problem or halting problem is the language H = { w # x ∈ { 0 , 1 , # } ∗ | w , x ∈ { 0 , 1 } ∗ , M w started on x terminates } German: allgemeines Halteproblem, Halteproblem Note: H is semi-decidable. (Why?) Theorem (Undecidability of General Halting Problem) The general halting problem is undecidable. Intuition: if the special case K is not decidable, then the more general problem H definitely cannot be decidable.

  6. Other Halting Problem Variants Rice’s Theorem Summary General Halting Problem (1) Definition (General Halting Problem) The general halting problem or halting problem is the language H = { w # x ∈ { 0 , 1 , # } ∗ | w , x ∈ { 0 , 1 } ∗ , M w started on x terminates } German: allgemeines Halteproblem, Halteproblem Note: H is semi-decidable. (Why?) Theorem (Undecidability of General Halting Problem) The general halting problem is undecidable. Intuition: if the special case K is not decidable, then the more general problem H definitely cannot be decidable.

  7. Other Halting Problem Variants Rice’s Theorem Summary General Halting Problem (1) Definition (General Halting Problem) The general halting problem or halting problem is the language H = { w # x ∈ { 0 , 1 , # } ∗ | w , x ∈ { 0 , 1 } ∗ , M w started on x terminates } German: allgemeines Halteproblem, Halteproblem Note: H is semi-decidable. (Why?) Theorem (Undecidability of General Halting Problem) The general halting problem is undecidable. Intuition: if the special case K is not decidable, then the more general problem H definitely cannot be decidable.

  8. Other Halting Problem Variants Rice’s Theorem Summary General Halting Problem (2) Proof. We show K ≤ H . We define f : { 0 , 1 } ∗ → { 0 , 1 , # } ∗ as f ( w ) := w # w . f is clearly total and computable, and w ∈ K iff M w started on w terminates iff w # w ∈ H iff f ( w ) ∈ H . Therefore f is a reduction from K to H . Because K is undecidable, H is also undecidable.

  9. Other Halting Problem Variants Rice’s Theorem Summary General Halting Problem (2) Proof. We show K ≤ H . We define f : { 0 , 1 } ∗ → { 0 , 1 , # } ∗ as f ( w ) := w # w . f is clearly total and computable, and w ∈ K iff M w started on w terminates iff w # w ∈ H iff f ( w ) ∈ H . Therefore f is a reduction from K to H . Because K is undecidable, H is also undecidable.

  10. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (1) Definition (Halting Problem on the Empty Tape) The halting problem on the empty tape is the language H 0 = { w ∈ { 0 , 1 } ∗ | M w started on ε terminates } . German: Halteproblem auf leerem Band Note: H 0 is semi-decidable. (Why?) Theorem (Undecidability of Halting Problem on Empty Tape) The halting problem on the empty tape is undecidable.

  11. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (1) Definition (Halting Problem on the Empty Tape) The halting problem on the empty tape is the language H 0 = { w ∈ { 0 , 1 } ∗ | M w started on ε terminates } . German: Halteproblem auf leerem Band Note: H 0 is semi-decidable. (Why?) Theorem (Undecidability of Halting Problem on Empty Tape) The halting problem on the empty tape is undecidable.

  12. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (1) Definition (Halting Problem on the Empty Tape) The halting problem on the empty tape is the language H 0 = { w ∈ { 0 , 1 } ∗ | M w started on ε terminates } . German: Halteproblem auf leerem Band Note: H 0 is semi-decidable. (Why?) Theorem (Undecidability of Halting Problem on Empty Tape) The halting problem on the empty tape is undecidable.

  13. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (2) Proof. We show H ≤ H 0 . Consider the function f : { 0 , 1 , # } ∗ → { 0 , 1 } ∗ that computes the word f ( z ) for a given z ∈ { 0 , 1 , # } ∗ as follows: Test if z has the form w # x with w , x ∈ { 0 , 1 } ∗ . If not, return any word that is not in H 0 (e. g., encoding of a TM that instantly starts an endless loop). If yes, split z into w and x . Decode w to a TM M 2 . . . .

  14. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (2) Proof. We show H ≤ H 0 . Consider the function f : { 0 , 1 , # } ∗ → { 0 , 1 } ∗ that computes the word f ( z ) for a given z ∈ { 0 , 1 , # } ∗ as follows: Test if z has the form w # x with w , x ∈ { 0 , 1 } ∗ . If not, return any word that is not in H 0 (e. g., encoding of a TM that instantly starts an endless loop). If yes, split z into w and x . Decode w to a TM M 2 . . . .

  15. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (2) Proof. We show H ≤ H 0 . Consider the function f : { 0 , 1 , # } ∗ → { 0 , 1 } ∗ that computes the word f ( z ) for a given z ∈ { 0 , 1 , # } ∗ as follows: Test if z has the form w # x with w , x ∈ { 0 , 1 } ∗ . If not, return any word that is not in H 0 (e. g., encoding of a TM that instantly starts an endless loop). If yes, split z into w and x . Decode w to a TM M 2 . . . .

  16. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (2) Proof. We show H ≤ H 0 . Consider the function f : { 0 , 1 , # } ∗ → { 0 , 1 } ∗ that computes the word f ( z ) for a given z ∈ { 0 , 1 , # } ∗ as follows: Test if z has the form w # x with w , x ∈ { 0 , 1 } ∗ . If not, return any word that is not in H 0 (e. g., encoding of a TM that instantly starts an endless loop). If yes, split z into w and x . Decode w to a TM M 2 . . . .

  17. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (3) Proof (continued). Construct a TM M 1 that behaves as follows: If the input is empty: write x onto the tape and move the head to the first symbol of x (if x � = ε ); then stop otherwise, stop immediately Construct TM M that first runs M 1 and then M 2 . Return the encoding of M . f is total and (with some effort) computable. Also: z ∈ H iff z = w # x and M w run on x terminates iff M f ( z ) started on empty tape terminates iff f ( z ) ∈ H 0 � H ≤ H 0 � H 0 undecidable

  18. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (3) Proof (continued). Construct a TM M 1 that behaves as follows: If the input is empty: write x onto the tape and move the head to the first symbol of x (if x � = ε ); then stop otherwise, stop immediately Construct TM M that first runs M 1 and then M 2 . Return the encoding of M . f is total and (with some effort) computable. Also: z ∈ H iff z = w # x and M w run on x terminates iff M f ( z ) started on empty tape terminates iff f ( z ) ∈ H 0 � H ≤ H 0 � H 0 undecidable

  19. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (3) Proof (continued). Construct a TM M 1 that behaves as follows: If the input is empty: write x onto the tape and move the head to the first symbol of x (if x � = ε ); then stop otherwise, stop immediately Construct TM M that first runs M 1 and then M 2 . Return the encoding of M . f is total and (with some effort) computable. Also: z ∈ H iff z = w # x and M w run on x terminates iff M f ( z ) started on empty tape terminates iff f ( z ) ∈ H 0 � H ≤ H 0 � H 0 undecidable

  20. Other Halting Problem Variants Rice’s Theorem Summary Halting Problem on Empty Tape (3) Proof (continued). Construct a TM M 1 that behaves as follows: If the input is empty: write x onto the tape and move the head to the first symbol of x (if x � = ε ); then stop otherwise, stop immediately Construct TM M that first runs M 1 and then M 2 . Return the encoding of M . f is total and (with some effort) computable. Also: z ∈ H iff z = w # x and M w run on x terminates iff M f ( z ) started on empty tape terminates iff f ( z ) ∈ H 0 � H ≤ H 0 � H 0 undecidable

  21. Other Halting Problem Variants Rice’s Theorem Summary Rice’s Theorem

  22. Other Halting Problem Variants Rice’s Theorem Summary Overview: Computability Theory Turing-Computability Computability (Semi-)Decidability Undecidable Halting Problem Problems Reductions Rice’s Theorem

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend