1 / 11

Non-Regular Languages

Non-Regular Languages. All finite languages are regular.  { a } { abaabb , b , baabbbbb , bb } So, only infinite languages are interesting for this discussion. a 1. a 2. a m-1. a m. q 0. q 1. q m-1. q m. …. Lemma: Idea. Any DFA has finite number of states. Let n = |Q|.

dyani
Download Presentation

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. Non-Regular Languages All finite languages are regular.  {a} {abaabb,b,baabbbbb,bb} So, only infinite languages are interesting for this discussion.

  2. a1 a2 am-1 am q0 q1 qm-1 qm … Lemma: Idea Any DFA has finite number of states. Let n = |Q|. Consider any accepted input x=a1…am, such that m > n. DFA follows a path of states q0…qm: This state numbering has nothing to do with state names in Q. May repeat states in this path.

  3. ak aj+1 a1 aj ak+1 am q0 qj=qk qm … … Idea Since |x| > n, path must contain at least one loop. Consider any one such loop. Break string & path: before, during, & after loop. In fact, must exist loop such that k<n. Given other inputs, could loop an arbitrary number of times. (a1…aj)(aj+1…ak)*(ak+1…am) also accepted.

  4. Lemma: Summary If language L is regular, then for any xL that is longer than |Q|, there is a substring of x than can be “pumped” that provides other strings in L. Not claiming that pumping x gives all sufficiently long strings in L. For that, would need to look at all loops in all strings.

  5. Lemma: Formal Statement If L is a regular language, then n such that n is lower bound of #states in DFA. if xL and |x|n, x is a sufficiently long string.  strings u,v,w such that x=uvw, u,v,w are a way to split up x. |uv|  n, Looping not necessary in 1st part. |v|  1, The piece we loop on isn’t e. uviw  L, i0

  6. Lemma: Usage How to use lemma to prove some L isn’t regular? Lemma describes a property of regular languages. Use proof by contradiction: If L doesn't have this property, it isn't regular.

  7. Lemma: Usage Can view as game between you & adversary. Your goal is to prove L non-regular. • You choose/given L. • Adversary picks n. • You choose x. xL, |x|n. • Adversary picks u,v,w. x=uvw, |uv|n, |v|1. • You choose i such that uviw  L. Each choice can depend on previous ones.

  8. Lemma: Example 1 L1 = {0k1k | k0} x = 0n1n For whatever n is picked. x = uvw u & v contain only 0’s. Since |uv|n. Pick i=2. uv2w contains more 0’s than 1’s, since |v|1. uv2w  L1.

  9. Lemma: Lessons • Choice of x is important. • Different x’s may lead to different proofs, or none being possible. • RLs can “match up” parts of strings only in limited ways. • In particular, can’t do the unbounded counting needed in previous examples.

  10. Lemma: Non-example L = {(01)i | i0} L is regular: L = (01)*. I.e., for any x, there is some split u,v,w that allows pumping.

  11. Lemma: Limitations Lemma is of the form “If L regular, then a certain property holds.” Some non-RLs also have this property! Stronger versions of the lemma exist. • This version is usually sufficient. • This version is the most common.

More Related