1 / 8

NONREGULAR LANGUAGES

NONREGULAR LANGUAGES. To understand the power of finite automata you must also understand their limitations. Example. Consider two languages over the alphabet ∑ {0,1}: C = { ω I ω has an equal number of Os and Is}, and

carver
Download Presentation

NONREGULAR 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. NONREGULAR LANGUAGES To understand the power of finite automata you must also understand their limitations.

  2. Example • Consider two languages over the alphabet ∑ {0,1}: • C = {ωIωhas an equal number of Os and Is}, and • D = {ωIωhas an equal number of occurrences of 01 and 10 as substrings}.

  3. THE PUMPING LEMMA FOR REGULAR LANGUAGES • Our technique for proving nonregularity stems from a theorem about regular languages, traditionally called the pumping lemma. • This theorem states that all regularlanguages have a special property. If we can show that a language does not have this property, we are guaranteed that it is not regular. • p - pumping length

  4. THEOREM 1.70 - Pumping lemma • If A is a regular language, then there is a number p (the pumping length) where, if s is any string in A of length at least p, then s may be dividedinto three pieces, s = xyz, satisfying the following conditions: • 1. for each i> 0, xyiz E A, • 2. |y| > 0, and • 3. |xy|< p.

  5. PROOF IDEA

  6. EXAMPLE 1.73 Let B be the language {on1n|n > 0}. • Assume that B is regular. • Let p be the pumping length given by the pumping lemma. • Choose s to be the string 0P1P • s < p ??? If yes • the pumping lemma guarantees that s can be split into three pieces, s = xyz • Conditions???????????????????????

  7. Impossible

  8. EXAMPLE 1.75 Let F = {ωω| ω є{0,1}*}. • Assume that F is regular. • Let p be the pumping length given by the pumping lemma. • Choose s to be the string 0P10P, OPOP , …….. • s < p ??? If yes • the pumping lemma guarantees that s can be split into three pieces, s = xyz • Conditions???????????????????????

More Related