Professional Documents
Culture Documents
Lecture Notes On Automata
Lecture Notes On Automata
References
• Lecture Notes
Finite Automata
(a.k.a. Finite State Machines)
In CS1 used as simple models of reactive systems:
insert money
1 2 insert money
request ticket/print
request refund/deliver
request ticket
request refund
5
fast/dec
slow/inc
correct
set/store brake
ready set wait
resume
on on
on on
off
6
1
1
0,2−9
1
none
1 1 1 0 2
11 110 open
Languages
• Finite alphabet Σ.
• Alphabet: Σ = {0, 1}
• Languages:
L1 = ε, 0110, 1101, 111110
L2 = 0x | x ∈ Σ∗} (all binary strings starting with 0)
L3 = ∅ (the empty language)
L4 = {ε}
9
x1 = ε
x2 = dts@inf.ed.ac.uk
x3 = public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
• Languages:
L1 = {x1, x2, x3}
L2 = all syntactically correct JAVA programs
L3 = all correct English sentences
L4 = ∅
10
Σ alphabet
M finite automaton (acceptor) whose inputs are symbols from the alphabet Σ
x ∈ L ⇐⇒ M accepts x.
11
even odd
0
12
none
1 1 1 0 2
11 110 open
Example
1 1 0,1 1
0
0
1 2 1 2
0
deterministic non−deterministic
14
M = (Q, Σ, q0, F, δ)
consisting of:
even odd
δ 0 1
even odd even
odd even odd
16
1 1 0 2
none 1 11 110 open