Note: make sure to use the closure properties of the context-free languages.
1. Show that the following languages are context-free. You can do this by writing a context free grammar or a PDA, or you can use the closure theorems for context-free languages. For example, you could show that L is the union of two simpler context-free languages. (b) L {0, 1}* - {0"1" :n z 0}
1. Show that the following languages are context-free. You can do this by writing a context free grammar or a PDA, or you can use the closure theorems for context-free languages. For example, you could show that L is the union of two simpler context-free languages. (d) L = {0, 1}* - L1, where L1 is the language {1010010001…10n-110n1 : n n ≥ 1}.
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)...
3. (20 pt.) Prove that the following language is not regular using the closure properties of regular languages. C = {0"1"|m,n0 and mon} Hint: find a regular language L such that CNL is not regular and use the closure properties of regular languages to show that this means that C is not regular.
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}∗}.
I free grammar for this language L. lemma for context free grammars to show t 1. {OʻPOT<)} L = {w • Reverse(w) w we {0,1}*). DA+hattha follaurino lano
Problem 8 You can assume that L = {a"be": n > 0} is not context free. Prove the following: Show that L-ab: n20 is not context free Show that L = {w E {a,b,c,d)* : na(w) = nb(w)-ne(w) = nd(w)) is not context free Note that na(w) means the number of a's in w .
Give context-free grammars for the following languages: (b) {w € {a,b}* : na(w) # 2n6(w)}