What are derivative trees in CFG?
18 views
- Trees used for representing the parse tree of a sentence (Correct Answer)
- Trees used for representing the language generated by a grammar
- Trees used for representing the set of production rules of a grammar
- None of the above
Explanation
Answer: a) Trees used for representing the parse tree of a sentence.
Explanation: Derivative trees are a data structure used in the bottom-up approach to parsing a sentence according to a context-free grammar. They represent the parse tree of a sentence as a tree of symbols, where each node represents a symbol in the grammar and each edge represents a production rule.