1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals.

Slides:



Advertisements
Similar presentations
Linear Bounded Automata LBAs
Advertisements

CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
1 Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible.
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Decidable languages Sipser 4.1 (pages ). CS 311 Mount Holyoke College 2 Hierarchy of languages All languages Turing-recognizable Turing-decidable.
Fall 2004COMP 3351 Undecidable problems for Recursively enumerable languages continued…
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
1 The Post Correspondence Problem continued We will prove that the MPC problem is undecidable 2. We will prove that the PC problem is undecidable.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Costas Busch - RPI1 Undecidable problems for Recursively enumerable languages continued…
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
CS 302: Discrete Math II A Review. An alphabet Σ is a finite set (e.g., Σ = {0,1}) A string over Σ is a finite-length sequence of elements of Σ For x.
Costas Busch - RPI1 NPDAs Accept Context-Free Languages.
Recursively Enumerable and Recursive Languages
1 The Chomsky Hierarchy. 2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
Fall 2006Costas Busch - RPI1 The Post Correspondence Problem.
Fall 2004COMP 3351 The Chomsky Hierarchy. Fall 2004COMP 3352 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Linear Bounded Automata LBAs
Homework #9 Solutions.
1 Decidability continued. 2 Undecidable Problems Halting Problem: Does machine halt on input ? State-entry Problem: Does machine enter state halt on input.
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
Courtesy Costas Busch - RPI1 Reducibility. Courtesy Costas Busch - RPI2 Problem is reduced to problem If we can solve problem then we can solve problem.
Fall 2006Costas Busch - RPI1 The Chomsky Hierarchy.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Fall 2003Costas Busch - RPI1 Turing Machines (TMs) Linear Bounded Automata (LBAs)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
Decidability A decision problem is a problem with a YES/NO answer. We have seen decision problems for - regular languages: - context free languages: [Sections.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2005.
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Recursively Enumerable and Recursive Languages
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
Decidability Decidable/Undecidable problems. Jaruloj Chongstitvatana Decidability2 Accepting: Definition Let T = (Q, , , , s) be a TM. T accepts.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
Costas Busch - LSU1 The Post Correspondence Problem.
Undecidability and The Halting Problem
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Consider problems with answer YES or NO Examples: Does Machine have three states ? Is string a binary.
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
1 Recursively Enumerable and Recursive Languages.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
Fall 2006Costas Busch - RPI1 RE languages and Enumerators.
Recursively Enumerable Languages
Recursively Enumerable and Recursive Languages
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Reductions.
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
Turing acceptable languages and Enumerators
CSE322 The Chomsky Hierarchy
Decidable Languages Costas Busch - LSU.
Turing acceptable languages and Enumerators
Undecidable problems:
Formal Languages, Automata and Models of Computation
Decidability continued….
Automata, Grammars and Languages
The Chomsky Hierarchy Costas Busch - LSU.
Presentation transcript:

1 The Chomsky Hierarchy

2 Unrestricted Grammars: Productions String of variables and terminals String of variables and terminals

3 Example unrestricted grammar:

4 A language is recursively enumerable if and only if is generated by an unrestricted grammar Theorem:

5 Context-Sensitive Grammars: and: Productions String of variables and terminals String of variables and terminals

6 The language is context-sensitive:

7 A language is context sensistive if and only if is accepted by a Linear-Bounded automaton Theorem:

8 There is a language which is context-sensitive but not recursive Observation:

9 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free Regular The Chomsky Hierarchy

10 Decidability

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

12 A problem is decidable if some Turing machine Solves (decides) the problem Decidable problems: Does Machine have three states ? Is string a binary number? Does DFA accept any input?

13 Turing Machine Input problem instance YES NO The Turing machine that solves a problem answers YES or NO for each instance

14 The machine that decides 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

15 YES NO Turing Machine that decides a problem YES and NO states are halting states

16 Difference between Recursive Languages and Decidable problems The YES states may not be final states For decidable problems:

17 Some problems are undecidable: There is no Turing Machine that solves all instances of the problem

18 A simple undecidable problem: The membership problem

19 The Membership Problem Input:Turing Machine String Question: Does accept ?

20 Theorem: The membership problem is undecidable Proof:Assume for contradiction that the membership problem is decidable

21 There exists a Turing Machine that solves the membership problem YES accepts NO rejects

22 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

23 accepts ? NO YES accept Turing Machine that accepts and halts on any input reject

24 Therefore,is recursive But there are recursively enumerable languages which are not recursive Contradiction!!!! Since is chosen arbitrarily, we have proven that every recursively enumerable language is also recursive

25 Therefore, the membership problem is undecidable END OF PROOF

26 A famous undecidable problem: The halting problem

27 The Halting Problem Input:Turing Machine String Question: Does halt on ?

28 Theorem: The halting problem is undecidable Proof:Assume for contradiction that the halting problem is decidable

29 There exists Turing Machine that solves the halting problem YEShalts on doesn’t halt on NO

30 Input: initial tape contents Encoding of String YES NO Construction of

31 Construct machine : If returns YES then loop forever If returns NO then halt

32 NO Loop forever YES

33 Construct machine : Input: If halts on input Then loop forever Else halt (machine )

34 copy

35 Run machine with input itself: Input: If halts on input Then loop forever Else halt (machine )

36 on input If halts then loops forever If doesn’t halt then it halts : NONSENSE !!!!!

37 Therefore, we have contradiction The halting problem is undecidable END OF PROOF

38 Another proof of the same theorem: If the halting problem was decidable then every recursively enumerable language would be recursive

39 Theorem: The halting problem is undecidable Proof:Assume for contradiction that the halting problem is decidable

40 There exists Turing Machine that solves the halting problem YEShalts on doesn’t halt on NO

41 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

42 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

43 Thereforeis recursive But there are recursively enumerable languages which are not recursive Contradiction!!!! Since is chosen arbitrarily, we have proven that every recursively enumerable language is also recursive

44 Therefore, the halting problem is undecidable END OF PROOF