1 / 25

NFA To DFA

NFA To DFA. a,b. a. 2+. -1. NFA – without . Convert the following NFA into DFA. NFA – without . We find transition table for NFA. NFA – without . Now we construct transition table for DFA T D (1,a) = T N (1,a) = {1,2} T D (1,b) = T N (1,b) = {1}

hallie
Download Presentation

NFA To DFA

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. NFA To DFA Dr. Shakir Al Faraji

  2. a,b a 2+ -1 NFA – without  Convert the following NFA into DFA Dr. Shakir Al Faraji

  3. NFA – without  We find transition table for NFA Dr. Shakir Al Faraji

  4. NFA – without  Now we construct transition table for DFA TD(1,a) = TN(1,a) = {1,2} TD(1,b) = TN(1,b) = {1} TD({1,2},a) = TN(1,a) U TN(2,a) = {1,2} UØ= {1,2} TD({1,2},b)=TN(1,b)UTN(2,b)={1}UØ={1} Dr. Shakir Al Faraji

  5. NFA – without  Ttransition table for DFA Dr. Shakir Al Faraji

  6. a b {1,2}+ {1} - b a NFA – without  Dr. Shakir Al Faraji

  7. a,b a y2+ -y1 NFA – without -another method Convert the following NFA into DFA Dr. Shakir Al Faraji

  8. a,b a,b a a,b y3 y2+ -y1 NFA – without  Convert the following NFA into DFA Dr. Shakir Al Faraji

  9. NFA – without  Dr. Shakir Al Faraji

  10. NFA – without  Dr. Shakir Al Faraji

  11. a Z2+ b Z1- b a a b a Z3+ Z4 b NFA – without  Dr. Shakir Al Faraji

  12. a,b a a a,b + - NFA – without  Example: convert the NFA into DFA Dr. Shakir Al Faraji

  13. NFA – with  - closure If s is an NFA state, then the lambda closure of s, denoted (s) , is the set of states that can be reached from s by traversing zero or more  edges. We can define (s) inductively as follows forany state s in an NFA. • s (s) • if p(s) and there is a  edge from p to q, then q (s). Dr. Shakir Al Faraji

  14.  a,  a b 1- 2 3 4 5+ a NFA with – Examples Dr. Shakir Al Faraji

  15. NFA with – Examples We find transition table for NFA Dr. Shakir Al Faraji

  16. NFA with – Examples We find - closure for five states of NFA (1) = {1,2} (2) = {2} (3) = {2,3} (4) = {2,3,4,5} (5) = {5} Dr. Shakir Al Faraji

  17. NFA with – Examples (S) = ({s1, … , sn}) = (s1) U . . . U (sn) Dr. Shakir Al Faraji

  18. NFA with – Examples We construct transition table for DFA TDab start {1,2} {2,3,4,5} TD({1,2}, a) =(TN(1,a) U TN(2,a)) = (ØU{3,4}) = ({3,4}) = (3) U  (4) ={2,3} U {2,3,4,5} ={2,3,4,5} Dr. Shakir Al Faraji

  19. NFA with – Examples We construct transition table for DFA TDa b start {1,2} {2,3,4,5} Ø TD({1,2}, b) =(TN(1,b) U TN(2,b)) = (ØU Ø) = Ø Dr. Shakir Al Faraji

  20. NFA with – Examples We construct transition table for DFA TDab start {1,2} {2,3,4,5} Ø TD({2,3,4,5}, a) = (TN(2,a) U TN(3,a) U TN(4,a) U TN(5,a) ) = {2,3,4,5} Dr. Shakir Al Faraji

  21. NFA with – Examples We construct transition table for DFA TDa b start {1,2} {2,3,4,5} Ø {2,3,4,5} {2,3,4,5} {2,3,4,5} ØØØ Dr. Shakir Al Faraji

  22. NFA with – Examples We construct transition table for DFA TDab start 1 2Ø Final 2 22 333 Dr. Shakir Al Faraji

  23. a,b a -1 2+ b 3 a,b NFA with – Examples Dr. Shakir Al Faraji

  24. b a a -1 4+ a   2 3 c NFA with – Examples Convert the following NFA into DFA Dr. Shakir Al Faraji

  25. END Dr. Shakir Al Faraji

More Related