1 / 22

Transition graph (TG)

Transition graph (TG). Lecture 07. Recap Definition of TG continued …. Definition: A Transition graph (TG), is a collection of the followings Finite number of states, at least one of which is start state and some (maybe none) final states.

brownamy
Download Presentation

Transition graph (TG)

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. Transition graph (TG) Lecture 07 Instructor NaveedUllah Safi

  2. Recap Definition of TG continued … Definition: A Transition graph (TG), is a collection of the followings • Finite number of states, at least one of which is start state and some (maybe none) final states. • Finite set of input letters (Σ) from which input strings are formed. • Finite set of transitions that show how to go from one state to another based on reading specified substrings of input letters, possibly even the null string (Λ). Instructor NaveedUllah Safi

  3. Note • It is to be noted that in TG there may exist more than one paths for certain string, while there may not exist any path for certain string as well. If there exists at least one path for a certain string, starting from initial state and ending in a final state, the string is supposed to be accepted by the TG, otherwise the string is supposed to be rejected. Obviously collection of accepted strings is the language accepted by the TG. Instructor NaveedUllah Safi

  4. a,b a,b + Λ - Example • Consider the Language L , defined over Σ = {a, b} of all strings including Λ. The language L may be accepted by the following TG The language L may also be accepted by the following TG Instructor NaveedUllah Safi

  5. a,b  Example Continued … TG1 TG2 a,b  + a,b Instructor NaveedUllah Safi

  6. –– + Example Consider the language L of strings, defined over Σ={a, b},starting with b. The language L may be expressed by RE b(a + b)* , may be accepted by the following TG a,b b Instructor NaveedUllah Safi

  7. Example • Consider the language L of strings, defined over Σ={a, b},notending in b. The language L may be expressed by RE Λ + (a + b)*a, may be accepted by the following TG a,b a –– + Λ + Instructor NaveedUllah Safi

  8. Example Consider the Language L of strings, defined over Σ = {a, b}, containing double a. The language L may be expressed by the following regular expression (a+b)* (aa) (a+b)*. This language may be accepted by the following TG Instructor NaveedUllah Safi

  9. Example Continued … b,a b,a aa 1- 2+ Instructor NaveedUllah Safi

  10. Example Consider the language L of strings, defined over Σ={a, b},having double a or double b. The language L can be expressed by RE (a+b)* (aa + bb) (a+b)*. The above language may also be expressed by the following TGs. Instructor NaveedUllah Safi

  11. Example continued … x a a a,b a,b –– + b b y Instructor NaveedUllah Safi

  12. OR a,b a,b aa,bb - + Instructor NaveedUllah Safi

  13. OR a,b a,b aa 1- 2+ a,b a,b bb 3- 4+ Instructor NaveedUllah Safi

  14. Note • In the above TG if the states are not labeled then it may not be considered to be a single TG Instructor NaveedUllah Safi

  15. Example Consider the language L of strings, defined over Σ={a, b},having triple a or triple b. The language L may be expressed by RE (a+b)* (aaa + bbb) (a+b)* This language may be accepted by the following TG Instructor NaveedUllah Safi

  16. 1– 6+ Example Continued … a 2 4 a a a,b a,b b b 3 b 5 Instructor NaveedUllah Safi

  17. OR a,b a,b aaa,bbb - + Instructor NaveedUllah Safi

  18. OR a,b a,b aaa 1- 2+ a,b a,b bbb 3- 4+ Instructor NaveedUllah Safi

  19. Example Consider the language L of strings, defined over Σ = {a, b}, beginning and ending in different letters. The language L may be expressed by RE a(a + b)*b + b(a + b)*a The language L may be accepted by the following TG Instructor NaveedUllah Safi

  20. Example continued … a, b 4+ b 2 a 1- a,b b a 3 5+ Instructor NaveedUllah Safi

  21. Example • Consider the Language L of strings of length two or more, defined over Σ = {a, b}, beginning with and ending in same letters. The language L may be expressed by the following regular expression a(a + b)*a + b(a + b)*b This language may be accepted by the following TG Instructor NaveedUllah Safi

  22. a, b 4+ a 2 a 1- a,b b b 3 5+ Example Continued … Instructor NaveedUllah Safi

More Related