THE PUMPING LEMMA
THE PUMPING LEMMA
x
Theorem. For any regular language L there exists an integer
n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗
,
such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) for all i ≥ 0: uvi
w ∈ L.
x
L
THE PUMPING LEMMA
n
x
Theorem. For any regular language L there exists an integer
n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗
,
such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) for all i ≥ 0: uvi
w ∈ L.
x
L
THE PUMPING LEMMA
n
x
Theorem. For any regular language L there exists an integer
n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗
,
such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) for all i ≥ 0: uvi
w ∈ L.
x
L
THE PUMPING LEMMA
n
x
Theorem. For any regular language L there exists an integer
n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗
,
such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) for all i ≥ 0: uvi
w ∈ L.
x
L
THE PUMPING LEMMA
n
x
Theorem. For any regular language L there exists an integer
n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗
,
such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) for all i ≥ 0: uvi
w ∈ L.
x
u v w
L
THE PUMPING LEMMA
n
x
Theorem. For any regular language L there exists an integer
n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗
,
such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) for all i ≥ 0: uvi
w ∈ L.
x
u w
u v w
L
THE PUMPING LEMMA
n
x
Theorem. For any regular language L there exists an integer
n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗
,
such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) for all i ≥ 0: uvi
w ∈ L.
x
u v wv
u w
u v w
L
THE PUMPING LEMMA
n
x
Theorem. For any regular language L there exists an integer
n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗
,
such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) for all i ≥ 0: uvi
w ∈ L.
x
u v wv
u w
u v w
u v wv v
L
PROOF OF P.L. (SKETCH)
PROOF OF P.L. (SKETCH)
Let M be a DFA for L. Take n be the number of states of M
plus 1.
PROOF OF P.L. (SKETCH)
Let M be a DFA for L. Take n be the number of states of M
plus 1.
Take any x ∈ L with |x| ≥ n. Consider the path (from start
state to an accepting state) in M that corresponds to x. The
length of this path is |x| ≥ n.
PROOF OF P.L. (SKETCH)
Let M be a DFA for L. Take n be the number of states of M
plus 1.
Since M has at most n − 1 states, some state must be visited
twice or more in the first n steps of the path.
Take any x ∈ L with |x| ≥ n. Consider the path (from start
state to an accepting state) in M that corresponds to x. The
length of this path is |x| ≥ n.
PROOF OF P.L. (SKETCH)
Let M be a DFA for L. Take n be the number of states of M
plus 1.
Since M has at most n − 1 states, some state must be visited
twice or more in the first n steps of the path.
Take any x ∈ L with |x| ≥ n. Consider the path (from start
state to an accepting state) in M that corresponds to x. The
length of this path is |x| ≥ n.
u
v
w
PROOF OF P.L. (SKETCH)
Let M be a DFA for L. Take n be the number of states of M
plus 1.
Since M has at most n − 1 states, some state must be visited
twice or more in the first n steps of the path.
Take any x ∈ L with |x| ≥ n. Consider the path (from start
state to an accepting state) in M that corresponds to x. The
length of this path is |x| ≥ n.
u
v
w
x = uvw ∈ L
uw ∈ L
uvvw ∈ L
uvvvw ∈ L
. . .
L regular =⇒ L satisfies P.L.
L non-regular =⇒ ?
L non-regular ⇐= L doesn’t satisfy P.L.
Negation:
∃ n ∈ N ∀ x ∈ L with |x| ≥ n
∃ u, v, w ∈ Σ∗
all of these hold:
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ≥ 0: uvi
w ∈ L.
USING PUMPING LEMMA TO PROVE NON-REGULARITY
L regular =⇒ L satisfies P.L.
L non-regular =⇒ ?
L non-regular ⇐= L doesn’t satisfy P.L.
Negation:
∃ n ∈ N ∀ x ∈ L with |x| ≥ n
∃ u, v, w ∈ Σ∗
all of these hold:
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ≥ 0: uvi
w ∈ L.
USING PUMPING LEMMA TO PROVE NON-REGULARITY
L regular =⇒ L satisfies P.L.
L non-regular =⇒ ?
L non-regular ⇐= L doesn’t satisfy P.L.
Negation:
∃ n ∈ N ∀ x ∈ L with |x| ≥ n
∃ u, v, w ∈ Σ∗
all of these hold:
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ≥ 0: uvi
w ∈ L.
∀ n ∈ N ∃ x ∈ L with |x| ≥ n
∀ u, v, w ∈ Σ∗
not all of these hold:
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ≥ 0: uvi
w ∈ L.
USING PUMPING LEMMA TO PROVE NON-REGULARITY
L regular =⇒ L satisfies P.L.
L non-regular =⇒ ?
L non-regular ⇐= L doesn’t satisfy P.L.
Negation:
∃ n ∈ N ∀ x ∈ L with |x| ≥ n
∃ u, v, w ∈ Σ∗
all of these hold:
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ≥ 0: uvi
w ∈ L.
∀ n ∈ N ∃ x ∈ L with |x| ≥ n
∀ u, v, w ∈ Σ∗
not all of these hold:
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ≥ 0: uvi
w ∈ L.
Equivalently:
(1) ∧ (2) ∧ (3) ⇒ not(4)
where not(4) is:
∃ i : uvi
w ∈ L
USING PUMPING LEMMA TO PROVE NON-REGULARITY
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
If L is regular, then by P.L. ∃ n such that . . .
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
If L is regular, then by P.L. ∃ n such that . . .
Now let x = 0n
1n
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
If L is regular, then by P.L. ∃ n such that . . .
Now let x = 0n
1n
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
If L is regular, then by P.L. ∃ n such that . . .
Now let x = 0n
1n
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
If L is regular, then by P.L. ∃ n such that . . .
Now let x = 0n
1n
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
If (1), (2), (3) hold then x = 0n
1n
= uvw with |uv| ≤ n and
|v| ≥ 1.
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
If L is regular, then by P.L. ∃ n such that . . .
Now let x = 0n
1n
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
If (1), (2), (3) hold then x = 0n
1n
= uvw with |uv| ≤ n and
|v| ≥ 1.
So, u = 0s
, v = 0t
, w = 0p
1n
with
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
If L is regular, then by P.L. ∃ n such that . . .
Now let x = 0n
1n
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
If (1), (2), (3) hold then x = 0n
1n
= uvw with |uv| ≤ n and
|v| ≥ 1.
So, u = 0s
, v = 0t
, w = 0p
1n
with
s + t ≤ n, t ≥ 1, p ≥ 0, s + t + p = n.
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
If L is regular, then by P.L. ∃ n such that . . .
Now let x = 0n
1n
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
If (1), (2), (3) hold then x = 0n
1n
= uvw with |uv| ≤ n and
|v| ≥ 1.
But then (4) fails for i = 0:
So, u = 0s
, v = 0t
, w = 0p
1n
with
s + t ≤ n, t ≥ 1, p ≥ 0, s + t + p = n.
EXAMPLE 1
Prove that L = {0i
1i
: i ≥ 0} is NOT regular.
Proof. Show that P.L. doesn’t hold (note: showing P.L. holds
doesn’t mean regularity).
If L is regular, then by P.L. ∃ n such that . . .
Now let x = 0n
1n
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
If (1), (2), (3) hold then x = 0n
1n
= uvw with |uv| ≤ n and
|v| ≥ 1.
But then (4) fails for i = 0:
uv0
w = uw = 0s
0p
1n
= 0s+p
1n
∈ L, since s + p = n
So, u = 0s
, v = 0t
, w = 0p
1n
with
s + t ≤ n, t ≥ 1, p ≥ 0, s + t + p = n.
IN PICTURE
∃ u, v, w such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ∈ N : uvi
w ∈ L.
IN PICTURE
∃ u, v, w such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ∈ N : uvi
w ∈ L.
u
  
