A grammar to generate
{ (ab)n I n ≥ 1 } ∪ { (ba)n I n ≥ 1 }
is constructed as
A. | S ---> S1, S1 ---> abS1, S1 ---> ab, S ---> S2, S2 —> baS2, S2 —> ba |
B. | S ---> S1 , Sl ---> aS1, S1 ---> ab, S ---> S2, S2 ---> bS2, S2 —> bc |
C. | S —> S1, S1—>S2, S2 —> S1a, S1 —> ab, S2 —> ba |
D. | none of these |
Answer : C Explanation : |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |