Question

In: Computer Science

L ={x^a y^b z^c | c=a+b} a) Prove that L is not regular. b)Prove by giving...

L ={x^a y^b z^c | c=a+b}

a) Prove that L is not regular.

b)Prove by giving a context-free grammar that the L is context free.

c)Give a regular expression of the complement L'.

Solutions

Expert Solution

****************Please provide feedback for any issue in solution. Thanks ****************

Note: A language is regular or not can be done using pumping lemma. Pumping Lemma is tough to explain that why i deferred using it. I even didn't come across a easy and good explanation using pumping lemma.

SOLUTION

Part a) The L is not regular because c=a+b in consists of counting i.e. a+b is equal to c, require maintaining sum of a+b, with c

This can be achieved only using a stack see image below for example w=abcc .

The stack pushes a and b into the stack whenever a c encountered on element is popped. If during course of scanning string, end of input is reached without a empty stack sting is not accepted. otherwise an empty stack with end of input designates string acceptance.Rest cases where either stack is empty or input string is completely scanned the string is rejected.

=================================================================

part b)

where A is start symbol and is null string.

=====================================================================

part c)

complement of is does not have a regular expression. If this has been the case would have been regular too.

Regular languages are closed under complementation. If is regular than complement of which is . would be regular which we prove to not regular.


Related Solutions

L ={x^a y^b z^c | c=a+b} a) Prove that L is not regular. b)Prove by giving...
L ={x^a y^b z^c | c=a+b} a) Prove that L is not regular. b)Prove by giving a context-free grammar that the L is context free. c)Give a regular expression of the complement L'.
L= {x^a y^b z^c | c=a+b(mod 2)} .Create a DFA and NFA for the language L....
L= {x^a y^b z^c | c=a+b(mod 2)} .Create a DFA and NFA for the language L. Solution and explanation please..
If X, Y and Z are three arbitrary vectors, prove these identities: a. (X×Y).Z = X.(Y×Z)...
If X, Y and Z are three arbitrary vectors, prove these identities: a. (X×Y).Z = X.(Y×Z) b. X×(Y×Z) = (X.Z)Y – (X.Y)Z c. X.(Y×Z) = -Y.(X×Z)
Use two different ways to prove X Y + Z = (X + Z)(Y + Z)....
Use two different ways to prove X Y + Z = (X + Z)(Y + Z). a) Use pure algebraic way b) k-maps
1. Prove the language L is not regular, over the alphabet Σ = {a, b}. L...
1. Prove the language L is not regular, over the alphabet Σ = {a, b}. L = { aib2i : i > 0} 2) Prove the language M is not regular, over the alphabet Σ = {a, b}. M = { wwR : w is an element of Σ* i.e. w is any string, and wR means the string w written in reverse}. In other words, language M is even-length palindromes.
Let x, y ∈ Z. Prove that x ≡ y + 1 (mod 2) if and...
Let x, y ∈ Z. Prove that x ≡ y + 1 (mod 2) if and only if x ≡ y + 1 (mod 4) or x ≡ y + 3 (mod 4)
Create separate class with these members a, b, c, x, y, z int a b c...
Create separate class with these members a, b, c, x, y, z int a b c float x y z Demonstrate 3) A two arg float, int constructor, and a three arg int, float, float constructor to instantiate objects, initialize variables read from the keyboard, display the sum Note:- Please type and execute this above java program and also give the output for both problems. (Type a java program)
Create separate class with these members a, b, c, x, y, z int a b c...
Create separate class with these members a, b, c, x, y, z int a b c float x y z Demonstrate 1) A two arg float constructor, and a two arg int constructor to instantiate objects, initialize variables read from the keyboard, display the sum. Note:- Please type and execute this above java program and also give the output for both problems. (Type a java program)
Prove that The OR operation is closed for all x, y ∈ B x + y ∈ B
Boolean AlgebraProve that The OR operation is closed for all x, y ∈ B x + y ∈ BandProve that The And operation is closed for all x, y ∈ B x . y ∈ B
Let x, y, z be a primitive Pythagorean triple with y even. Prove that x+y ≡...
Let x, y, z be a primitive Pythagorean triple with y even. Prove that x+y ≡ x−y ≡ ±1 mod 8.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT