Download presentation
Presentation is loading. Please wait.
1
Non-Regular Languages
All finite languages are regular. {a} {abaabb,b,baabbbbb,bb} So, only infinite languages are interesting for this discussion.
2
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. q0 a1 q1 … qm-1 qm a2 am am-1
3
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. q0 a1 qj=qk … qm aj am aj+1 ak+1 ak
4
Lemma: Summary If language L is regular, then
for any xL 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 xL 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, i0
6
How to use lemma to prove some L isn’t regular?
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. xL, |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 = {0k 1k | k0}
x = 0n 1n 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 | i0} 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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.