# Recent questions tagged grammar

1 answer 10 views
I have a language $L= \{a^nb^nc^m : n, m \ge 0\}$. Now, I wanted to determine whether this language is linear or not. So, I came up with this grammar: $S \rightarrow A\thinspace|\thinspace Sc$ $A \rightarrow aAb \thinspace | \thinspace \lambda$ I'm pretty ... So, I'm unable to find whether the language is linear or not and what goes wrong in above logic with either case. Please help.
0 answers 15 views
Which of the following grammar(s) produce regular languages?
1 answer 16 views
Identify from the following the string generated by following $S→SS ,$ $S \rightarrow \ (S_1,$ $S_1→S) ,$ $S_1 \rightarrow )$ A. $(( ) ( ) ))$ B. $((((( )))))) ($ C. $( ) ( ) ( ) ( ))$ D.$(( ) ((( )) ( )))$
4 answers 137 views
What is the maximum number of language a context-free Grammar (CFG) can generate? Three Two One Infinite
–1 vote
1 answer 26 views
1 answer 23 views
2 answers 29 views
Write the grammar for the following language : $L = \{w : n_a (w)= n_b (w) + 1\}$ where no. of $a’s$ is one more than no. of $b’s.$
Find grammar for the language on $\sum$={a} L={w | |w| mod 3>0} is this correct? S->aA A->aB | $\varepsilon$ B->aS | $\varepsilon$