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
hello
I have used Pumping lemma to prove that the given language is
not regular
If NPDA (nondeterministic pushdown automaton) exist for a given
language, then the give is Context-free language, and its grammar
is a context-free grammar
The complement of Context-free language is not Regular, and
Regular expression only exist For Regular Languages in Finite
automata
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'.
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.
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
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)