{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 08 - 8 Proving that a language is not regular Example L =...

This preview shows pages 1–5. Sign up to view the full content.

8: Proving that a language is not regular Example: L = { 0 n 1 n | n 0 } is not a regular language. Intuitively, this language L is not regular because any machine that can recognize L must remember how many 0’s have been seen so far (i.e. unlimited number of pos- sibilities). But, this argument is not a proof! Our intuition can sometimes lead us astray. L 1 = { w | w has an equal number of 0’s and 1’s } L 2 = { w | w has an equal number of occurences of 01 and 10 as substrings } Are they regular? 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Proving a language is not regular Pumping Theorem (or Pumping Lemma) It is a property of all (infinite) regular languages. Informally, the P.T. says that, for any regular language L , every string in L that is longer than a certain special length can be “ pumped ” (with the resulting string always in L ). That is, for any regular language L that is infinite, there must be some repetitive pattern(s) that correspond to a Kleene star in a regular expression or a cycle in a state diagram. b a a a q b b p s 2
The Pigeonhole principle Suppose there are n 1 pigeonholes and m > n pigeons. Then at least one of the pigeonhole must contain at least two pigeons. Equivalently, If A and B are nonempty finite sets and | A | > | B | , then there is no one-one function from A to B . Proof : Let f : A B . Basis step: | B | = 0. No function can be defined. Hence no one-one function can be defined. Induction hypothesis: Suppose f is not one-one when- ever | A | > | B | , | B | ≤ n for some n 0 Inductive step: Consider the case | B | = n + 1. Choose some a A . Case i) There is another a A s.t. f ( a ) = f ( a ). Then f is not one-one. Case ii) a is the only element mapped to f ( a ). Define g : A − { a } → B − { f ( a ) } as g ( x ) = f ( x ) for all x A − { a } . 3

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
∗ | A − { a }| = | A | − 1 > | B | − 1 = | B − { f ( a ) }| ∗ | B − { f ( a ) }| = n ; by induction hypothesis, g is not one-one.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 12

08 - 8 Proving that a language is not regular Example L =...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online