Recent questions tagged context-free-grammar

0 votes
1 answer
301
0 votes
0 answers
304
L1 = {an bm | n ≤ m ≤ 2n}L2 = {an bm│m≠n & m≠2n}Which of the following is true?A. Only L1 is CFGB. Only L2 is CFGC. Both are CFGD. None of them is CFG
1 votes
5 answers
305
1 votes
4 answers
306
2 votes
1 answer
307
Convert the grammar to reduced form ?S->AB S->CA B->BC B->AB A->a C->aB |b
2 votes
1 answer
309
$\begin{align*} & L = \left \{ w \in \left \{ a,b \right \}^{*}\;\; : n_a(w) \neq n_b(w) \right \} \\ & S\rightarrow aSb|bSa|A|B \\ & A \rightarrow aA|a \\ & B \rightarro...
0 votes
3 answers
313
S->AbaCA->BCB->b/epsilonC->D/epsilonD->d I want to know that will A contain epsilon as B and C both are null variables???(In Elimination of epsilon-production)
1 votes
1 answer
315
design cfg for(i) {aibjck|i=j+k}(ii){aibj|i<=2j}
1 votes
5 answers
318
Consider the following CFG:E E*T/T+E/TT (T*F)/FF idWhich of the following strings are not generated by above CFG?A id+id+idB id∗id∗idC (id∗id∗id)D None of t...
1 votes
0 answers
321
2 votes
4 answers
323
Which of the following is the most general phase-structured grammar?(a) regular (b) context-free(c) context-sensitive (d) none of the above
4 votes
2 answers
324
Which of the following grammars are not phase-structured?(a) regular (b) context-free(c) context-sensitive (d) none of the above
3 votes
1 answer
328
1 votes
2 answers
329