Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.

Similar presentations


Presentation on theme: "1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem."— Presentation transcript:

1 1 Reducibility

2 2 Problem is reduced to problem If we can solve problem then we can solve problem

3 3 If is undecidable then is undecidable If is decidable then is decidable Problem is reduced to problem

4 4 Example: the halting problem is reduced to the state-entry problem

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

6 6 Theorem: The state-entry problem is undecidable Proof: Reduce the halting problem to the state-entry problem

7 7 Suppose we have an algorithm (Turing Machine) that solves the state-entry problem We will construct an algorithm that solves the halting problem

8 8 Algorithm for state-entry problem YES NO enters doesn’t enter Assume we have the state-entry algorithm:

9 9 Algorithm for Halting problem YES NO halts on doesn’t halt on We want to design the halting algorithm:

10 10 Modify input machine : Add new state From any halting state add transitions to halting states Single halt state

11 11 halts halts on state if and only if

12 12 machine and string Algorithm for halting problem: Inputs: 1. Construct machine with state 2. Run algorithm for state-entry problem with inputs:,,

13 13 GenerateState-entry algorithm Halting problem algorithm YES NO YES NO

14 14 Since the halting problem is undecidable, it must be that the state-entry problem is also undecidable END OF PROOF We reduced the halting problem to the state-entry problem

15 15 Another example: the halting problem is reduced to the blank-tape halting problem

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

17 17 Theorem: Proof: Reduce the halting problem to the blank-tape halting problem The blank-tape halting problem is undecidable

18 18 Suppose we have an algorithm for the blank-tape halting problem We will construct an algorithm for the halting problem

19 19 Algorithm for blank-tape halting problem YES NO halts on blank tape doesn’t halt on blank tape Assume we have the blank-tape halting algorithm:

20 20 Algorithm for halting problem YES NO halts on doesn’t halt on We want to design the halting algorithm:

21 21 Construct a new machine On blank tape writes Then continues execution like then write step 1step2 if blank tapeexecute with input

22 22 halts on input string halts when started with blank tape if and only if

23 23 Algorithm for halting problem: 1. Construct 2. Run algorithm for blank-tape halting problem with input, machine and string Inputs:

24 24 Generate blank-tape halting algorithm Halting problem algorithm YES NO YES NO

25 25 Since the halting problem is undecidable, the blank-tape halting problem is also undecidable END OF PROOF We reduced the halting problem to the blank-tape halting problem

26 26 Does machine halt on input ? Summary of Undecidable Problems Halting Problem: Membership problem: Is a string member of a recursively enumerable language ? Does machine accept string ? In other words:

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

28 28 Uncomputable Functions

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

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

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

32 32 Algorithm 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 33 Therefore, the blank-tape halting problem is decidable However, the blank-tape halting problem is undecidable Contradiction!!!

34 34 Therefore, function in uncomputable END OF PROOF

35 35 Rice’s Theorem

36 36 Non-trivial properties of recursively enumerable languages: any property possessed by some (not all) recursively enumerable languages Definition:

37 37 Some non-trivial properties of recursively enumerable languages: is empty is finite contains two different strings of the same length

38 38 Rice’s Theorem: Any non-trivial property of a recursively enumerable language is undecidable

39 39 We will prove some non-trivial properties without using Rice’s theorem

40 40 Theorem: For any recursively enumerable language it is undecidable to determine whether is empty Proof: We will reduce the membership problem to this problem

41 41 Algorithm for empty language problem YES NO Assume we have the empty language algorithm: Let be the machine that accepts empty not empty

42 42 Algorithm for membership problem YES NO accepts rejects We will design the membership algorithm:

43 43 First construct machine : When enters a final state, compare original input string with Accept if original input is the same with

44 44 is not empty if and only if

45 45 Algorithm for membership problem: Inputs: machine and string 1. Construct 2. Determine if is empty YES: then NO: then

46 46 construct Check if is empty YES NO YES Membership algorithm END OF PROOF


Download ppt "1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem."

Similar presentations


Ads by Google