1.context free grammer for language with atleast 2 os
S→X0X0X
X→0X|1X|E
2. context free grammer for language contaim a substring 010
S-> 0S|1S|010T
T->0T|1T|E
3. context free grammer for language start and end with same symbol
S→0T0|1T1
T→0T|1T|E
4.context free grammer for palindrom
S→0S0|1S1|0|1|E
if you have any doubt please comment . Please like or upvote . Thanks
Problem 2 (20 points). Give context-free grammars that generate the following languages. In all parts, the...
Give context-free grammars that generate the following languages (E = {a,b}). (a) (1 point) L1 = {w | W contains at least two b's} (b) (1 point) L2 = {w/w = wf, w is a palindrome} (c) (1 point) L3 = {w w contains less a's than b's}. (d) (1 point) LA = {w w = ayn+1, n > 2} (e) (1 points) Ls = {w w = a";2(m+n)cm, m, n >0}; (S = {a,b,c}).
5. (5 points) Give context-free grammar that generate the following languages (1) (w is a binary string, and w starts and ends with the same symbol (2) the empty language (empty set)
Formal Languages and Automata Theory Q2. Give context-free grammars that generate the following language: { w є {0, 1} | w contains at least three 1's)
can somebody answer this question? Give the Context Free Grammars which generate the following languages: a) La = {w ∈ {0, 1} ∗ : w has at least twice as many zeroes as ones }.
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
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 }
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)}
Give context-free grammars generating each of the following languages over Σ = {0, 1}: {w : |w| ≤ 5} {w : |w| > 5 or its third symbol is 1} {w : every odd position of w is 1}
Write the context-free grammars which generate the following languages: a. ?={?∈{?,?}∗ | ? is an odd length string}
Give context-free grammars to generate the following languages. Each CFG should have at most two variables.