22. The key difference between a left-most and a right-most derivation is that r
ID: 3606310 • Letter: 2
Question
22. The key difference between a left-most and a right-most derivation is that result (in function myf2): read/write access A. left-most derivations always start with the starting rule (or at the root of the tree) while right most derivations always start with the input string and work their way up to the starting rule (or start at the leaves and work towards the root) B. Left-most derivations are generators and right-most derivations are recognizers. Given a sentential form that contains multiple non-terminals, a left-most derivation always picks the left-most non-terminal to reduce next, while a right-most derivation always picks the right- most non-terminal to reduce next. C. A right-most derivation uses the handle-pruning technique to derive a sentence, while a left- most derivation uses the left-recursive technique to derive a sentence. D.Explanation / Answer
Ans: The key difference between the right-most and left-most derivation is that: option A
REASON WHY OPTION C IS INCORRECT:
Here we have a doubt between Option A and Option C but as we can see in Option C what actually given is "a left most derivation always choose the left most non-terminal to reduce next....." but this is not possible as we always need terminal to reduce rather than non-terminal because terminals are not furthur reducable>
REASON WHY OPTION A IS CORRECT:
In Left-most derivation we use prefix notation that is [Root, Left, Right] whereas in right-most we use postfix that is [Left, Right,Root].
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.