Solution
Let "A" as a language over {a,b,c} with equal number of a,b,c's
Let "B" is {aibjck | i,j,k>=0} or a*b*c* that is regular
As we know the intersection of a context free language & regular language is context free(1st fact)
If "A" were context free then A∩B will be also context free
but A B equals {an bn cn | n>=0}
that is not context free(2nd fact) &
It follows that "A" is not context free
---
all the best
[4 points) Prove that the following language over = {a,b,c} is not context free: Li =...
4. (Non-CFLs) Prove that the following languages are not context-free. (b) The following language over the alphabet {a, b, c}: B = {aix | i ≥ 0, x ∈ {b, c}* , and if i = 1 then x = ww for some string w}. (Careful: B satisfies the pumping lemma for CFLs! Make sure you understand why, but you don’t need to write it down.)
1. Îs the language Li = {aPble" | p,q,r > 1 and r = pg) a context-free language? Prove your answer. 1. Îs the language Li = {aPble" | p,q,r > 1 and r = pg) a context-free language? Prove your answer.
use the pumping lemma for context free languages to prove the language is not context free. B = {w#t | w is a substring of t, where wit e {a,b}*}. Hint: consider s = apbº#apba.
give context free grammer for this language 1. 35 Points] Give context-free grammars for the following languages: (c) wEfa, b, c}* : |w = 5na(w) +2n(w)}
Consider the following languages Li and L2, respectively, and construct a context free grammar for it if it is a context free language; if not, using the pumping lemma to disprove it. Let na(w) denote the number if a is w, same notation for to now) and nc(w). • L1 = {w we {a,b}* and na(w) = nb(w)} • L2 = {w I w€ {a,b,c}* and na(w) = n5(w) = nc(w)}
Give a context free grammar for the language L where L = {a"bam I n>:O and there exists k>-o such that m=2"k+n) 3. Give a nondeterministic pushdown automata that recognizes the set of strings in L from question 3 above. Acceptance should be by accept state. 4. 5 Give a context-free grammar for the set (abc il j or j -k) ie, the set of strings of a's followed by b's followed by c's, such that there are either a...
Prove that the following language L is not a Context Free Language using the Pumping Theorem D = { 0, 1, 2, 3, 5} V = { a, e, i, o, u} C = { d, f, g, h, j } ? = D ? V ? C L = { w : amount(D) < amount(V) < amount(C) } "Amount of symbols in w that are elements of D" < "Amount of symbols in w that are elements of V"...
Find the context free Grammar for the following language L = {w ∈ {a, b, c}* : na (w) + nb (w) ≠ nc (w)}.
5. Is the following language A context-free? You either show that A is context-free by giving a context-free grammar for A, or prove that A is not context-free language using the context-free language pumping lemma