Nfa to dfa conversion l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 14

NFA to DFA Conversion PowerPoint PPT Presentation


  • 359 Views
  • Uploaded on
  • Presentation posted in: General

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.

Download Presentation

NFA to DFA Conversion

An Image/Link below is provided (as is) to download presentation

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 l.jpg

NFA to DFA Conversion

Rabin and Scott (1959)

L12NFA2DFA


Removing nondeterminism l.jpg

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


Slide3 l.jpg

NFA-λ

p2

λ

p1

a

p3

q1

λ

λ

p5

λ

q2

a

p4

L12NFA2DFA


Slide4 l.jpg

L12NFA2DFA


Transition function l.jpg

Transition Function

L12NFA2DFA


Slide6 l.jpg

L12NFA2DFA


Equivalence construction l.jpg

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


Slide8 l.jpg

{q1,…,qn}

{p1,…,pm}

a

For every pi, there exists qj such that

L12NFA2DFA


Slide9 l.jpg

Start state of DFA =

Final/Accepting state of DFA =

All subsets of states of NFA-λ

that contain an accepting state

of the NFA-λ

Dead state of DFA =

L12NFA2DFA


Example l.jpg

Example

a

b

q1

a

q0

a+c*b*

λ

a

q2

c

L12NFA2DFA


Slide11 l.jpg

{q0}

{q0}

{q0,q1,q2}

a

b

c

f

L12NFA2DFA


Slide12 l.jpg

{q0}

{q0,q1,q2}

a

b

c

f

a

b

{q1}

c

{q1,q2}

a,b,c

L12NFA2DFA


Slide13 l.jpg

b

{q1}

a,c

f

c

{q1}

b

{q1,q2}

a

f

L12NFA2DFA


Equivalent dfa l.jpg

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


  • Login