00000
v

0 . . .
w
  
01111 . . . 1 ∈ L
IN PICTURE
∃ u, v, w such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ∈ N : uvi
w ∈ L.
u
  
00000
v

0 . . .
w
  
01111 . . . 1 ∈ L
non-empty
IN PICTURE
∃ u, v, w such that
(1) x = uvw
(2) |uv| ≤ n
(3) |v| ≥ 1
(4) ∀ i ∈ N : uvi
w ∈ L.
u
  
00000
v

0 . . .
w
  
01111 . . . 1 ∈ L
non-empty
If (1), (2), (3) hold then (4) fails: it is not the case that for all
i, uvi
w is in L.
In particular, let i = 0. uw ∈ L.
EXAMPLE 2
Prove that L = {0i
: i is a prime} is NOT regular.
EXAMPLE 2
Prove that L = {0i
: i is a prime} is NOT regular.
Proof. We show that P.L. doesn’t hold.
EXAMPLE 2
If L is regular, then by P.L. ∃ n such that . . .
Prove that L = {0i
: i is a prime} is NOT regular.
Proof. We show that P.L. doesn’t hold.
EXAMPLE 2
If L is regular, then by P.L. ∃ n such that . . .
Prove that L = {0i
: i is a prime} is NOT regular.
Now let x = 0m
where m ≥ n + 2 is prime.
Proof. We show that P.L. doesn’t hold.
EXAMPLE 2
If L is regular, then by P.L. ∃ n such that . . .
Prove that L = {0i
: i is a prime} is NOT regular.
Now let x = 0m
where m ≥ n + 2 is prime.
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
Proof. We show that P.L. doesn’t hold.
EXAMPLE 2
If L is regular, then by P.L. ∃ n such that . . .
Prove that L = {0i
: i is a prime} is NOT regular.
Now let x = 0m
where m ≥ n + 2 is prime.
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
Proof. We show that P.L. doesn’t hold.
EXAMPLE 2
If L is regular, then by P.L. ∃ n such that . . .
Prove that L = {0i
: i is a prime} is NOT regular.
Now let x = 0m
where m ≥ n + 2 is prime.
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
If 0m
is written as 0m
= uvw, then 0m
= 0|u|
0|v|
0|w|
.
Proof. We show that P.L. doesn’t hold.
EXAMPLE 2
If L is regular, then by P.L. ∃ n such that . . .
Prove that L = {0i
: i is a prime} is NOT regular.
Now let x = 0m
where m ≥ n + 2 is prime.
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
If 0m
is written as 0m
= uvw, then 0m
= 0|u|
0|v|
0|w|
.
If |uv| ≤ n and |v| ≥ 1, then consider i = |v| + |w|:
Proof. We show that P.L. doesn’t hold.
EXAMPLE 2
If L is regular, then by P.L. ∃ n such that . . .
Prove that L = {0i
: i is a prime} is NOT regular.
Now let x = 0m
where m ≥ n + 2 is prime.
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
If 0m
is written as 0m
= uvw, then 0m
= 0|u|
0|v|
0|w|
.
If |uv| ≤ n and |v| ≥ 1, then consider i = |v| + |w|:
uvi
w = 0|v|
0|v|(|v|+|w|)
0|w|
= 0(|v|+1)(|v|+|w|)
∈ L
Proof. We show that P.L. doesn’t hold.
EXAMPLE 2
If L is regular, then by P.L. ∃ n such that . . .
Prove that L = {0i
: i is a prime} is NOT regular.
Now let x = 0m
where m ≥ n + 2 is prime.
x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
We show that ∀ u, v, w (1)–(4) don’t all hold.
If 0m
is written as 0m
= uvw, then 0m
= 0|u|
0|v|
0|w|
.
If |uv| ≤ n and |v| ≥ 1, then consider i = |v| + |w|:
Both factors ≥ 2
uvi
w = 0|v|
0|v|(|v|+|w|)
0|w|
= 0(|v|+1)(|v|+|w|)
∈ L
Proof. We show that P.L. doesn’t hold.
EXAMPLE 3
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3
Again we try to show that P.L. doesn’t hold.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3
If L is regular, then by P.L. ∃ n such that . . .
Again we try to show that P.L. doesn’t hold.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3
If L is regular, then by P.L. ∃ n such that . . .
Let us consider x = 0n
0n
∈ L. Obviously |x| ≥ n.
Again we try to show that P.L. doesn’t hold.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3
If L is regular, then by P.L. ∃ n such that . . .
Let us consider x = 0n
0n
∈ L. Obviously |x| ≥ n.
Can 0n
0n
be written as 0n
0n
= uvw such that |uv| ≤ n |v| ≥ 1
and that for all i: uvi
w ∈ L?
Again we try to show that P.L. doesn’t hold.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3
If L is regular, then by P.L. ∃ n such that . . .
Let us consider x = 0n
0n
∈ L. Obviously |x| ≥ n.
YES! Let u = , v = 00, and w = 02n−2
.
Can 0n
0n
be written as 0n
0n
= uvw such that |uv| ≤ n |v| ≥ 1
and that for all i: uvi
w ∈ L?
Again we try to show that P.L. doesn’t hold.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3
If L is regular, then by P.L. ∃ n such that . . .
Let us consider x = 0n
0n
∈ L. Obviously |x| ≥ n.
YES! Let u = , v = 00, and w = 02n−2
.
Then ∀i , uvi
w is of the form 02k
= 0k
0k
.
Can 0n
0n
be written as 0n
0n
= uvw such that |uv| ≤ n |v| ≥ 1
and that for all i: uvi
w ∈ L?
Again we try to show that P.L. doesn’t hold.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3
If L is regular, then by P.L. ∃ n such that . . .
Let us consider x = 0n
0n
∈ L. Obviously |x| ≥ n.
YES! Let u = , v = 00, and w = 02n−2
.
Then ∀i , uvi
w is of the form 02k
= 0k
0k
.
Does this mean that L is regular?
Can 0n
0n
be written as 0n
0n
= uvw such that |uv| ≤ n |v| ≥ 1
and that for all i: uvi
w ∈ L?
Again we try to show that P.L. doesn’t hold.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3
If L is regular, then by P.L. ∃ n such that . . .
Let us consider x = 0n
0n
∈ L. Obviously |x| ≥ n.
YES! Let u = , v = 00, and w = 02n−2
.
Then ∀i , uvi
w is of the form 02k
= 0k
0k
.
Does this mean that L is regular?
NO.We have chosen a bad string x. To show that L fails the
P.L., we only need to exhibit some x that cannot be “pumped”
(and |x| ≥ n).
Can 0n
0n
be written as 0n
0n
= uvw such that |uv| ≤ n |v| ≥ 1
and that for all i: uvi
w ∈ L?
Again we try to show that P.L. doesn’t hold.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 2ND ATTEMPT
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 2ND ATTEMPT
Given n from the P.L., let x = (01)n
(01)n
. Obviously x ∈ L
and |x| ≥ n.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 2ND ATTEMPT
Q: Can x be “pumped” for some choice of u, v, w with |uv| ≤ n
and |v| ≥ 1?
Given n from the P.L., let x = (01)n
(01)n
. Obviously x ∈ L
and |x| ≥ n.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 2ND ATTEMPT
Q: Can x be “pumped” for some choice of u, v, w with |uv| ≤ n
and |v| ≥ 1?
Given n from the P.L., let x = (01)n
(01)n
. Obviously x ∈ L
and |x| ≥ n.
A: Yes! Take u = , v = 0101, w = (01)2n−2
.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 2ND ATTEMPT
Q: Can x be “pumped” for some choice of u, v, w with |uv| ≤ n
and |v| ≥ 1?
Given n from the P.L., let x = (01)n
(01)n
. Obviously x ∈ L
and |x| ≥ n.
A: Yes! Take u = , v = 0101, w = (01)2n−2
.
Another bad choice of x!
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 3RD ATTEMPT
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 3RD ATTEMPT
Given n from the P.L., let x = 0n
10n
1. Again x ∈ L and
|x| ≥ n.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 3RD ATTEMPT
Given n from the P.L., let x = 0n
10n
1. Again x ∈ L and
|x| ≥ n.
∀u, v, w such that 0n
10n
1 = uvw and |uv| ≤ n and |v| ≥ 1:
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 3RD ATTEMPT
Given n from the P.L., let x = 0n
10n
1. Again x ∈ L and
|x| ≥ n.
∀u, v, w such that 0n
10n
1 = uvw and |uv| ≤ n and |v| ≥ 1:
must have uv contained in the first group of 0n
. Thus consider
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 3RD ATTEMPT
Given n from the P.L., let x = 0n
10n
1. Again x ∈ L and
|x| ≥ n.
∀u, v, w such that 0n
10n
1 = uvw and |uv| ≤ n and |v| ≥ 1:
must have uv contained in the first group of 0n
. Thus consider
uv0
w = 0n−|v|
10n
1.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.
EXAMPLE 3, 3RD ATTEMPT
Given n from the P.L., let x = 0n
10n
1. Again x ∈ L and
|x| ≥ n.
∀u, v, w such that 0n
10n
1 = uvw and |uv| ≤ n and |v| ≥ 1:
must have uv contained in the first group of 0n
. Thus consider
uv0
w = 0n−|v|
10n
1.
Since |v| is at least 1, this is clearly not of the form yy.
Prove that L = {yy : y ∈ {0, 1}∗
} is NOT regular.

