Beruflich Dokumente
Kultur Dokumente
Syllabus:
Languages and Grammars Finite State
Machines State machines and languages
Turing
Machines Computational Complexity
computability Decidability Church's Thesis
1
Languages and
Grammars
Language
A language L over an alphabet is a subset
of * ,L * . A language may
be empty.
Here you should note a point L = { },a
language containing an empty string is not an
empty language.
2
Languages and
Grammar
Grammars
type 3
(regular langs)
CFLs (type 2 langs)
CSLs (type 1 Langs)
Recursive Languages
Recursively Enumerable(type 0) languages
All Languages
Finite State
Finite
Automaton
Machines
Input
String
Output
Finite
Automaton
String
Q : set of states
: input alphabet
: transition function
q0 : initial state
F : set of final states
9
M Q, , , q0 , F
Q : set of states
: input alphabet
: transition function
q0 : initial state
F : set of final states
11
12
13
14
15
16
17
18
Turing
1. Finite automata (DFAs, NFAs, etc.):
Machines
1. limited input
tape: one-way, read-only
2. no working-memory
3. finite-control store (program)
2. PDAs:
1. limited input tape: one-way, read-only
2. one additional stack as working memory
3. finite-control store (program)
3. Turing machines (TMs):
1. a semi-infinite tape storing input and supplying
additional working storage.
2. finite control store (program)
3. can read/write and two-way(move left and right) depending
on the program state and input symbol scanned.
19
left-end
input: x
x1 x2 x3 x4 x5 ..
xn
no right-end for TM
initial state
.
.
permitted actions:
1. write
2. move left/right
depending on scanned symbol
and current state
current
state
control store (program)
20
An instruction of a TM is a tuple:
(q, a, p,
d) Q x G x Q x (G U {L,R})
where
1. q is the current state
2. a is the symbol scanned by the tape head
3. (q,a) define a precondition that the machine may encounter
4. (p,d) specify the actions to be done by the TM once the machine is in a condition
matching the precondition (i.e., the symbol scanned by the tape head is a and
the machine is at state q )
5. p is the next state that the TM will enter
6. d is the action to be performed:
1. d = b G means write the symbol b to the tape cell currently scanned by
the tape head.
2. d = R (or L) means move the tape head one tape cell in the right (or left,
respectively) direction.
A Deterministic TM program d is simply a set of TM instructions (or more formally a
function: d: Q x G --> Qx (G U{L,R}))
21
23
Finite automata
(DFA, NFA)
regular expressions
linear grammars
Pushdown automata
Recursive Languages
R.E. (Recursively
enumerative, type 0)
Languages
Turing machines
GPSG(type 0, general
phrase-structure,
unrestricted) grammar
24
Computational
Complexity
25
26
27
Decidabilit
y
28
29
30
31
32
Church's
Any mechanical computation
performedThesis
by a Turing Machine
can
be
Examples
[Last class and PS4] Equivalence of TM and
2-stack deterministic PDA + -transitions
[PS4] Making the tape infinite in both
directions adds no power
[Soon] Adding a second tape adds no power
[Church] Lambda Calculus is equivalent to
TM
[Chomsky]
Unrestricted
replacement
grammars are equivalent to TM
[Takahara and Yokomori] DNA is at least as
powerful as a TM
[Hotly Debated] Is the human brain 34
equivalent to a TM?
As stated by Kleene:
Every effectively calculable function
(effectively decidable predicate) is
general recursive.
35
36