Theory of Computer Science D8. Rice’s Theorem and Other Undecidable Problems Malte Helmert University of Basel May 11, 2016
Other Halting Problem Variants Rice’s Theorem Outlook Summary Overview: Computability Theory Computability Theory imperative models of computation: D1. Turing-Computability D2. LOOP- and WHILE-Computability D3. GOTO-Computability functional models of computation: D4. Primitive Recursion and µ -Recursion D5. Primitive/ µ -Recursion vs. LOOP-/WHILE-Computability undecidable problems: D6. Decidability and Semi-Decidability D7. Halting Problem and Reductions D8. Rice’s Theorem and Other Undecidable Problems Post’s Correspondence Problem Undecidable Grammar Problems G¨ odel’s Theorem and Diophantine Equations
Other Halting Problem Variants Rice’s Theorem Outlook Summary Further Reading (German) Literature for this Chapter (German) Theoretische Informatik – kurz gefasst by Uwe Sch¨ oning (5th edition) Chapter 2.6 Outlook: Chapters 2.7–2.9
Other Halting Problem Variants Rice’s Theorem Outlook Summary Further Reading (English) Literature for this Chapter (English) Introduction to the Theory of Computation by Michael Sipser (3rd edition) Chapters 5.1 and 5.3 Outlook: Chapters 5.2 and 6.2 Notes: Sipser’s definitions differ from ours.
Other Halting Problem Variants Rice’s Theorem Outlook Summary Other Halting Problem Variants
Other Halting Problem Variants Rice’s Theorem Outlook 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.
Other Halting Problem Variants Rice’s Theorem Outlook 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.
Other Halting Problem Variants Rice’s Theorem Outlook 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.
Other Halting Problem Variants Rice’s Theorem Outlook Summary General Halting Problem (2) Proof. We show K ≤ H (Reminder: K is the special halting problem). 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.
Other Halting Problem Variants Rice’s Theorem Outlook Summary General Halting Problem (2) Proof. We show K ≤ H (Reminder: K is the special halting problem). 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.
Other Halting Problem Variants Rice’s Theorem Outlook 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.
Other Halting Problem Variants Rice’s Theorem Outlook 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.
Other Halting Problem Variants Rice’s Theorem Outlook 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.
Other Halting Problem Variants Rice’s Theorem Outlook 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 . . . .
Other Halting Problem Variants Rice’s Theorem Outlook 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 . . . .
Other Halting Problem Variants Rice’s Theorem Outlook 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 . . . .
Other Halting Problem Variants Rice’s Theorem Outlook 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 . . . .
Other Halting Problem Variants Rice’s Theorem Outlook 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
Other Halting Problem Variants Rice’s Theorem Outlook 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
Other Halting Problem Variants Rice’s Theorem Outlook 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
Recommend
More recommend