Reducibility Fall 2004 COMP 335 1 Problem is
Reducibility Fall 2004 COMP 335 1
Problem is reduced to problem If we can solve problem Fall 2004 COMP 335 then 2
Problem If If Fall 2004 is reduced to problem is decidable then is undecidable then COMP 335 is decidable is undecidable 3
Example: the halting problem is reduced to the state-entry problem Fall 2004 COMP 335 4
The state-entry problem Inputs: • Turing Machine • State • String Question: Does enter state on input Fall 2004 COMP 335 ? 5
Theorem: The state-entry problem is undecidable Proof: Reduce the halting problem to the state-entry problem Fall 2004 COMP 335 6
Suppose we have a Decider for the state-entry algorithm: state-entry problem decider Fall 2004 YES enters NO doesn’t enter COMP 335 7
We want to build a decider for the halting problem: Halting problem decider Fall 2004 YES halts on NO doesn’t halt on COMP 335 8
We want to reduce the halting problem to the state-entry problem: Halting problem decider YES State-entry problem NO NO decider Fall 2004 COMP 335 9
We need to convert one problem instance to the other problem instance Halting problem decider Convert Inputs ? Fall 2004 YES State-entry problem NO NO decider COMP 335 10
Convert to : • Add new state • From any halting state of halting states Fall 2004 COMP 335 add transitions to Single halt state 11
halts on input if and only if halts on state Fall 2004 COMP 335 on input 12
Halting problem decider Generate Fall 2004 YES State-entry problem NO NO decider COMP 335 13
We reduced the halting problem to the state-entry problem Since the halting problem is undecidable, the state-entry problem is undecidable END OF PROOF Fall 2004 COMP 335 14
Another example: the halting problem is reduced to the blank-tape halting problem Fall 2004 COMP 335 15
The blank-tape halting problem Input: Turing Machine Question: Does halt when started with a blank tape? Fall 2004 COMP 335 16
Theorem: The blank-tape halting problem is undecidable Proof: Reduce the halting problem to the blank-tape halting problem Fall 2004 COMP 335 17
Suppose we have a decider for the blank-tape halting problem: YES blank-tape halting problem NO decider Fall 2004 COMP 335 halts on blank tape doesn’t halt on blank tape 18
We want to build a decider for the halting problem: halting problem decider Fall 2004 YES halts on NO doesn’t halt on COMP 335 19
We want to reduce the halting problem to the blank-tape halting problem: Halting problem decider YES Blank-tape halting problem NO decider Fall 2004 COMP 335 YES NO 20
We need to convert one problem instance to the other problem instance Halting problem decider Convert Inputs ? Fall 2004 YES Blank-tape halting problem NO decider COMP 335 YES NO 21
Construct a new machine • When started on blank tape, writes • Then continues execution like Fall 2004 step 1 if blank tape step 2 execute then write with input COMP 335 22
halts on input string if and only if halts when started with blank tape Fall 2004 COMP 335 23
Halting problem decider Generate Fall 2004 YES blank-tape halting problem NO decider COMP 335 YES NO 24
We reduced the halting problem to the blank-tape halting problem Since the halting problem is undecidable, the blank-tape halting problem is undecidable END OF PROOF Fall 2004 COMP 335 25
Summary of Undecidable Problems Halting Problem: Does machine halt on input ? Membership problem: Does machine accept string ? Fall 2004 COMP 335 26
Blank-tape halting problem: Does machine on blank tape? halt when starting State-entry Problem: Does machine on input ? Fall 2004 enter state COMP 335 27
Uncomputable Functions Fall 2004 COMP 335 28
Uncomputable Functions Values region Domain A function is uncomputable if it cannot be computed for all of its domain Fall 2004 COMP 335 29
An uncomputable function: maximum number of moves until any Turing machine with states halts when started with the blank tape Fall 2004 COMP 335 30
Theorem: Function Proof: is uncomputable Assume for contradiction that is computable Then the blank-tape halting problem is decidable Fall 2004 COMP 335 31
Decider for blank-tape halting problem: Input: machine 1. Count states of : 2. Compute 3. Simulate for steps starting with empty tape If Fall 2004 halts then return YES otherwise return NO COMP 335 32
Therefore, the blank-tape halting problem is decidable However, the blank-tape halting problem is undecidable Contradiction!!! Fall 2004 COMP 335 33
Therefore, function in uncomputable END OF PROOF Fall 2004 COMP 335 34
Undecidable Problems for Recursively Enumerable Languages Fall 2004 COMP 335 35
Take a recursively enumerable language Decision problems: • is empty? • is finite? • contains two different strings of the same length? All these problems are undecidable Fall 2004 COMP 335 36
Theorem: For any recursively enumerable language it is undecidable to determine whether is empty Proof: We will reduce the membership problem to this problem Fall 2004 COMP 335 37
Let be the TM with Suppose we have a decider for the empty language problem: empty language problem decider Fall 2004 YES empty NO not empty COMP 335 38
We will build the decider for the membership problem: membership problem decider Fall 2004 YES NO COMP 335 accepts rejects 39
We want to reduce the membership problem to the empty language problem: Membership problem decider empty language problem decider Fall 2004 COMP 335 YES NO NO YES 40
We need to convert one problem instance to the other problem instance Membership problem decider Convert inputs ? Fall 2004 empty language problem decider COMP 335 YES NO NO YES 41
Construct machine : On arbitrary input string executes the same as with When compare enters a final state, with Accept only if Fall 2004 COMP 335 42
if and only if is not empty Fall 2004 COMP 335 43
Membership problem decider construct empty language problem decider YES NO NO YES END OF PROOF Fall 2004 COMP 335 44
- Slides: 44