Question

In: Computer Science

Use the pumping lemma to prove that the following languages are not regular. (a)L2 = {y...

Use the pumping lemma to prove that the following languages are not regular.

(a)L2 = {y = 10 × x | x and y are binary integers with no leading 0s, and y is two times x}. (The alphabet for this languages is {0, 1, ×, =}.) For example, 1010 = 10 × 101 is in L2, but 1010 = 10 × 1 is not.

(b)Let Σ2 = {[ 0 0 ] , [ 0 1 ] , [ 1 0 ] , [ 1 1 ]} . Consider each row to be a binary number and let L3 = w ∈ Σ ∗ 2 | the bottom row of w is the square of the top row of w . For example, [ 0 1 ] [ 0 0 ] [ 1 0 ] [ 0 0 ] [ 0 0 ] ∈ L3, but [ 0 1 ] [ 0 0 ] [ 0 0 ] [ 1 0 ] [ 0 0 ] [ 0 0 ] ∈/ L3.

Solutions

Expert Solution

The pumping lemma states that any regular language L has a pumping length p such that all strings of length greater than p can be divided into three parts x, y and z such that

(a) Let w be a string belonging to L2 such that the length of w is greater than its pumping length. Then w=x.y.z. The cross sign must belong to either of x, y or z.

  • Suppose the cross belongs to x. Then the whole of y lies in the number on the right. The number on the left was initially 10 times the number on the right, however pumping y to w will change the number on the right so the relation will no longer hold. Hence the cross does not belong to x.
  • Suppose the cross belongs to y. Then on pumping y to w, the number of cross signs will increase. But all strings in L2 must have only one cross. Hence the cross does not belong to y.
  • Suppose the cross belongs to z. Then the whole of y lies in the number on the left. The number on the left was initially 10 times the number on the right, however pumping y to w will change the number of the left so the relation will no longer hold. Hence the cross does not belong to w.

So we have proved that w cannot be written as w=xyz were they satisfy the given criteria. Hence L2 is not a regular language.


Related Solutions

(35 pt.) Prove that the following languages are not regular using the pumping lemma. (15pt.)?={?????? |?,?≥?}...
(35 pt.) Prove that the following languages are not regular using the pumping lemma. (15pt.)?={?????? |?,?≥?} (20 pt.) ? = {? ∈ {?, #}∗ | ? = ??#??# ... #?? ??? ? ≥ ?, ?? ∈ ?∗ ??? ????? ?, ??? ?? ≠?? ???????? ?≠?} Hint: choose a string ? ∈ ? that contains ? #’s.
Use the pumping lemma to show that the following languages are not regular. A a. A1={0^n...
Use the pumping lemma to show that the following languages are not regular. A a. A1={0^n 1^n 2^n | n≥0} b. A2 = {www | w ∈ {a,b}∗} A c. A3 ={a^2^n | n≥0} (Here, a^2^n means a string of 2^n a’s.) A ={a3n |n > 0 }
Use the pumping lemma to show that the following languages are not regular (c) (5 pts)...
Use the pumping lemma to show that the following languages are not regular (c) (5 pts) Let Σ = {0, 1, −, =} and SUB = {x = y − z | x, y, z are binary integers, and x is the result of the subtraction of z from y}. For example: 1 = 1 − 0, 10 = 11 − 01 are strings in SUB but not 1 = 1 − 1 or 11 = 11 − 10.
1. Pumping Lemma: a. Is the following language a regular language? (Use pumping lemma in proof.)...
1. Pumping Lemma: a. Is the following language a regular language? (Use pumping lemma in proof.) L = {0n 1n 2n | n ≥ 0} b. What is (i.e., define) the CFL pumping lemma?
Do not use Pumping Lemma for Regular Expression to prove the following. You may think of...
Do not use Pumping Lemma for Regular Expression to prove the following. You may think of Closure Properties of Regular Languages 1. Fix an alphabet. For any string w with |w| ≥ 2, let middle(w) be the string obtained by removing the first and last symbols of w. That is, Given L, a regular language on Σ, prove that f1(L) is regular, where f1(L) = {w : middle(w) ∈ L}
Using the pumping lemma for regular languages, show that language is not regular. b) L3= {0n...
Using the pumping lemma for regular languages, show that language is not regular. b) L3= {0n 1m, m = n+2 } Language= {0,1}
Prove that {anbamba2m+n:n,m≥1} is not regular using pumping lemma
Prove that {anbamba2m+n:n,m≥1} is not regular using pumping lemma
Show that L2 = {anb2nan : n ≥ 0} is not context-free using the pumping lemma.
Show that L2 = {anb2nan : n ≥ 0} is not context-free using the pumping lemma.
Are the following languages over {a, b} regular? If they are then prove it. If they...
Are the following languages over {a, b} regular? If they are then prove it. If they are not prove it with the Pumping Lemma a) {ap | p is a prime number} b) {xax | x Î{a,b}*} (start by listing some strings in, not in, the language
Is the following language a regular language? ( Prove with pumping Lenma ) L = {...
Is the following language a regular language? ( Prove with pumping Lenma ) L = { o^n 1^n 2^n | n => 0} Define CFL pumping lemma
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT