NFALtoNFA - NFA- to NFA conversion Purpose This...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
NFA- λ to NFA conversion
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Purpose • This presentation presents an example execution of the algorithm which takes as input an NFA with λ -transitions and produces as output an equivalent NFA without λ - transitions • Algorithm Specification – Input: NFA M 1 with λ -transitions – Output: NFA M 2 without λ -transitions
Background image of page 2
Input NFA M 1 with λ− transitions λ λ λ a a bb a,b 1 2 34 5
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Compute all Λ− closures λ λ λ a a bb a,b 1 2 34 5 While this step is not necessary, it does make all future steps simpler. Compute Λ ({i}) for 0 < i < 6 Λ ({1}) = {1,2,3} Λ ({2}) = {2} Λ ({3}) = {3} Λ ({4}) = {4} Λ ({5}) = {5,1,2,3} = {1,2,3,5}
Background image of page 4
Process State 1 λ λ λ a a bb a,b 1 2 34 5 Compute δ * (1,b) First compute Λ ({1}) Λ ({1}) = {1,2,3} Now compute δ(Λ ({1}) ,b) δ (1,b) = {} δ (2,b) = {4} δ (3,b) = {3} δ(Λ ({1}) ,b) = {3,4} Finally compute Λ ( δ(Λ ({1}) ,a)) = Λ ({3,4}) Λ ({3}) = {3} Λ ({4}) = {4} Λ ( δ(Λ ({1}) ,b)) = {3,4} δ * (1,b) = {3,4} Compute δ * (1,a) First compute Λ ({1}) Λ ({1}) = {1,2,3} Now compute δ(Λ ({1}) ,a) δ (1,a) = {} δ (2,a) = {2} δ (3,a) = {4} δ(Λ ({1}) ,a) = {2,4} Finally compute Λ ( δ(Λ ({1}) ,a)) = Λ ({2,4}) Λ ({2}) = {2} Λ ({4}) = {4} Λ ( δ(Λ ({1}) ,a)) = {2,4} δ * (1,a) = {2,4}
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Process State 2 λ λ λ a a bb a,b 1 2 34 5
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/25/2008 for the course CSE 460 taught by Professor Torng during the Fall '07 term at Michigan State University.

Page1 / 11

NFALtoNFA - NFA- to NFA conversion Purpose This...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online