show that the language is non context free example from pg.195 Using an argument
ID: 3552696 • Letter: S
Question
show that the language is non context free
example from pg.195
Explanation / Answer
now first let us assume that P is a prime number.
so a^p is in the given language.
Claim: L is a context free language. so we can apply pumping lemma.
let a^p =uvxyz (we divided our string into 5 substrings)
(if given language is Context free language then if a string s=uvxyz is in language ,then s=u v^n x y^n z for all values of n>=0 must be in the language. if atlest one of those strings is not present then its not a context free language.)
now let v=a^i and y=a^j and let i+j >=1
now we pump the string a^p
----from the pumping lemma we will get...
u.v^(1+p).x.y^(1+p).z (here we took the value of n as p+1)
(by expanding this expression we get)
(u).( v) . (v^p).( x) .(y).( y^)p.( z)
(by rearrangin this expression we get)
u . v . x. y. z .(v^p) .(y^p)
(as a^p = u.v.x.y.z we get)
a^p..(v^p) .(y^p)
now put v=a^i and y=a^j
we get
a^p..(a^p.i) .(a^p.j)
finally taking p common in the power we get
a^p(1+i+j)
now even a^p(1+i+j) must be in our language. but that is not possible as p(1+i+j) is not a prime number
so our claim that L is a context free language is False.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.