2. (10 points) Use the pumping lemma for context free grammars
to show the following languages are not context-free.
(a) (5 points)
.
(b) (5 points)
L = {w ◦ Reverse(w) ◦ w | w ∈ {0,1}∗}.
If L were context free, then the pumping lemma should hold. Let z = 0^n 1^{n+1} 0^{n+2}. Given this string and knowing that |z| >= n, we want to define z as uvwxy such that |vwx| <= n, |vx| >= 1. Because |vwx| <= n, there are five possible descriptions of uvwxy: 1. vwx is 0^p for some p<=n, p>=1 2. vwx is 0^p 1^q for some p+q<=n, p+q>=1 3. vwx is 1^p for some p<=n, p>=1 4. vwx is 1^p 0^q for some p+q<=n, p+q>=1 5. vwx is 1^q for some i<=n, i>=1 Note that because |vwx| <= n, vwx cannot contain "0"s. For all of these cases, u v^i w x^i y, i>=0, should be in the language. In case 1, if i=3 we will be adding an 00 to the string, making the number of "0"s n+2 and thus the string is not in the language since the number of 0's is more than the number of 1's, i.e., i > j.
This means that our assumption was wrong and L is not context free.
NOTE: As per HOMEWORKLIB POLICY I am allowed to answer specific number
of questions (including sub-parts) on a single post. Kindly post
the remaining questions separately and I will try to answer them.
Sorry for the inconvenience caused.
2. (10 points) Use the pumping lemma for context free grammars to show the following languages...
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.
Use the pumping lemma for context-free languages to prove that L3 is not a CFL. L3 = { w: w e{a,b,c}* and na(w) < nh(w) < nc(w) }.
Use the CFL (Context Free Language) Pumping Lemma to show each of the following language not to be context-free: a) {a^n b^n c^i | i < n} b) {www | w is a binary string over {0,1}} SHOW ALL WORK AND LEAVE NO STEPS OUT!! NEED THIS ASAP! THANKS!!
Theory of Computation - Non Context Free Languages Use the Context-Free Pumping Lemma to prove that the following language is NOT context-free:
Can someone use pumping Lemma to show if these are regular languages or not c) Is L regular? give a finite automaton or prove using pumping lemma. (d) Is L context-free? give a context-free grammar or pushdown automaton, otherwise pr using pumping lemma. (16 pts)Given the set PRIMES (aP | p is prime (a) Prove that PRIMES is not regular. (b) Prove that PRIMES is not context-free. (c) Show if complement of PRIMES (PRIMES ) is regular or not. d)...
show that the language is context-free, or use the pumping lemma to show that the language is non-context-free . waxl w.x e fo.1 and w contains the substring
2. (6 pts) Use the pumping lemma for context-free languages and the string s = ap + 1 bpcP+1 to show that L (amb"cm | 0 < n < m} is not context-free. 2. (6 pts) Use the pumping lemma for context-free languages and the string s = ap + 1 bpcP+1 to show that L (amb"cm | 0
Does a non-context-free language exist that doesn't break any of the rules of the pumping lemma for context-free languages? Yes. If a language is finite, it will pass the pumping lemma. No. Since the pumping lemma is used to prove a language is not context-free, a non-context-free language has to break the rules of the pumping lemma. No. If the results of a pumping lemma proof are inconclusive, a bad string was chosen. Yes. Otherwise, we could use the pumping...
Use the pumping lemma to show that the following languages are not context free: a)0^n0^2n0^3n;n>=0 b) {w#x \ where w.x e {a,b) * and w is a substring of x} c) (a^ib^ja^ib^j|i,j>0) answer should be very clear .otherwise I will down vote .
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)}