Daniel B. answered 09/26/22
PhD in Computer Science with 42 years in Computer Research
Let me restate the Pumping Lemma because we will need terms from its statement.
If L is a regular language then there exists an integer p > 0 such that every string
w โ L of length at least p can be written as a concatenation of three strings w = xyz satisfying
|y| > 0
|xy| โค p
xynz โ L for any n โฅ 0
1. L3 satisfies the Pumping Lemma, but it is not regular.
(Note that the Pumping Lemma has implication only in one direction;
it does not claim that any language satisfying its conditions is regular.)
Proof that L3 satisfies the Pumping Lemma with p = 2.
Pick any w of length at least 2.
Let a be its first symbol; that means w = av for some non-empty string v.
Decompose w = xyz, by setting
x is empty,
y = a
z = v
This choice satisfies the Pumping Lemma because any string, like
aaaav is in L with ฯ = a, ฮฒ = aav.
2.
I assume that the statement contains a type. The definition is meant to be
L4 = {1i 0j 1k | ๐ > ๐ ๐๐๐ ๐ < ๐ ๐๐๐ ๐,๐, ๐ > 0}
Proof that L4 is not regular by the Pumping Lemma.
Assume that L4 is regular.
Then the Pumping Lemma gives us that number p.
Let w = 1p+1 0 1p+2
The string w is in L4 with i = p+1, j = 1, k = p+2.
Therefore we can write w = xyz, where xyz are strings satisfying the Pumping Lemma.
From |xy| โค p, we conclude that y must be a string of 1's; say it is a string of m 1's,
for some some integer m > 0.
Then xyyz is a string starting with p+1+m 1's, violating the condition i < k, which
all strings in L4 must satisfy.