recategorized by
5,357 views
3 votes
3 votes

The equivalent grammar corresponding to the grammar $G:S \rightarrow aA, A \rightarrow BB, B \rightarrow aBb \mid \varepsilon$ is

  1. $S \rightarrow aA, A \rightarrow BB, B \rightarrow aBb$
  2. $S \rightarrow a \mid aA, A \rightarrow BB, B \rightarrow aBb \mid ab$
  3. $S \rightarrow a \mid aA, A \rightarrow BB \mid B, B \rightarrow aBb$
  4. $S \rightarrow a \mid aA, A \rightarrow BB \mid B , B \rightarrow aBb \mid ab$
recategorized by

2 Answers

Best answer
3 votes
3 votes

G:S$\rightarrow$aA

A $\rightarrow$ BB

B$\rightarrow$ aBb /∈

(A) Here S can generate a (s->aA->aBB->aB->a) which can not generate by A.So we can eliminate this option.

(B)In this option we can not able to generate aab which can be generate by given grammar.So we can eliminate this option.
 

(C)In this option we can generate  a. we can't generate anything other than a because there is no terminal present to stop B.So we can eliminate this option.

Answer should be (D)G:S$\rightarrow$aA , A $\rightarrow$ BB/B , B$\rightarrow$ aBb /ab.

selected by
1 votes
1 votes
If we remove ∊ production from the grammer

Answer should be

$S \rightarrow a \mid Aa, A \rightarrow BB \mid B, B \rightarrow aBb \mid ab$

Hence none of he options matching here
Answer:

Related questions

2 votes
2 votes
2 answers
2
go_editor asked Jul 7, 2016
5,014 views
Match the following :$\begin{array} {clcl} \text{(i)}& \text{Regular grammer} & \text{(a)} & \text{Pushdown automaton} \\ \text{(ii)}& \text{Context free grammer} & \tex...
3 votes
3 votes
1 answer
3
1 votes
1 votes
1 answer
4