With Proper explanation and example.
Answer
S -> aAa
A -> bAb | bbabb
Explanation
S -> aAa
Above is for first a and last a
We are left with b^n a b^n
n>1 which means n should be 2, 3, 4, etc
Minimum of 2 should be there for n.
So, bbabb is there
To have 0/more b's, we have b -> bAb
Please up vote
With Proper explanation and example. Construct a context-free grammar for the language L={ ab”ab”a | n>...
) Construct a context-free grammar for the language L={ ab”ab”a | n> > 1}.
Construct a context-free grammar for the language L={ ab”ab”a | n> 1}.
Construct a context-free grammar for the language L={ ab"ab'an> 1}.
Construct a context-free grammar for the language L={ab'ab'an> 1}.
Construct a context-free grammar for the language L={ ab^n ab^n a | n> 1}.
4. Fill out the following blanks to make it a context-free grammar for the given language: { an+1 bn | n >= 0}{a2nbn2 | n >= 0 } (8 points) S + AB, A → B
which of these answers is correct? NUMBER 1 NUMBER 2 also please give the reason. Thank you! Construct a context-free grammar for the language L={ ab'ab'an> 1}. S → AAa A → aB B → 6B|bb S->ata T-> bCb C->bCba
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...
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 .
construct a context free grammar for the language l {a^nc^mb^n: n,m Greaterthanorequalto 0}