NFAvs DFA
NFAvs DFA
•One or more transitions: q q’ occurs
p
…
NFA vs DFA (2)
All deterministic automata are non deterministic
qi qj
Qi Qj
NFA DFA
q1 q1
q2
q2
q ...
q ...
qn
qn
qn pm
DFA: q1
q2
(S, )
...
qn
Step 2 : Eliminating e-Transitions
P’ P’’
e e …
e
(S, )
DFA: (S, )
P’
P’’
…
Step 3: Handling Undetermined Transitions
NFA:
qi a qj
DFA: qi a qj
b
b a
Step 4: Determining Favorable States
DFA:
NFA: q1
qi q2
...
qn
Examples
a
>s q r
b b
b
a
>s q r
e b
b
Proof
Given an NFA M = (Q,,,s,F) suppose that we use the
procedure discussed to obtain a DFA
M’ = (Q’,, ,s’,F’). What needs to be shown to prove that
M and M’ are equivalent?
w = 1 2 … n
Where each i is in
Proof (2)
•Proof by induction on the length n of the word
w = 1 2 … n
n=1
n = k n = k+1
qm
…
Select state qn-1 in sn-1
such that: n
sn-1 = (sn-2, n-1) qn-1 qn
Select state qn in sn
sn = (sn-1, n)
such that
qn is favorable in DFA
Dealing with e-transitions
P’ P’’
e e …
e
(S, )
D: (S, )
P’
P’’ … States
…
in
NFA
DFA:
We have: 1 2 n
s’ s1 … sn
We want: NFA:
’1 ’2 ’m mn
s q1 … qm
qn-1 n sn
e e
P
... ... … ... …
e e
n-1 P’ qm
qn-2
Main Result
• Use the procedure described in this class or the one in the book (they
have some small differences) to obtain the DFA equivalent to the NFA
that is on top of Slide # 12
– Also explain in words why these two automata are equivalent
• Exercise 1.11
• Problem 1.31
• Problem 1.37 (so for example, C3 is the set of all binary numbers that
are multiples of 3 including: 0, 11, 110, 1001, …)