15-Chomsky-Hierarchy

advertisement
Turing Machines (TMs)
Linear Bounded Automata
(LBAs)
Fall 2003
Costas Busch - RPI
1
Turing Machine (TM)
Input string
a b c d e
Finite State
Control Unit
Infinite Tape
a b c d e
Working space
in tape
Fall 2003
Costas Busch - RPI
2
Linear Bounded Automaton (LBA)
Input string
[ a b c d e ]
Left-end
marker
Working space
in tape
Finite State
Control Unit
Right-end
marker
All computation is done between end markers
Fall 2003
Costas Busch - RPI
3
We define LBA’s as NonDeterministic
Open Problem:
NonDeterministic LBA’s
have same power with
Deterministic LBA’s ?
Fall 2003
Costas Busch - RPI
4
Example languages accepted by LBAs:
L  {a b c }
n n n
L  {a }
n!
LBA’s have more power than NPDA’s
LBA’s have also less power
than Turing Machines
Fall 2003
Costas Busch - RPI
5
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
Fall 2003
Costas Busch - RPI
6
The Chomsky Hierarchy
Fall 2003
Costas Busch - RPI
7
Unrestricted Grammars:
Productions
u v
String of variables
and terminals
Fall 2003
String of variables
and terminals
Costas Busch - RPI
8
Example unrestricted grammar:
S  aBc
aB  cA
Ac  d
Fall 2003
Costas Busch - RPI
9
Theorem:
A language L is recursively enumerable
(r.e.) if and only if L is generated by an
unrestricted grammar
S is r.e. if there
exists an algorithm A
that enumerates the
members of S (A need
not necessarily
terminate for nonmembers of S)
Fall 2003
S is recursive if there
exists a decision
algorithm that
determines if x is a
member of S
Costas Busch - RPI
10
Context-Sensitive Grammars:
Productions
u v
String of variables
and terminals
and:
Fall 2003
String of variables
and terminals
|u|  |v|
Costas Busch - RPI
11
The language
n n n
{a b c }
is context-sensitive:
S  abc | aAbc
Ab  bA
Ac  Bbcc
bB  Bb
aB  aa | aaA
Fall 2003
Costas Busch - RPI
12
Theorem:
A language
L
L is context sensitive
if and only if
is accepted by a Linear-Bounded Automaton
Fall 2003
Costas Busch - RPI
13
The Chomsky Hierarchy
Non-recursively enumerable
Recursively-enumerable
Recursive
Context-sensitive
Context-free
Regular
Fall 2003
Costas Busch - RPI
14
Download