Question: Question 4 (53=15 points ) Note that the questions below have a sequence, so working through them in increasing order helps you firm up your

 Question 4 (53=15 points ) Note that the questions below have

Question 4 (53=15 points ) Note that the questions below have a sequence, so working through them in increasing order helps you firm up your concepts better. G is a grammar of the form S>DSSS+S where D represents mathematical digits. 1. Derive 634 using leftmost derivation if it is possible. 2. Draw all possible parse trees for the above string. 3. Derive 91 - using rightmost derivation if it is possible. 4. Derive 8+6+35 using a derivation that is not leftmost or rightmost (Note - we DO NOT want to see parse trees) 5. How many left most and right most derivations do we have for the above string? Why? Question 5 The following is based on Question 4 1. How many parse trees can we construct for the string in Q4.4 ? 2. Is the number of derivations for the string in Q 4.4 the same as the number of parse trees? Why/ why not? 3. Is this grammar ambiguous? Why/why not? 4. If the grammar is ambiguous (it need not be), try to design a new grammar to remove its ambiguity. 5. For the above question is it possible to do it in multiple ways, and if yes, in each such method, is there some 'meaning' to + and , or their order

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!