1 / 30

Introduction to Computability Theory

Introduction to Computability Theory. Discussion1: Conversion of A DFA to a Regular Expression Prof. Amos Israeli. Ripping a state from a GNFA(rem.).

ghalib
Download Presentation

Introduction to Computability Theory

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. Introduction to Computability Theory Discussion1: Conversion of A DFA to a Regular Expression Prof. Amos Israeli

  2. Ripping a state from a GNFA(rem.) Given a GNFA G, any state of G, not including and , can be ripped off G, while preserving .This is demonstrated in the next slide by considering a general state, denoted by , and an arbitrary pair of states, and :

  3. Removing a state from a GNFA Before Ripping After Ripping Note: This should be done for every pair of incoming and outgoing transitions.

  4. Ellaboration Assume the following situation:In order to rip , all pairsof incoming and outgoingtransitions should be considered in the way showed on the previous slide namely consider one after the other. After that can be ripped while preserving .

  5. The Conversion Algorithm - Outline The conversion algorithm has 3 stages: • Converting a DFA D with k states to an equivalent GNFA G with states . • Repeatedly ripping an arbitrarily chosen state of G while preserving its functionality until remaining with a 2 states equivalent GNFA with two states. • Return the RE labeling remaining transition.

  6. Exercise Apply the algorithm to obtain the regular expression equivalent to D: What is the equivalent Regular expression?

  7. Stage 1: Convert D to a GNFA 1.0 Start with D

  8. Stage 1: Convert D to a GNFA 1.1 Add 2 new states

  9. Stage 1: Convert D to a GNFA 1.2 Make the initial state and the finalstate.

  10. Stage 1: Convert D to a GNFA 1.3 Replace multi label transitions by their union.

  11. Stage 1: Convert D to a GNFA 1.4 Add all missing transitions and label them .

  12. Stage 2: Rip a state 2.0 Start with G.

  13. Stage 2: Rip a state 2.1 Choose an arbitrary state to be ripped.

  14. Stage 2: Rip a state 2.1 Remove all -labeled incoming and outgoing transitions. (Note: This stage does not appear in the book). 2.3 Replace each pair of incoming and outgoing transitions using the procedure we showed before.

  15. Stage 2: Rip a state Reminder: if the incoming transition from to is labeled , the self-loop of , , the transition from to with , and the transition from to is labeled with then the new label from to is labeled .Also note: for any regular expression R,

  16. Stage 2: Rip a state 2.1 Remove all - labeled incoming transitions.

  17. Stage 2: Rip a state 2.1 Remove all - labeled outgoing transitions.

  18. Stage 2: Rip a state 2.1 Remove all - labeled outgoing transitions.

  19. Stage 2: Rip a state 2.1 Remove transitions new label is .

  20. Stage 2: Rip a state 2.1 Now all incoming transitions are removed.

  21. Stage 2: Rip a state 2.2 Remove outgoing transitions.

  22. Stage 2: Rip a state 2.3 choose a new .

  23. Stage 2: Rip a state 2.1 Remove all - labeled incoming transitions.

  24. Stage 2: Rip a state 2.1 Remove all - labeled outgoing transitions.

  25. Stage 2: Rip a state 2.1 Remove all - labeled outgoing transitions.

  26. Stage 2: Rip a state 2.2 Remove transitions new label is . .

  27. Stage 2: Rip a state 2.3 Remove and all its transitions.

  28. Stage 2: Rip last state 2.3 Choose the last remaining state to be ripped.

  29. Stage 2: Rip a state 2.3 choose a new and repeat procedure.

  30. Stage 3: Return the remaining RE .

More Related