1 / 30

Regular Expressions and Non-regular Languages

Regular Expressions and Non-regular Languages. http://cis.k.hosei.ac.jp/~yukita/. Expressions and their values. Definition 1.26. The values of atomic expressions. Example 1.27. Units for the binary operations. Theorem 1.28.

argus
Download Presentation

Regular Expressions and Non-regular Languages

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 Expressions and Non-regular Languages http://cis.k.hosei.ac.jp/~yukita/

  2. Expressions and their values

  3. Definition 1.26

  4. The values of atomic expressions

  5. Example 1.27

  6. Units for the binary operations

  7. Theorem 1.28 • A language is regular if and only if some regular expression describes it. We break down this theorem as follows. • Lemma 1.29 • If a language is described by a regular expression, then it is regular. • Lemma 1.32 • If a langulage is regular, then it is described by a regular expression.

  8. Proof of Lemma 1.29 a Next three slides Proof of Lemma 1.29

  9. Case 4: Let N1, N2, and N correspond to R1, R2, and R, respectively. N N1 e e N2 Proof of Lemma 1.29

  10. N2 N1 Case 5: Let N1, N2, and N correspond to R1, R2, and R, respectively. N e e Proof of Lemma 1.29

  11. N1 Case 6: Let N1 and N correspond to R1 and R, respectively. N e e e Proof of Lemma 1.29

  12. Generalized Nondeterministic Finite Automaton • is roughly a NFA in which the transition arrows may have regular expressions as labels. • We assume the following standard form for convenience, which can always be attained with an easy modification. • There is only one accept state and different from the start state. • The start state has transition arrows going to every other state but no arrows coming in from any other state. • There is only a single accept state, and it has arrows coming in from any other state but no arrows going to any other state. • Except for the start and accept states, one arrow goes from every state to every other state and also from each state to itself.

  13. Standard Form of GNFA ...

  14. Standard Form of GNFA

  15. Equivalent GNFA with one fewer state R4 qi qj qi qj R1 R3 qrip R2

  16. Definition 1.33

  17. Computation with GNFA

  18. Converting GNFA

  19. Claim 1.34 For any GNFA G, Convert(G) is equivalent to G.

  20. Proof continued

  21. Non-regularity

  22. Theorem 1.37 Pumping Lemma

  23. Proof of Th 1.37

  24. Example 1.38

  25. Example 1.39

  26. Alternative proof of 1.39

  27. Example 1.40

  28. Example 1.41 Unary Language

  29. Example 1.42 Pumping Down

  30. Problem 1.41 Differential Encoding 0 1 1 0xx1 0xx0 0 0 qstart 0 1xx0 1 1xx1 1 1 0

More Related