Chapters (5 - 8) TOC BOOK by Adesh K Pandey
Chapters (5 - 8) TOC BOOK by Adesh K Pandey
0. Conclusion. Since | xy |
0 (since y was not €). For second inequality, we compute : (P+ iy 2p +1, and this greater than p’ + q since q
0 (since y was not €). For second inequality, we compute (p + 1) =p? + 3p? + 3p + 1, and this is greater than p’ + q since q < p (since | xy |
0.
Conclusion. Let us choose k = 2 then xyyz is not in L, since as we pump y by
two then number of a's increases which violates the condition n,(w) < n,(w).
So we got a contradiction for the pumping lemma so our assumption that
L is regular must have been incorrect.
Example 5.11. Prove that set of all strings begining with a nonempty
string of the form ww, is not regular. It is given that = = {0, 1).
Solution. Let us assume that given language L. is regular. Because the
regular language over any alphabet are closed under intersection (we will
discuss this theorem in Section 5.3).
So clearly language L’ = LL is regular.
Now let us assume that 11 be constant given by the pumping lemma for
language L’.
Let w= 10" e
By the pumping lemma, we can write w = xyz such that xy <1, y#€, and
for all k = N, xyz € L’. Now let us consider xyz (that is choose k = 2).
Conclusion. If y contains a 1, then xy"z certain more than two 1’s and
hence is not in L’.If y contains no 1’s then xyz = 10"*'10" for i > 1, and hence is not
(ince y ¥ €).
In either case, we obtain a contradiction. We conclude that L is not r.
Example 5.12, Prove that language L, which is the set of all stx
beginning with a string w of length at least 3 such that w = w*, is
regular. It is given that alphabet 5 = {0, 1).
Solution. Let us assume L is not regular. Because the set of reg
languages over any alphabet is closed under intersection, the langi
L'=L.0 Lis regular, (let say 001* 01°00).
Let be the constant guaranteed by the pumping lemma for
w = 001"*'01" "00 € L’. By the pumping lemma; we can write w = xyz §
that xy < m, y #e and for all k € N, xz 1’.
Conclusion. Because every string in L’ has exactly five Qs, y can cont
0's, for otherwise, xy°2 would not be in L’. Therefore xy'z = 001" *'*! +
for some i > 0. Clearly xy"z contains no prefix of length at least three d
palindrome so xyz ¢ L’—a contraction. Therefore, Lis not regular.
Example 5.13. Prove that language L = {0 |KeiN} is not regular,
Solution. By contradiction. |
Let us assume that L is regular\Let n be constant provided by the pum
lemma.
Let w = 0° for some i € N such that 2' > n. Clearly w L, by the pum
lemma we can write w = xyz such that | xy |