1 / 25

NFSA Simulation with Deque

NFSA Simulation with Deque. Deque. Input Text. a. a. a. -1. a. a. a. a. a. a. a. a. a. a. a. a. a. b. d. a. top. bottom. state. label. a. . c. . 6. 7. 8. 9. . . d. 10. . 11. 12. 13. start. accept. . a. . . b. 1. 2. 3. 4. 5. .

jaclyn
Download Presentation

NFSA Simulation with Deque

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. NFSA Simulation with Deque Deque Input Text a a a -1 a a a a a a a a a a a a a b d a top bottom state label a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  2. NFSA Simulation with Deque Deque Input Text a 6 a 3 a -1 a a a a a a a a a a a a a b d a top bottom Push 3 and 6 since label =  state 10 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  3. NFSA Simulation with Deque Deque Input Text a a 3 -1 7 a a a a a a a a a a a a a b d a top bottom Enqueue 7 since label matches state 6 label a a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  4. NFSA Simulation with Deque Deque Input Text a 4 a 1 3 -1 7 a a a a a a a a a a a a b d a top bottom Push 1 and 4 since label =  state 3 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  5. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 a a a a a a a a a a a a b d a top bottom Do nothing since label mismatches state 4 label b a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  6. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 2 a a a a a a a a a a a a b d a top bottom Enqueue 2 since label matches state 1 label a a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  7. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 2 a -1 a a a a a a a a a a b d a top bottom Enqueue -1 and advance input state -1 label a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  8. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 2 -1 a a a a a a a a a a b d a top bottom Enqueue -1 and advance input state -1 label a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  9. NFSA Simulation with Deque Deque Input Text a a 1 -1 8 7 2 -1 a a a a a a a a a a b d a top bottom Push 8 since label =  state 7 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  10. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 2 -1 a a a a a a a a a a b d a top bottom Do nothing since label mismatches state 8 label c a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  11. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 3 2 -1 a a a a a a a a a a b d a top bottom Push 3 since label =  state 2 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  12. NFSA Simulation with Deque Deque Input Text a a 1 -1 4 7 1 2 -1 a a a a a a a a a a b d a top bottom Push 1 and 4 since label =  state 3 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  13. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 a a a a a a a a a a b d a top bottom Do nothing since label mismatches state 4 label b a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  14. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 2 a a a a a a a a a a b d a top bottom Enqueue 2 since label matches state 1 label a a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  15. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 2 -1 a a a a a a a a a b d a top bottom Enqueue -1 and advance input state -1 label a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  16. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 3 2 -1 a a a a a a a a b d a top bottom Push 3 since label =  state 2 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  17. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 4 -1 1 2 -1 a a a a a a a a b d a top bottom Push 1 and 4 since label =  state 3 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  18. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 1 -1 5 a a a a a a a a b d a top bottom Enqueue 5 since label matches state 4 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  19. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 1 -1 5 a a a a a a a b d a top bottom Do nothing since label mismatches state 1 label a a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  20. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 1 -1 5 a -1 a a a a a a b d a top bottom Enqueue -1 and advance input state -1 label a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  21. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 1 -1 11 5 -1 a a a a a a b d a top bottom Push 11 since label =  state 5 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  22. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 1 -1 12 5 -1 a a a a a a b d a top bottom Push 12 since label =  state 11 label  a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  23. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 1 -1 5 -1 13 a a a a a a b d a top bottom Enqueue 13 since label matches state 12 label d a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  24. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 1 -1 5 -1 13 a -1 a a a a b d a top bottom Enqueue -1 and advance input state -1 label a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

  25. NFSA Simulation with Deque Deque Input Text a a 1 -1 7 1 -1 1 -1 5 -1 -1 a a a a b d a top bottom STOP: match found state 13 label a  c  6 7 8 9   d 10  11 12 13 start accept  a   b 1 2 3 4 5 

More Related