Linear Bounded Automata LBAs Costas Busch RPI 1
Linear Bounded Automata LBAs Costas Busch - RPI 1
Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the only tape space allowed to use Costas Busch - RPI 2
Linear Bounded Automaton (LBA) Input string Left-end marker Working space in tape Right-end marker All computation is done between end markers Costas Busch - RPI 3
We define LBA’s as Non. Deterministic Open Problem: Non. Deterministic LBA’s have same power with Deterministic LBA’s ? Costas Busch - RPI 4
Example languages accepted by LBAs: LBA’s have more power than NPDA’s LBA’s have also less power than Turing Machines Costas Busch - RPI 5
The Chomsky Hierarchy Costas Busch - RPI 6
Unrestricted Grammars: Productions String of variables and terminals Costas Busch - RPI 7
Example unrestricted grammar: Costas Busch - RPI 8
Theorem: A language is recursively enumerable if and only if is generated by an unrestricted grammar Costas Busch - RPI 9
Context-Sensitive Grammars: Productions String of variables and terminals and: Costas Busch - RPI 10
The language is context-sensitive: Costas Busch - RPI 11
Theorem: A language is context sensistive if and only if is accepted by a Linear-Bounded automaton Observation: There is a language which is context-sensitive but not recursive Costas Busch - RPI 12
The Chomsky Hierarchy Non-recursively enumerable Recursively-enumerable Recursive Context-sensitive Context-free Regular Costas Busch - RPI 13
Decidability Costas Busch - RPI 14
Consider problems with answer YES or NO Examples: • Does Machine • Is string • Does DFA have three states ? a binary number? accept any input? Costas Busch - RPI 15
A problem is decidable if some Turing machine decides (solves) the problem Decidable problems: • Does Machine • Is string • Does DFA have three states ? a binary number? accept any input? Costas Busch - RPI 16
The Turing machine that decides (solves) a problem answers YES or NO for each instance of the problem Input problem instance Turing Machine YES NO Costas Busch - RPI 17
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 Costas Busch - RPI 18
Turing Machine that decides a problem YES states NO states YES and NO states are halting states Costas Busch - RPI 19
Difference between Recursive Languages and Decidable problems For decidable problems: The YES states may not be final states Costas Busch - RPI 20
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 Costas Busch - RPI 21
The Membership Problem Input: • Turing Machine • String Question: Does Costas Busch - RPI accept ? 22
Theorem: The membership problem is undecidable (there and decide whether Proof: for which we cannot ) Assume for contradiction that the membership problem is decidable Costas Busch - RPI 23
Thus, there exists a Turing Machine that solves the membership problem YES accepts NO rejects Costas Busch - RPI 24
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 Costas Busch - RPI 25
Turing Machine that accepts and halts on any input accepts ? YES accept NO reject Costas Busch - RPI 26
Therefore, is recursive Since is chosen arbitrarily, every recursively enumerable language is also recursive But there are recursively enumerable languages which are not recursive Contradiction!!!! Costas Busch - RPI 27
Therefore, the membership problem is undecidable END OF PROOF Costas Busch - RPI 28
Another famous undecidable problem: The halting problem Costas Busch - RPI 29
The Halting Problem Input: • Turing Machine • String Question: Does Costas Busch - RPI halt on input ? 30
Theorem: The halting problem is undecidable (there and for which we cannot decide whether halts on input ) Proof: Assume for contradiction that the halting problem is decidable Costas Busch - RPI 31
Thus, there exists Turing Machine that solves the halting problem YES halts on NO doesn’t halt on Costas Busch - RPI 32
Construction of Input: initial tape contents YES NO Encoding of String Costas Busch - RPI 33
Construct machine : If returns YES then loop forever If returns NO then halt Costas Busch - RPI 34
Loop forever YES NO Costas Busch - RPI 35
Construct machine Input: If : (machine ) halts on input Then loop forever Else halt Costas Busch - RPI 36
copy Costas Busch - RPI 37
Run machine Input: If with input itself: (machine ) halts on input Then loop forever Else halt Costas Busch - RPI 38
on input : If halts then loops forever If doesn’t halt then it halts NONSENSE !!!!! Costas Busch - RPI 39
Therefore, we have contradiction The halting problem is undecidable END OF PROOF Costas Busch - RPI 40
Another proof of the same theorem: If the halting problem was decidable then every recursively enumerable language would be recursive Costas Busch - RPI 41
Theorem: The halting problem is undecidable Proof: Assume for contradiction that the halting problem is decidable Costas Busch - RPI 42
There exists Turing Machine that solves the halting problem YES halts on NO doesn’t halt on Costas Busch - RPI 43
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 Costas Busch - RPI 44
Turing Machine that accepts and halts on any input NO halts on ? reject YES accept Run with input Halts on final state reject Halts on non-final state Costas Busch - RPI 45
Therefore is recursive Since is chosen arbitrarily, every recursively enumerable language is also recursive But there are recursively enumerable languages which are not recursive Contradiction!!!! Costas Busch - RPI 46
Therefore, the halting problem is undecidable END OF PROOF Costas Busch - RPI 47
- Slides: 47