Answer
S -> aaaSbbb | epsilon
Explanation
To be a multiple of 3, it has to be in 3s. epsilon is to end the string and for zero.
--------------------------------------
Multiple questions are posted. Answered one. Please post one at a
time. HOMEWORKLIB RULES.
Question 3 (5 Points) Find context free grammars L = a"b",n is a multiple of three...
Formal Languages & Automata Theory 1411372 Pages 133,134 Problems: 7(a,b), 8 (b,c) 5.1 CoNTEXT-FREE GRAMMARS 133 EXERGISES 7. Find context-free grammars for the following languages (with n 2 0, m 0) (a) L = {a"b"": n < m + 3).
Give context-free grammars that generate the following languages. { anw | w in { a, b }*, |w| = 2n, n > 0 } { an bm | n, m ≥ 0; n < 2m } { anx an y | n > 0, x,y in { a, b }* } { ai bj ck | i, j, k ≥ 0; j = i + k }
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
Can someone do PART C ONLY (k=n+m) please?? Thanks!! 12. Find context-free grammars for the following languages (with n2 0, m 2 0, k 20): (a) L = {anlynck : n = m or m k). (b) L = {anbmck : n = 111 or 111 # k}
Exercise 7.3.2: Consider the following two languages: Li = {a"b2ncm n,m >0} L2 = {a" mc2m | n,m >0} a) Show that each of these languages is context-free by giving grammars for each. ! b) Is L; n L, a CFL? Justify your answer.
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...
n=2 Question 3 3 pts Find the Fourier Sine series for the function defined by 0<c<n f() = { 0, 2n, n<3 < 2n and write down, 1. The period T and the frequency wo of the Fourier Sine series 2. The coefficients bn for n = 1,2,3,...
n=7 Question 3 3 pts Find the Fourier Sine series for the function defined by f(x) = { 0, 2n, 0 <*n n<<2n and write down, 1. The period T and the frequency wo of the Fourier Sine series 2. The coefficients for r = 1,2,3,...
Construct context-free grammars that generate each of these languages: A. tw E 10, 1 l w contains at least three 1s B. Hw E 10, 1 the length of w is odd and the middle symbol is 0 C. f0, 1 L fx l x xR (x is not a palindrome) m n. F. w E ta, b)* w has twice as many b's as a s G. a b ch 1, J, k20, and 1 or i k
5. Prove that the following languages are not regular: (a) L = {a"bak-k < n+1). (b) L-(angla": kメn + 1). (c) L = {anglak : n = l or l k} . (d) L = {anb : n2 1} L = {w : na (w)关nb (w)). "(f) L = {ww : w E {a, b)'). (g) L = {w"www" : w E {a,b}*}