{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

NFA- λ to NFA conversion

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

View Full Document
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
Input NFA M 1 with λ− transitions λ λ λ a a b b a,b 1 2 3 4 5

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

View Full Document
Compute all Λ− closures λ λ λ a a b b a,b 1 2 3 4 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}
Process State 1 λ λ λ a a b b a,b 1 2 3 4 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}

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

View Full Document
Process State 2 λ λ λ a a b b a,b 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 11

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

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

View Full Document
Ask a homework question - tutors are online