0% found this document useful (0 votes)
136 views14 pages

NFA To DFA Conversion: Rabin and Scott (1959)

1) Rabin and Scott introduced the concept of converting a nondeterministic finite automaton (NFA) to a deterministic finite automaton (DFA) in 1959. 2) The conversion process simulates all moves of an NFA in parallel using a DFA by taking the λ-closure of states, which is the set of states reachable using only λ-transitions. 3) This allows the construction of a DFA that is equivalent to the original NFA where the states of the DFA are sets of states of the NFA and transitions are defined based on the λ-closure of NFA states.

Uploaded by

Rahul Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views14 pages

NFA To DFA Conversion: Rabin and Scott (1959)

1) Rabin and Scott introduced the concept of converting a nondeterministic finite automaton (NFA) to a deterministic finite automaton (DFA) in 1959. 2) The conversion process simulates all moves of an NFA in parallel using a DFA by taking the λ-closure of states, which is the set of states reachable using only λ-transitions. 3) This allows the construction of a DFA that is equivalent to the original NFA where the states of the DFA are sets of states of the NFA and transitions are defined based on the λ-closure of NFA states.

Uploaded by

Rahul Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

NFA to DFA Conversion

Rabin and Scott (1959)

Prasad L12NFA2DFA 1
Removing Nondeterminism

• By simulating all moves of an NFA-λ in


parallel using a DFA.

• λ-closure of a state is the set of states


reachable using only the λ-transitions.

Prasad L12NFA2DFA 2
NFA-λ

λ p2

a p1

λ
p3
q1 λ
λ p5

q2 a
p4

t ( q1, a )  { p1, p 2, p3, p 4, p5}


Prasad L12NFA2DFA 3
q1   - closure ( q1)
q2   - closure ( q1)

p3   - closure ( p1)

 - closure (U{qi }) 
i

U - closure(q )
i
i

Prasad L12NFA2DFA 4
Transition Function

t : Q    Powerset(Q )

t ( qi , a ) 

U  - closure ( ( q
q j  -closure ( qi )
j , a ))

t ( q1 , a )  U - closure( (q
q j { q1 , q 2 }
j , a ))

Prasad L12NFA2DFA 5
t ( q1 , a )   - closure ( ( q1 , a ))
  - closure ( ( q2 , a ))

t ( q1 , a )   - closure( p1 )   - closure( p4 )

t ( q1 , a )  { p1 , p2 , p3}  { p4 , p5}

Prasad L12NFA2DFA 6
Equivalence Construction
• Given NFA-λ M, construct a DFA DM such
that L(M) = L(DM).
• Observe that

– A node of the DFA = Set of nodes of NFA-λ

– Transition of the DFA = Transition among set of


nodes of NFA- λ

Prasad L12NFA2DFA 7
a
{q1,…,qn} {p1,…,pm}

For every pi, there exists qj such that


 ( q j ,  * a *)  pi
Prasad L12NFA2DFA 8
Start state of DFA =
 - closure ({q0 })

Final/Accepting state of DFA =


All subsets of states of NFA-λ
that contain an accepting state
of the NFA-λ

Dead state of DFA = 


Prasad L12NFA2DFA 9
Example

a q1 b
a

q0
λ a+c*b*

a
q2

Prasad L12NFA2DFA 10
{q0}

a {q0,q1,q2}
{q0}
b
c 

Prasad L12NFA2DFA 11
a

a b
{q0,q1,q2} {q1}
{q0}
b c
{q1,q2}
c 

a,b,c

Prasad L12NFA2DFA 12
b

{q1} a,c

c
b {q1}

{q1,q2} a

Prasad L12NFA2DFA 13
Equivalent DFA
a
a c
{q0} {q0,q1,q2} c
b {q1,q2}
b,c b
b
a,c
 {q1} a

a,b,c
Prasad L12NFA2DFA 14

You might also like