1 / 14

Regular Expression -> NFA with an input string

Regular Expression -> NFA with an input string . Brian K. Strickland. Λ -NFA for Regular Expression ( aab )*(a + aba )*. a. 1. 2. a. a. b. Λ. 0. 3. a. a. 4. 5. b. Computation Tree for Input String: aababa. Λ. a. a. 0. 0. a. 1. 1. 4. 5. 4. 4. 2. 5. a. a. a. b.

cecile
Download Presentation

Regular Expression -> NFA with an input string

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Regular Expression -> NFA with an input string Brian K. Strickland

  2. Λ-NFA for Regular Expression (aab)*(a + aba)* a 1 2 a a b Λ 0 3 a a 4 5 b

  3. Computation Tree for Input String: aababa Λ a a 0 0 a 1 1 4 5 4 4 2 5 a a a b b Λ 3 3 3 3 3 3 3 a a a a b a

  4. Regular Expression: (aab)*(a + aba)*Input String: aababa 2 0 5 5 1 1 0 4 4 4 a Λ 1 2 a a a a a b a a a Λ 3 3 3 3 3 3 3 b b 0 3 Λ a a a a a a b 4 5 b a

  5. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a

  6. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a

  7. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a

  8. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a

  9. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a

  10. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a

  11. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a

  12. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a

  13. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 Accepted! 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a Accepted!

  14. Regular Expression: (aab)*(a + aba)*Input String: aababa 1 a Λ 1 2 0 a a a a 1 a b 4 a a a 2 Λ 4 0 Accepted! 3 3 3 3 3 3 3 b b 3 Λ 0 5 a a a a a a 4 b 4 5 b 5 a • The key is the lambda transition from the Kleene star operation (*) which allows the regular expression to transition to the accepting state of the NFA. Accepted!

More Related