We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Modified over 6 years ago
1 The Chomsky Hierarchy
2 Unrestricted Grammars: Rules have form String of variables and terminals String of variables and terminals
3 Example grammar:
4 A language is generated by an unrestricted grammar if and only if is recursively enumerable
5 Context-Sensitive Grammars: Rules have form String of variables and terminals String of variables and terminals And:
6 The language is context-sensitive:
7 A language is context sensistive if and only if is accepted by a Linear-Bounded automaton
8 There is a language which is context-sensitive but not recursive
9 Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free regular
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 the problem
13 Some decidable problems: Does Machine have three states ? Is string a binary number? Does DFA accept any input?
14 The machine that decides the 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 Difference between Recursive Languages and Decidable problems The YES halting states may not be final states For decidable problems:
16 There are some problems which are undecidable: There is no Turing Machine that solves all instances of the problem
17 A famous undecidable problem: The halting problem
18 The Halting Problem Inputs: Turing Machine String Question: Does halt on ?
19 THEOREM The halting problem is undecidable
20 THEOREM The halting problem is undecidable PROOF Assume for contradiction that the halting problem is decidable
21 There exists Turing Machine that solves the halting problem YES or NO YES:accepts NO: Doesn’t accept
22 Initial tape contents Encoding of String YES NO
23 Construct machine : If returns YES then loop forever If returns NO then halt
24 NO Loop forever
25 Construct machine Input: If halts on input then loop forever Else halt : (machine )
27 Run machinewith input itself
28 Run machine Input: If halts on input then loop forever Else halt : (machine )
29 on input If halts then loops forever If doesn’t halt then it halts : NONSENSE !!!!!
30 Therefore, we have contradiction The halting problem is undecidable END OF PROOF
31 Another proof of the same theorem If the halting problem was decidable then every recursively enumerable language would be recursive
32 THEOREM The halting problem is undecidable PROOF Assume for contradiction that the halting problem is decidable
33 Turing Machine solves the halting problem For inputs:machineand string Returns: halts on input YES: if doesn’t halt on input NO: if
34 Let be a recursively enumerable language Let be the Machine that accepts We will prove that is recursive We will describe a membership algorithm
35 Run with inputs: and If Returns: doesn’t halt on inputNO: Thendoesn’t accept
36 If Returns: halts on input YES: Run with input will halt, and either accept or reject
37 Thereforeis recursive But there are recursively enumerable languages which are not recursive Contradiction!!!!
38 Therefore, the halting problem is undecidable END OF PROOF
40 Problem is reduced to problem If is decidable then is decidable means
41 Problem is reduced to problem If is undecidable then is undecidable also means
42 Example: The halting problem is reduced to The state-entry problem
43 The state-entry problem Inputs: Turing Machine State Question: Does String enter state on input ?
44 THEOREM The state-entry problem is undecidable
45 THEOREM The state-entry problem is undecidable PROOF Reduce the halting problem to the state-entry problem
46 Suppose we have an algorithm for the state-entry problem We will construct an algorithm for the halting problem
47 Inputs for the halting problem A machine A string Algorithm for halting problem must determine if halts on input
48 Modify machine : Add new state From any halting state add transitions to halting states Single halt state
49 halts if and only if halts on state
50 Algorithm for halting problem: Inputs:and 1. Construct with state 2. Run algorithm for state-entry problem with inputs:,,
51 GenerateState-entry machine Halting problem machine YES NO
52 Since the halting problem is undecidable, the state-entry problem is also undecidable END OF PROOF
53 Another example: The halting problem is reduced to The blank-tape halting problem
54 The blank-tape halting problem Input: Turing Machine Question: Doeshalt when started with a blank tape?
55 THEOREM The blank-tape halting problem is undecidable
56 THEOREM PROOF Reduce halting problem to Blank-tape halting problem The blank-tape halting problem is undecidable
57 Suppose we have an algorithm for the blank-tape halting problem We will construct an algorithm for the halting problem
58 Inputs for the halting problem A machine A string Algorithm for halting problem must determine if halts on input
59 Construct a new machine On blank tape writes Then continues execution like
60 halts if and only if halts when started with blank tape
61 Algorithm for halting problem: Inputs:and 1. Construct 2. Run algorithm for blank-tape halting problem with input,,
62 Generate blank-tape halting machine Halting problem machine YES NO
63 Since the halting problem is undecidable, the blank-tape halting problem is also undecidable END OF PROOF
Linear Bounded Automata LBAs
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.
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.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
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)
Costas Busch - RPI1 NPDAs Accept Context-Free Languages.
Recursively Enumerable and Recursive Languages
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.
Homework #9 Solutions.
© 2021 SlidePlayer.com Inc. All rights reserved.