A CFG G is given with the following productions where S is the start symbol, A…

GATE · 2008 · IT

A CFG G is given with the following productions where S is the start symbol, A is a non-terminal and a and b are terminals.

S → aS∣A

A → aAb∣bAa∣ϵ

For the string "aabbaab" how many steps are required to derive the string and how many parse trees are there?

  1. A.

    6 and 1

  2. B.

    6 and 2

  3. C.

    7 and 2

  4. D.

    4 and 2

Attempted by 209 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…