Question

In: Computer Science

Use Myhill-Nerode Theorem to prove the following languages are not regular A1 = {0n1n2n| n >=...

Use Myhill-Nerode Theorem to prove the following languages are not regular

A1 = {0n1n2n| n >= 0}

A2 = {www| w E {a, b}*}

Solutions

Expert Solution

1.)Use Myhill-Nerode Theorem to prove the following languages are not regular

A1 = {0n1n2n| n >= 0}

Consider the sequence of strings x1, x2, . . . where xi = 0i for i ≥ 1.

We now see that no two of these are equivalent to each other with respect to A1

Consider xi = 0i and xj = 0j for i is not equal to j.

Let z=1i and p=2i and notice that xizp=0i1i2i  belongs to A1 but xjzp=0j1i2i does not belong to A1

Therefore no two of these strings are equivalent to each other and thus A1 cannot be regular.

One nice thing about this method for proving things nonregular is that, unlike the pumping lemma, it is always guaranteed to work because the corollary above is a precise characterization of the regular languages. The statement of this fact is known as the Myhill-Nerode Theorem after the two people who first proved it.

2.)Use Myhill-Nerode Theorem to prove the following languages are not regular

A2 = {www| w E {a, b}*}

(To use Myhill-Nerode Theorem,we need to find an infinite set of strings that are pairwise distinguishable relative to A2.

We know that any two distinct strings over the aphabet {a,b} are distinguishable.

So pick the set S={a,b}*.

Notice that S is not the subset of A2.That's okay, we never said S needs to be subset of A2.)

Proof:

Let S = {a, b}*.

This set contains infinitely many strings. Now, consider any x, y belongs to S where x != y.

Then x≟x ∈ A2 and y≟x ∉ A2.

Consequently, x ≢A2y. Therefore, by the Myhill-Nerode theorem, EQ is not regular.


Related Solutions

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 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...
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
Prove the following theorem: Theorem ∀n ∈ Z, n is either even or odd (but not...
Prove the following theorem: Theorem ∀n ∈ Z, n is either even or odd (but not both). Your proof must address the following points: 1. n is even or odd (and nothing else). 2. n is odd =⇒ n is not even (hint: contradiction). 3. n is even=⇒ n is not odd (hint: contrapositive). The first point is a bit more difficult. Start by making a statement about 0. Then assuming that n is even, what can you say about...
(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.
Prove the following theorem. If n is a positive integer such that n ≡ 2 (mod...
Prove the following theorem. If n is a positive integer such that n ≡ 2 (mod 4) or n ≡ 3 (mod 4), then n is not a perfect square.
Prove: If a1 = b1 mod n and a2 = b2 mod n then (1) a1...
Prove: If a1 = b1 mod n and a2 = b2 mod n then (1) a1 + a2 = b1 + b2 mod n, (2) a1 − a2 = b1 − b2 mod n, and (3) a1a2 = b1b2 mod n.
Are the following languages regular languages or not ? Justify your answer with a proof. ?...
Are the following languages regular languages or not ? Justify your answer with a proof. ? = {? | ? represents an integer strictly greater than 2020}, on alphabet Σ = {0,…,9}. ? = {? | |?|a > |?|b} on alphabet Σ = {a,b} ? = {? | ? is the code of a LOOP program syntactically correct } ? = {02?| ? ∈ ℕ} sur alphabet Σ = {0}.
Use the Pumping Lemma to show that the following languages are not regular. (a) {ai bj...
Use the Pumping Lemma to show that the following languages are not regular. (a) {ai bj | i > j} (b) {apaq | for all integers p and q where q is a prime number and p is not prime}.
Determine whether or not the following languages are regular. If the language is regular then give...
Determine whether or not the following languages are regular. If the language is regular then give an NFA or regular expression for the language. Otherwise, use the pumping lemma for regular languages or closure properties to prove the language is not regular. 1) L = { 0 n1 k : k ≤ n ≤ 2k} 2) L = { 0 n1 k : n > 0, k > 0 } È { 1 k0 n : k > 0, n...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT