COMP3630/6360: Theory of Computation Semester 1, 2020 The Australian National University Finite Automata
1 / 24
COMP3630/6360: Theory of Computation Semester 1, 2020 The - - PowerPoint PPT Presentation
COMP3630/6360: Theory of Computation Semester 1, 2020 The Australian National University Finite Automata 1 / 24 COMP3630/6363: Theoory of Computation Textbook. Introduction to Automata Theory, Languages and Computation John E. Hopcroft,
1 / 24
2 / 24
1
3 / 24
Deterministic Finite Automata Nondeterministic Finite Automata NFA with ǫ-transitions An Equivalence among the above three.
5 / 24
The Deterministic Finite Automaton
s1 s2 s3 s‘ : : : [Input tape] Finite Control q0 q1 q3 q4 q5 q2 [Movable Reading Head]
6 / 24
The Deterministic Finite Automaton
Transition Table: Transition Diagram: q0 q1 q2 1 q2 q2 q0 q1 q1 q1 ∗ F = {q1} ‹(q0; 0) = q2 ‹(q0; 1) = q0 q0 q1 q2 1 1 0; 1
7 / 24
Languages accepted by DFAs
s1
s2
s3
sk
8 / 24
Languages accepted by DFAs
q0 q1 q2 1 1 0; 1 A:
1
9 / 24
Languages accepted by DFAs
10 / 24
Non-deterministic Finite Automaton (NFA)
11 / 24
Languages Accepted by NFAs
δ(q,w)
. . . . . . . . . . . . w s s ˆ ‹(q; ws)
s1
s2
s3
sk
12 / 24
Languages Accepted by NFAs
q0 q1 q2 q2 ∗ q0 q1 q2 1 0; 1 0; 1 1 q0 {q0; q1} q2 ∅ ∅
1
1
1
1
1
13 / 24
Languages Accepted by NFAs
14 / 24
Languages Accepted by NFAs
q0 q1 q2 1 0; 1 0; 1
∅ {q0} {q1} {q2} {q1; q2} {q0; q1} {q0; q2} {q0; q1; q2}
N : D :
15 / 24
Languages Accepted by NFAs
p∈P δN(p, s). P P 0 s N: D : P P 0 − ! s ⇔
def
def
def
def
δN(q0,w)
ind
δD({q0},w)
def
def
16 / 24
Languages Accepted by NFAs
q0 q1 q2 1 0; 1 0; 1
∅ {q0} {q1} {q2} {q1; q2} {q0; q1} {q0; q2} {q0; q1; q2} 0; 1 1 0; 1 0; 1 0; 1 1 1 1 D : 17 / 24
Transtions without Symbol Reading
q0 q1 q2 q3 q4 q5 q6 › › › › › a b ∗
q0 q1 q2 › a b q3 q4 q5 q6 {q2} {q3} {q5} {q6} ∅ {q1; q4} ∅ ∅ ∅ ∅ ∅ {q3} ∅ ∅ ∅ ∅ ∅ ∅ ∅ ∅ ∅
18 / 24
Transtions without Symbol Reading
q0 q1 q2 q3 q4 q5 q6 › › › a b › ›
19 / 24
Transtions without Symbol Reading
› › q › : : : › = ›2 = ›3 = · · · q1 q0
finitely many
finitely many
δ(q,w)
w ˆ ‹(q; w) s › ˆ ‹(q; ws)
20 / 24
Transtions without Symbol Reading
› › › : : : q0 p1 pr ∈ F
w = s1s2 · · · sk ∈ L(A) ⇔ › › ›
: : :
› p1 p2 s1 s2 sk p1
. . . : : : : : :
› › › › › ›
: : :
› › › ›
pk pk−1 pk
qF ∈ F
q0 ∃ a path such as the following
21 / 24
Transtions without Symbol Reading
0, FN′) as follows:
0 = q0
N = {q ∈ QN : ECLOSE(q) ∩ FN = ∅}
› › q › : : : s p N : p0 N0 : p0 q s m N : N0: q can transition to p0 after reading s. q can transition to p0 after a few ›-transitions, and a single read of s ∈ Σ.
22 / 24
Transtions without Symbol Reading
N : m p1 p2 s2 sk pk ⇔ q s1 . . . ECLOSE(pk) \ FN 6= ; N0 : m s1 : : : sk is accepted by ›-NFA N s1 : : : sk is accepted by NFA N0 › ›
q0
› : : : › p1 p2 s1 s2 sk p1 . . . : : : : : : › › › › › › : : : › › › › pk pk−1 pk
23 / 24
Transtions without Symbol Reading
24 / 24