Pumping lemma (1)

  • 1.
  • 2.
    THE PUMPING LEMMA x Theorem.For any regular language L there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗ , such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) for all i ≥ 0: uvi w ∈ L. x L
  • 3.
    THE PUMPING LEMMA n x Theorem.For any regular language L there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗ , such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) for all i ≥ 0: uvi w ∈ L. x L
  • 4.
    THE PUMPING LEMMA n x Theorem.For any regular language L there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗ , such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) for all i ≥ 0: uvi w ∈ L. x L
  • 5.
    THE PUMPING LEMMA n x Theorem.For any regular language L there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗ , such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) for all i ≥ 0: uvi w ∈ L. x L
  • 6.
    THE PUMPING LEMMA n x Theorem.For any regular language L there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗ , such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) for all i ≥ 0: uvi w ∈ L. x u v w L
  • 7.
    THE PUMPING LEMMA n x Theorem.For any regular language L there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗ , such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) for all i ≥ 0: uvi w ∈ L. x u w u v w L
  • 8.
    THE PUMPING LEMMA n x Theorem.For any regular language L there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗ , such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) for all i ≥ 0: uvi w ∈ L. x u v wv u w u v w L
  • 9.
    THE PUMPING LEMMA n x Theorem.For any regular language L there exists an integer n, such that for all x ∈ L with |x| ≥ n, there exist u, v, w ∈ Σ∗ , such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) for all i ≥ 0: uvi w ∈ L. x u v wv u w u v w u v wv v L
  • 10.
    PROOF OF P.L.(SKETCH)
  • 11.
    PROOF OF P.L.(SKETCH) Let M be a DFA for L. Take n be the number of states of M plus 1.
  • 12.
    PROOF OF P.L.(SKETCH) Let M be a DFA for L. Take n be the number of states of M plus 1. Take any x ∈ L with |x| ≥ n. Consider the path (from start state to an accepting state) in M that corresponds to x. The length of this path is |x| ≥ n.
  • 13.
    PROOF OF P.L.(SKETCH) Let M be a DFA for L. Take n be the number of states of M plus 1. Since M has at most n − 1 states, some state must be visited twice or more in the first n steps of the path. Take any x ∈ L with |x| ≥ n. Consider the path (from start state to an accepting state) in M that corresponds to x. The length of this path is |x| ≥ n.
  • 14.
    PROOF OF P.L.(SKETCH) Let M be a DFA for L. Take n be the number of states of M plus 1. Since M has at most n − 1 states, some state must be visited twice or more in the first n steps of the path. Take any x ∈ L with |x| ≥ n. Consider the path (from start state to an accepting state) in M that corresponds to x. The length of this path is |x| ≥ n. u v w
  • 15.
    PROOF OF P.L.(SKETCH) Let M be a DFA for L. Take n be the number of states of M plus 1. Since M has at most n − 1 states, some state must be visited twice or more in the first n steps of the path. Take any x ∈ L with |x| ≥ n. Consider the path (from start state to an accepting state) in M that corresponds to x. The length of this path is |x| ≥ n. u v w x = uvw ∈ L uw ∈ L uvvw ∈ L uvvvw ∈ L . . .
  • 16.
    L regular =⇒L satisfies P.L. L non-regular =⇒ ? L non-regular ⇐= L doesn’t satisfy P.L. Negation: ∃ n ∈ N ∀ x ∈ L with |x| ≥ n ∃ u, v, w ∈ Σ∗ all of these hold: (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ≥ 0: uvi w ∈ L. USING PUMPING LEMMA TO PROVE NON-REGULARITY
  • 17.
    L regular =⇒L satisfies P.L. L non-regular =⇒ ? L non-regular ⇐= L doesn’t satisfy P.L. Negation: ∃ n ∈ N ∀ x ∈ L with |x| ≥ n ∃ u, v, w ∈ Σ∗ all of these hold: (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ≥ 0: uvi w ∈ L. USING PUMPING LEMMA TO PROVE NON-REGULARITY
  • 18.
    L regular =⇒L satisfies P.L. L non-regular =⇒ ? L non-regular ⇐= L doesn’t satisfy P.L. Negation: ∃ n ∈ N ∀ x ∈ L with |x| ≥ n ∃ u, v, w ∈ Σ∗ all of these hold: (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ≥ 0: uvi w ∈ L. ∀ n ∈ N ∃ x ∈ L with |x| ≥ n ∀ u, v, w ∈ Σ∗ not all of these hold: (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ≥ 0: uvi w ∈ L. USING PUMPING LEMMA TO PROVE NON-REGULARITY
  • 19.
    L regular =⇒L satisfies P.L. L non-regular =⇒ ? L non-regular ⇐= L doesn’t satisfy P.L. Negation: ∃ n ∈ N ∀ x ∈ L with |x| ≥ n ∃ u, v, w ∈ Σ∗ all of these hold: (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ≥ 0: uvi w ∈ L. ∀ n ∈ N ∃ x ∈ L with |x| ≥ n ∀ u, v, w ∈ Σ∗ not all of these hold: (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ≥ 0: uvi w ∈ L. Equivalently: (1) ∧ (2) ∧ (3) ⇒ not(4) where not(4) is: ∃ i : uvi w ∈ L USING PUMPING LEMMA TO PROVE NON-REGULARITY
  • 20.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular.
  • 21.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity).
  • 22.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity). If L is regular, then by P.L. ∃ n such that . . .
  • 23.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity). If L is regular, then by P.L. ∃ n such that . . . Now let x = 0n 1n
  • 24.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity). If L is regular, then by P.L. ∃ n such that . . . Now let x = 0n 1n x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold.
  • 25.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity). If L is regular, then by P.L. ∃ n such that . . . Now let x = 0n 1n x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold.
  • 26.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity). If L is regular, then by P.L. ∃ n such that . . . Now let x = 0n 1n x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. If (1), (2), (3) hold then x = 0n 1n = uvw with |uv| ≤ n and |v| ≥ 1.
  • 27.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity). If L is regular, then by P.L. ∃ n such that . . . Now let x = 0n 1n x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. If (1), (2), (3) hold then x = 0n 1n = uvw with |uv| ≤ n and |v| ≥ 1. So, u = 0s , v = 0t , w = 0p 1n with
  • 28.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity). If L is regular, then by P.L. ∃ n such that . . . Now let x = 0n 1n x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. If (1), (2), (3) hold then x = 0n 1n = uvw with |uv| ≤ n and |v| ≥ 1. So, u = 0s , v = 0t , w = 0p 1n with s + t ≤ n, t ≥ 1, p ≥ 0, s + t + p = n.
  • 29.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity). If L is regular, then by P.L. ∃ n such that . . . Now let x = 0n 1n x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. If (1), (2), (3) hold then x = 0n 1n = uvw with |uv| ≤ n and |v| ≥ 1. But then (4) fails for i = 0: So, u = 0s , v = 0t , w = 0p 1n with s + t ≤ n, t ≥ 1, p ≥ 0, s + t + p = n.
  • 30.
    EXAMPLE 1 Prove thatL = {0i 1i : i ≥ 0} is NOT regular. Proof. Show that P.L. doesn’t hold (note: showing P.L. holds doesn’t mean regularity). If L is regular, then by P.L. ∃ n such that . . . Now let x = 0n 1n x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. If (1), (2), (3) hold then x = 0n 1n = uvw with |uv| ≤ n and |v| ≥ 1. But then (4) fails for i = 0: uv0 w = uw = 0s 0p 1n = 0s+p 1n ∈ L, since s + p = n So, u = 0s , v = 0t , w = 0p 1n with s + t ≤ n, t ≥ 1, p ≥ 0, s + t + p = n.
  • 31.
    IN PICTURE ∃ u,v, w such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ∈ N : uvi w ∈ L.
  • 32.
    IN PICTURE ∃ u,v, w such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ∈ N : uvi w ∈ L. u 00000 v 0 . . . w 01111 . . . 1 ∈ L
  • 33.
    IN PICTURE ∃ u,v, w such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ∈ N : uvi w ∈ L. u 00000 v 0 . . . w 01111 . . . 1 ∈ L non-empty
  • 34.
    IN PICTURE ∃ u,v, w such that (1) x = uvw (2) |uv| ≤ n (3) |v| ≥ 1 (4) ∀ i ∈ N : uvi w ∈ L. u 00000 v 0 . . . w 01111 . . . 1 ∈ L non-empty If (1), (2), (3) hold then (4) fails: it is not the case that for all i, uvi w is in L. In particular, let i = 0. uw ∈ L.
  • 35.
    EXAMPLE 2 Prove thatL = {0i : i is a prime} is NOT regular.
  • 36.
    EXAMPLE 2 Prove thatL = {0i : i is a prime} is NOT regular. Proof. We show that P.L. doesn’t hold.
  • 37.
    EXAMPLE 2 If Lis regular, then by P.L. ∃ n such that . . . Prove that L = {0i : i is a prime} is NOT regular. Proof. We show that P.L. doesn’t hold.
  • 38.
    EXAMPLE 2 If Lis regular, then by P.L. ∃ n such that . . . Prove that L = {0i : i is a prime} is NOT regular. Now let x = 0m where m ≥ n + 2 is prime. Proof. We show that P.L. doesn’t hold.
  • 39.
    EXAMPLE 2 If Lis regular, then by P.L. ∃ n such that . . . Prove that L = {0i : i is a prime} is NOT regular. Now let x = 0m where m ≥ n + 2 is prime. x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. Proof. We show that P.L. doesn’t hold.
  • 40.
    EXAMPLE 2 If Lis regular, then by P.L. ∃ n such that . . . Prove that L = {0i : i is a prime} is NOT regular. Now let x = 0m where m ≥ n + 2 is prime. x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. Proof. We show that P.L. doesn’t hold.
  • 41.
    EXAMPLE 2 If Lis regular, then by P.L. ∃ n such that . . . Prove that L = {0i : i is a prime} is NOT regular. Now let x = 0m where m ≥ n + 2 is prime. x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. If 0m is written as 0m = uvw, then 0m = 0|u| 0|v| 0|w| . Proof. We show that P.L. doesn’t hold.
  • 42.
    EXAMPLE 2 If Lis regular, then by P.L. ∃ n such that . . . Prove that L = {0i : i is a prime} is NOT regular. Now let x = 0m where m ≥ n + 2 is prime. x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. If 0m is written as 0m = uvw, then 0m = 0|u| 0|v| 0|w| . If |uv| ≤ n and |v| ≥ 1, then consider i = |v| + |w|: Proof. We show that P.L. doesn’t hold.
  • 43.
    EXAMPLE 2 If Lis regular, then by P.L. ∃ n such that . . . Prove that L = {0i : i is a prime} is NOT regular. Now let x = 0m where m ≥ n + 2 is prime. x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. If 0m is written as 0m = uvw, then 0m = 0|u| 0|v| 0|w| . If |uv| ≤ n and |v| ≥ 1, then consider i = |v| + |w|: uvi w = 0|v| 0|v|(|v|+|w|) 0|w| = 0(|v|+1)(|v|+|w|) ∈ L Proof. We show that P.L. doesn’t hold.
  • 44.
    EXAMPLE 2 If Lis regular, then by P.L. ∃ n such that . . . Prove that L = {0i : i is a prime} is NOT regular. Now let x = 0m where m ≥ n + 2 is prime. x ∈ L and |x| ≥ n, so by P.L. ∃u, v, w such that (1)–(4) hold. We show that ∀ u, v, w (1)–(4) don’t all hold. If 0m is written as 0m = uvw, then 0m = 0|u| 0|v| 0|w| . If |uv| ≤ n and |v| ≥ 1, then consider i = |v| + |w|: Both factors ≥ 2 uvi w = 0|v| 0|v|(|v|+|w|) 0|w| = 0(|v|+1)(|v|+|w|) ∈ L Proof. We show that P.L. doesn’t hold.
  • 45.
    EXAMPLE 3 Prove thatL = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 46.
    EXAMPLE 3 Again wetry to show that P.L. doesn’t hold. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 47.
    EXAMPLE 3 If Lis regular, then by P.L. ∃ n such that . . . Again we try to show that P.L. doesn’t hold. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 48.
    EXAMPLE 3 If Lis regular, then by P.L. ∃ n such that . . . Let us consider x = 0n 0n ∈ L. Obviously |x| ≥ n. Again we try to show that P.L. doesn’t hold. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 49.
    EXAMPLE 3 If Lis regular, then by P.L. ∃ n such that . . . Let us consider x = 0n 0n ∈ L. Obviously |x| ≥ n. Can 0n 0n be written as 0n 0n = uvw such that |uv| ≤ n |v| ≥ 1 and that for all i: uvi w ∈ L? Again we try to show that P.L. doesn’t hold. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 50.
    EXAMPLE 3 If Lis regular, then by P.L. ∃ n such that . . . Let us consider x = 0n 0n ∈ L. Obviously |x| ≥ n. YES! Let u = , v = 00, and w = 02n−2 . Can 0n 0n be written as 0n 0n = uvw such that |uv| ≤ n |v| ≥ 1 and that for all i: uvi w ∈ L? Again we try to show that P.L. doesn’t hold. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 51.
    EXAMPLE 3 If Lis regular, then by P.L. ∃ n such that . . . Let us consider x = 0n 0n ∈ L. Obviously |x| ≥ n. YES! Let u = , v = 00, and w = 02n−2 . Then ∀i , uvi w is of the form 02k = 0k 0k . Can 0n 0n be written as 0n 0n = uvw such that |uv| ≤ n |v| ≥ 1 and that for all i: uvi w ∈ L? Again we try to show that P.L. doesn’t hold. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 52.
    EXAMPLE 3 If Lis regular, then by P.L. ∃ n such that . . . Let us consider x = 0n 0n ∈ L. Obviously |x| ≥ n. YES! Let u = , v = 00, and w = 02n−2 . Then ∀i , uvi w is of the form 02k = 0k 0k . Does this mean that L is regular? Can 0n 0n be written as 0n 0n = uvw such that |uv| ≤ n |v| ≥ 1 and that for all i: uvi w ∈ L? Again we try to show that P.L. doesn’t hold. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 53.
    EXAMPLE 3 If Lis regular, then by P.L. ∃ n such that . . . Let us consider x = 0n 0n ∈ L. Obviously |x| ≥ n. YES! Let u = , v = 00, and w = 02n−2 . Then ∀i , uvi w is of the form 02k = 0k 0k . Does this mean that L is regular? NO.We have chosen a bad string x. To show that L fails the P.L., we only need to exhibit some x that cannot be “pumped” (and |x| ≥ n). Can 0n 0n be written as 0n 0n = uvw such that |uv| ≤ n |v| ≥ 1 and that for all i: uvi w ∈ L? Again we try to show that P.L. doesn’t hold. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 54.
    EXAMPLE 3, 2NDATTEMPT Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 55.
    EXAMPLE 3, 2NDATTEMPT Given n from the P.L., let x = (01)n (01)n . Obviously x ∈ L and |x| ≥ n. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 56.
    EXAMPLE 3, 2NDATTEMPT Q: Can x be “pumped” for some choice of u, v, w with |uv| ≤ n and |v| ≥ 1? Given n from the P.L., let x = (01)n (01)n . Obviously x ∈ L and |x| ≥ n. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 57.
    EXAMPLE 3, 2NDATTEMPT Q: Can x be “pumped” for some choice of u, v, w with |uv| ≤ n and |v| ≥ 1? Given n from the P.L., let x = (01)n (01)n . Obviously x ∈ L and |x| ≥ n. A: Yes! Take u = , v = 0101, w = (01)2n−2 . Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 58.
    EXAMPLE 3, 2NDATTEMPT Q: Can x be “pumped” for some choice of u, v, w with |uv| ≤ n and |v| ≥ 1? Given n from the P.L., let x = (01)n (01)n . Obviously x ∈ L and |x| ≥ n. A: Yes! Take u = , v = 0101, w = (01)2n−2 . Another bad choice of x! Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 59.
    EXAMPLE 3, 3RDATTEMPT Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 60.
    EXAMPLE 3, 3RDATTEMPT Given n from the P.L., let x = 0n 10n 1. Again x ∈ L and |x| ≥ n. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 61.
    EXAMPLE 3, 3RDATTEMPT Given n from the P.L., let x = 0n 10n 1. Again x ∈ L and |x| ≥ n. ∀u, v, w such that 0n 10n 1 = uvw and |uv| ≤ n and |v| ≥ 1: Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 62.
    EXAMPLE 3, 3RDATTEMPT Given n from the P.L., let x = 0n 10n 1. Again x ∈ L and |x| ≥ n. ∀u, v, w such that 0n 10n 1 = uvw and |uv| ≤ n and |v| ≥ 1: must have uv contained in the first group of 0n . Thus consider Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 63.
    EXAMPLE 3, 3RDATTEMPT Given n from the P.L., let x = 0n 10n 1. Again x ∈ L and |x| ≥ n. ∀u, v, w such that 0n 10n 1 = uvw and |uv| ≤ n and |v| ≥ 1: must have uv contained in the first group of 0n . Thus consider uv0 w = 0n−|v| 10n 1. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.
  • 64.
    EXAMPLE 3, 3RDATTEMPT Given n from the P.L., let x = 0n 10n 1. Again x ∈ L and |x| ≥ n. ∀u, v, w such that 0n 10n 1 = uvw and |uv| ≤ n and |v| ≥ 1: must have uv contained in the first group of 0n . Thus consider uv0 w = 0n−|v| 10n 1. Since |v| is at least 1, this is clearly not of the form yy. Prove that L = {yy : y ∈ {0, 1}∗ } is NOT regular.