Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.

Similar presentations


Presentation on theme: "1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input."— Presentation transcript:

1 1 Decidability continued

2 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input ?

3 3 Blank-tape halting problem: Does machine halt when starting on blank tape? Membership problem: Is a string member of a recursively enumerable language ?

4 4 Uncomputable Functions A function is uncomputable if it cannot be computed for all the domain Domain Values region

5 5 Function : maximum number of moves until any Turing machine with states halts when started with the blank tape

6 6 Theorem: Function is uncomputable Proof: If was computable then the blank-tape halting problem would be decidable

7 7 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

8 8 Rice’s Theorem

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

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

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

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

13 13 Membership problem: Inputs: machine and string Question: ?

14 14 Construct machine : When enters a final state, compare input with Observations: if and only if is empty

15 15 Algorithm for membership problem: Inputs: machine and string 1. Construct 2. Determine if is empty Yes: then No: then

16 16 construct Check if is empty yes no yes Membership machine

17 17 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the halting problem to this problem

18 18 Halting problem: Inputs: machine and string Question: does halt on input ?

19 19 Construct machine : When enters a halt state, accept any input Initially, simulates on input (virtual input)

20 20 Observations: halts on if and only if is infinite If is finite then

21 21 Algorithm for halting problem: Inputs: machine and string 1. Construct 2. Determine if is finite Yes: then doesn’t halt on No: then halts on

22 22 construct Check if is finite yes no yes Machine for halting problem

23 23 Theorem: For a recursively enumerable language it is undecidable to determine whether contains two different string of same length Proof: We will reduce the halting problem to this problem

24 24 Halting problem: Inputs: machine and string Question: does halt on input ?

25 25 Construct machine : When enters a halt state, accept symbols or Initially, simulates on input (virtual input)

26 26 Observation: halts on if and only if accepts and (strings of equal length)

27 27 Algorithm for halting problem: Inputs: machine and string 1. Construct 2. Determine if accepts strings of equal length Yes: then halts on No: then doesn’t halt on

28 28 construct Check if Has equal length strings yes no yes no Machine for halting problem

29 29 The Post Correspondence Problem

30 30 Some undecidable problems for context-free languages: Is context-free grammar ambiguous? Is ?

31 31 We need a tool to prove that the previous problems for context-free languages are undecidable: The Post Correspondence Problem

32 32 The Post Correspondence Problem Input: Two sequences of strings

33 33 There is a Post Correspondence Solution if there is a sequence such that: PC-solution

34 34 Example: PC-solution:

35 35 Example: There is no solution Because total length of strings from is smaller than total length of strings from

36 36 The Modified Post Correspondence Problem Inputs: MPC-solution:

37 37 Example: MPC-solution:

38 38 We will show that: The Modified Post Correspondence Problem is undecidable In other words: There is not MPC-solution for any pair

39 39 Proof Technique: We will reduce the membership problem to the MPC problem

40 40 Membership problem: Does Turing machine accept string Equivalent Problem: Does unrestricted Grammar generate string ?


Download ppt "1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input."

Similar presentations


Ads by Google