NFA to DFA Conversion

1 / 14

# NFA to DFA Conversion - PowerPoint PPT Presentation

NFA to DFA Conversion. Rabin and Scott (1959). 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. . NFA- λ. p2. λ. p1. a. p3. q1. λ. λ. p5. λ. q2. a. p4.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'NFA to DFA Conversion' - onaona

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### NFA to DFA Conversion

Rabin and Scott (1959)

L12NFA2DFA

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.

L12NFA2DFA

NFA-λ

p2

λ

p1

a

p3

q1

λ

λ

p5

λ

q2

a

p4

L12NFA2DFA

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- λ

L12NFA2DFA

{q1,…,qn}

{p1,…,pm}

a

For every pi, there exists qj such that

L12NFA2DFA

Start state of DFA =

Final/Accepting state of DFA =

All subsets of states of NFA-λ

that contain an accepting state

of the NFA-λ

L12NFA2DFA

Example

a

b

q1

a

q0

a+c*b*

λ

a

q2

c

L12NFA2DFA

{q0}

{q0}

{q0,q1,q2}

a

b

c

f

L12NFA2DFA

{q0}

{q0,q1,q2}

a

b

c

f

a

b

{q1}

c

{q1,q2}

a,b,c

L12NFA2DFA

b

{q1}

a,c

f

c

{q1}

b

{q1,q2}

a

f

L12NFA2DFA

Equivalent DFA

a

a

{q0}

{q0,q1,q2}

c

c

{q1,q2}

b

b,c

b

b

a,c

{q1}

f

a

a,b,c

L12NFA2DFA