Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.

Similar presentations


Presentation on theme: "Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem."— Presentation transcript:

1 Fall 2004COMP 3351 Reducibility

2 Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem

3 Fall 2004COMP 3353 If is undecidable then is undecidable If is decidable then is decidable Problem is reduced to problem

4 Fall 2004COMP 3354 Example: the halting problem is reduced to the state-entry problem

5 Fall 2004COMP 3355 The state-entry problem Inputs: Turing Machine State Question: Does String enter state on input ?

6 Fall 2004COMP 3356 Theorem: The state-entry problem is undecidable Proof: Reduce the halting problem to the state-entry problem

7 Fall 2004COMP 3357 state-entry problem decider YES NO enters doesn’t enter Suppose we have a Decider for the state-entry algorithm:

8 Fall 2004COMP 3358 Halting problem decider YES NO halts on doesn’t halt on We want to build a decider for the halting problem:

9 Fall 2004COMP 3359 State-entry problem decider Halting problem decider YES NO YES NO We want to reduce the halting problem to the state-entry problem:

10 Fall 2004COMP 33510 Halting problem decider YES NO YES NO Convert Inputs ? We need to convert one problem instance to the other problem instance State-entry problem decider

11 Fall 2004COMP 33511 Convert to : Add new state From any halting state of add transitions to halting states Single halt state

12 Fall 2004COMP 33512 halts on input halts on state on input if and only if

13 Fall 2004COMP 33513 Generate Halting problem decider YES NO YES NO State-entry problem decider

14 Fall 2004COMP 33514 Since the halting problem is undecidable, the state-entry problem is undecidable END OF PROOF We reduced the halting problem to the state-entry problem

15 Fall 2004COMP 33515 Another example: the halting problem is reduced to the blank-tape halting problem

16 Fall 2004COMP 33516 The blank-tape halting problem Input:Turing Machine Question:Doeshalt when started with a blank tape?

17 Fall 2004COMP 33517 Theorem: Proof: Reduce the halting problem to the blank-tape halting problem The blank-tape halting problem is undecidable

18 Fall 2004COMP 33518 blank-tape halting problem decider YES NO halts on blank tape doesn’t halt on blank tape Suppose we have a decider for the blank-tape halting problem:

19 Fall 2004COMP 33519 halting problem decider YES NO halts on doesn’t halt on We want to build a decider for the halting problem:

20 Fall 2004COMP 33520 Blank-tape halting problem decider Halting problem decider YES NO YES NO We want to reduce the halting problem to the blank-tape halting problem:

21 Fall 2004COMP 33521 Blank-tape halting problem decider Halting problem decider YES NO YES NO We need to convert one problem instance to the other problem instance Convert Inputs ?

22 Fall 2004COMP 33522 Construct a new machine When started on blank tape, writes Then continues execution like then write step 1step2 if blank tapeexecute with input

23 Fall 2004COMP 33523 halts on input string halts when started with blank tape if and only if

24 Fall 2004COMP 33524 Generate blank-tape halting problem decider Halting problem decider YES NO YES NO

25 Fall 2004COMP 33525 Since the halting problem is undecidable, the blank-tape halting problem is undecidable END OF PROOF We reduced the halting problem to the blank-tape halting problem

26 Fall 2004COMP 33526 Does machine halt on input ? Summary of Undecidable Problems Halting Problem: Membership problem: Does machine accept string ?

27 Fall 2004COMP 33527 Does machine enter state on input ? Does machine halt when starting on blank tape? Blank-tape halting problem: State-entry Problem:

28 Fall 2004COMP 33528 Uncomputable Functions

29 Fall 2004COMP 33529 Uncomputable Functions A function is uncomputable if it cannot be computed for all of its domain Domain Values region

30 Fall 2004COMP 33530 An uncomputable function: maximum number of moves until any Turing machine with states halts when started with the blank tape

31 Fall 2004COMP 33531 Theorem:Function is uncomputable Proof: Then the blank-tape halting problem is decidable Assume for contradiction that is computable

32 Fall 2004COMP 33532 Decider for blank-tape halting problem: Input: machine 1. Count states of : 2. Compute 3. Simulate for steps starting with empty tape If halts then return YES otherwise return NO

33 Fall 2004COMP 33533 Therefore, the blank-tape halting problem is decidable However, the blank-tape halting problem is undecidable Contradiction!!!

34 Fall 2004COMP 33534 Therefore, function in uncomputable END OF PROOF

35 Fall 2004COMP 33535 Undecidable Problems for Recursively Enumerable Languages

36 Fall 2004COMP 33536 is empty? is finite? contains two different strings of the same length? Take a recursively enumerable language Decision problems: All these problems are undecidable

37 Fall 2004COMP 33537 Theorem: For any recursively enumerable language it is undecidable to determine whether is empty Proof: We will reduce the membership problem to this problem

38 Fall 2004COMP 33538 empty language problem decider YES NO Suppose we have a decider for the empty language problem: Let be the TM with empty not empty

39 Fall 2004COMP 33539 membership problem decider YES NO accepts rejects We will build the decider for the membership problem:

40 Fall 2004COMP 33540 YES NO YES Membership problem decider empty language problem decider We want to reduce the membership problem to the empty language problem:

41 Fall 2004COMP 33541 YES NO YES Membership problem decider empty language problem decider We need to convert one problem instance to the other problem instance Convert inputs ?

42 Fall 2004COMP 33542 Construct machine : When enters a final state, compare with Accept only if executes the same as with On arbitrary input string

43 Fall 2004COMP 33543 is not empty if and only if

44 Fall 2004COMP 33544 construct YES NO YES Membership problem decider END OF PROOF empty language problem decider


Download ppt "Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem."

Similar presentations


Ads by Google