Download presentation
Presentation is loading. Please wait.
Published byTre Hilderbrand Modified over 9 years ago
1
CMSC 330 - Spring 20111 Finite Automaton: Example 1 0 0 1 0 1 1 accepted
2
CMSC 330 - Spring 20112 Finite Automaton: Example 2 0 0 1 0 1 0 not accepted
3
Reducing REs to NFAs CMSC 330 - Spring 20113 ab b ε a b ✓
4
NFA for (ab|ba)* CMSC 330 - Spring 20114 (ab|ba)* b(ab|ba)* a(ab|ba)* ab ✓ b a
5
NFA for (ab|aba)* CMSC 330 - Spring 20115 (ab|aba)* b(ab|aba)* ba(ab|aba)* aa ✓ b a a(ab|aba)* b
6
CMSC 330 - Spring 20116 NFA DFA Example 1 r 0 = {S1} R = {r 0 } = { {S1} } r R = {S1} move({S1}, a} = {S2,S3} R = R ∪ {{S2,S3}} = { {S1}, {S2,S3} } = ∪ { } move({S1},b} = Ø R = R ∪ {Ø} = { Ø, {S1}, {S2,S3} } = ∪ { } b S1S2S3 a a a {S2,S3} {S1} NFA DFA ∅ b
7
CMSC 330 - Spring 20117 NFA DFA Example 1 (cont.) R = { {S1}, {S2,S3}, Ø } r R = {S2,S3} move({S2,S3},a} = Ø move({S2,S3},b} = {S3} R = R ∪ {{S3} = { {S1}, {S2,S3} }, Ø, {S3} } = ∪ {, } b S1S2S3 a a ab {S3} {S1} NFA DFA ∅ b {S2,S3} a
8
CMSC 330 - Spring 20118 NFA DFA Example 1 (cont.) R = { {S1}, {S2,S3}, Ø, {S3} } r R = Ø move(Ø,a} = Ø move(Ø,b} = Ø R = { {S1}, {S2,S3} }, Ø, {S3} } = ∪ {, } b S1S2S3 a a ab {S1} NFA DFA ∅ b {S2,S3} a ab {S3}
9
CMSC 330 - Spring 20119 NFA DFA Example 1 (cont.) R = { {S1}, {S2,S3}, Ø, {S3} } r R = {S3} move({S3},a} = Ø move({S3},b} = Ø R = { {S1}, {S2,S3} }, Ø, {S3} } = ∪ {, } F d = {{S2,S3}, {S3}} Since S3 F n Done! b S1S2S3 a a NFA DFA ab {S1} ∅ b {S2,S3} a ab {S3} a,b
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.