Download presentation

Presentation is loading. Please wait.

1
Fall 2004COMP 3351 The Chomsky Hierarchy

2
Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free Regular The Chomsky Hierarchy

3
Fall 2004COMP 3353 Decidability

4
Fall 2004COMP 3354 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary number? Does DFA accept any input?

5
Fall 2004COMP 3355 A problem is decidable if some Turing machine decides (solves) the problem Decidable problems: Does Machine have three states ? Is string a binary number? Does DFA accept any input?

6
Fall 2004COMP 3356 Turing Machine Input problem instance YES NO The Turing machine that decides (solves) a problem answers YES or NO for each instance of the problem

7
Fall 2004COMP 3357 The machine that decides (solves) a problem: If the answer is YES then halts in a yes state If the answer is NO then halts in a no state These states may not be final states

8
Fall 2004COMP 3358 YES states NO states Turing Machine that decides a problem YES and NO states are halting states

9
Fall 2004COMP 3359 Difference between Recursive Languages and Decidable problems The YES states may not be final states For decidable problems:

10
Fall 2004COMP 33510 Some problems are undecidable: which means: there is no Turing Machine that solves all instances of the problem A simple undecidable problem: The membership problem

11
Fall 2004COMP 33511 The Membership Problem Input:Turing Machine String Question: Does accept ?

12
Fall 2004COMP 33512 Theorem: The membership problem is undecidable Proof:Assume for contradiction that the membership problem is decidable (there are and for which we cannot decide whether )

13
Fall 2004COMP 33513 Thus, there exists a Turing Machine that solves the membership problem YES accepts NO rejects

14
Fall 2004COMP 33514 Let be a recursively enumerable language Let be the Turing Machine that accepts We will prove that is also recursive: we will describe a Turing machine that accepts and halts on any input

15
Fall 2004COMP 33515 accepts ? NO YES accept Turing Machine that accepts and halts on any input reject

16
Fall 2004COMP 33516 Therefore,is recursive But there are recursively enumerable languages which are not recursive Contradiction!!!! Since is chosen arbitrarily, every recursively enumerable language is also recursive

17
Fall 2004COMP 33517 Therefore, the membership problem is undecidable END OF PROOF

18
Fall 2004COMP 33518 Another famous undecidable problem: The halting problem

19
Fall 2004COMP 33519 The Halting Problem Input:Turing Machine String Question: Does halt on input ?

20
Fall 2004COMP 33520 Theorem: The halting problem is undecidable Proof:Assume for contradiction that the halting problem is decidable (there are and for which we cannot decide whether halts on input )

21
Fall 2004COMP 33521 Thus, there exists Turing Machine that solves the halting problem YEShalts on doesn’t halt on NO

22
Fall 2004COMP 33522 Input: initial tape contents Encoding of String YES NO Construction of

23
Fall 2004COMP 33523 Construct machine : If returns YES then loop forever If returns NO then halt

24
Fall 2004COMP 33524 NO Loop forever YES

25
Fall 2004COMP 33525 Construct machine : Input: If halts on input Then loop forever Else halt (machine )

26
Fall 2004COMP 33526 copy

27
Fall 2004COMP 33527 Run machine with input itself: Input: If halts on input Then loop forever Else halt (machine )

28
Fall 2004COMP 33528 on input If halts then loops forever If doesn’t halt then it halts : NONSENSE !!!!!

29
Fall 2004COMP 33529 Therefore, we have contradiction The halting problem is undecidable END OF PROOF

30
Fall 2004COMP 33530 Another proof of the same theorem: If the halting problem was decidable then every recursively enumerable language would be recursive

31
Fall 2004COMP 33531 Theorem: The halting problem is undecidable Proof:Assume for contradiction that the halting problem is decidable

32
Fall 2004COMP 33532 There exists Turing Machine that solves the halting problem YEShalts on doesn’t halt on NO

33
Fall 2004COMP 33533 Let be a recursively enumerable language Let be the Turing Machine that accepts We will prove that is also recursive: we will describe a Turing machine that accepts and halts on any input

34
Fall 2004COMP 33534 halts on ? YES NO Run with input reject accept reject Turing Machine that accepts and halts on any input Halts on final state Halts on non-final state

35
Fall 2004COMP 33535 Thereforeis recursive But there are recursively enumerable languages which are not recursive Contradiction!!!! Since is chosen arbitrarily, every recursively enumerable language is also recursive

36
Fall 2004COMP 33536 Therefore, the halting problem is undecidable END OF PROOF

Similar presentations

© 2020 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google