Home » Compiler Design » Compiler design miscellaneous » Question

Compiler design miscellaneous

Direction: Consider the CFG with {S, A, B} as the non-terminal alphabet, {a, b} as the terminal alphabet, S as the start symbol and the following set of production rules

  1. For the correct answer strings to Q. above, how many derivation trees are there?
    1. 1
    2. 2
    3. 3
    4. 4
Correct Option: B

The string received is aabbab. We can total 2 derivation trees: Leftmost derivation and rightmost derivation.



Your comments will be displayed only after manual approval.