Correct option is D
Information Booster
1.
Parse Tree:
· A graphical representation of the syntactic structure of a string according to a grammar.
· Different parse trees represent different derivations of the string.
2.
Leftmost and Rightmost Derivations:
· Leftmost: Always expand the leftmost non-terminal first.
· Rightmost: Always expand the rightmost non-terminal first.
3.
Ambiguity in Grammar:
· A grammar is ambiguous if a string has more than one parse tree or derivation.
· The given grammar is ambiguous for strings like ababab.
Additional Knowledge
·
Unambiguous Grammar: A grammar where every valid string has a unique parse tree.
·
Chomsky Normal Form (CNF): Used to simplify grammar and remove ambiguity where possible.