retagged by
10,018 views
6 votes
6 votes

Consider the grammar

  • $S \rightarrow ABCc \mid bc$
  • $BA \rightarrow AB$
  • $Bb \rightarrow bb$
  • $Ab \rightarrow ab$
  • $Aa \rightarrow aa$

Which of the following sentences can be derived by this grammar?

  1. abc
  2. aab
  3. abcc
  4. abbc
retagged by

7 Answers

1 votes
1 votes
nothing will be generated question is wrong according to me.
1 votes
1 votes
C is useless nd there is no way to remove it so cnt produce any given output
0 votes
0 votes
S-> ABCc/bc

if Aa->aa

Bb->bb

then Cc->cc

from this A->a; B->b; C->c

we get S->abcc
Answer:

Related questions

44 votes
44 votes
5 answers
1
Kathleen asked Sep 14, 2014
17,117 views
More than one word are put in one cache block to:exploit the temporal locality of reference in a programexploit the spatial locality of reference in a programreduce the m...
2 votes
2 votes
2 answers
2
go_editor asked Jun 13, 2016
4,365 views
In C, what is the effect of a negative number in a field width specifier?the values are displayed right justifiedthe values are displayed centeredthe values are displayed...
7 votes
7 votes
4 answers
3
go_editor asked Jun 13, 2016
3,283 views
Repeated execution of simple computation may cause compounding ofround-off errorssyntax errorsrun-time errorslogic errors
8 votes
8 votes
1 answer
4
go_editor asked Jun 13, 2016
4,013 views
Consider the graph shown in the figure below:Which of the following is a valid strong component?$a, c, d$$a, b, d$$b, c, d$$a, b, c$