Solution Set 1

Answer to both questions

A recursive descent parser finds the following parse trees in the following order.
S ---> NP ---> Noun ---> "People"
   |
   |-> VP ---> Verb ---> "buy"
           |
           |-> NP ---> Noun ---> "books"
                   |
                   |-> PPLIST -> PP ---> Prep ---> "for"
                                     |
                                     |-> NP ---> Noun ---> "classes"
                                             |
                                             |-> PPLIST -> PP ---> Prep --> "in"
                                                               |
                                                               |-> NP -> Noun -> "bookstores"


Compare "People drink wine from vinyards in France."

S ---> NP ---> Noun ---> "People"
   |
   |-> VP ---> Verb ---> "buy"
           |
           |-> NP ---> Noun ---> "books"
                   |
                   |-> PPLIST ---> PP ---> Prep ---> "for"
                               |       |
                               |       |-> NP ---> Noun ---> "classes"
                               |              
                               |-> PPLIST -> PP ---> Prep --> "in"
                                                 |
                                                 |-> NP -> Noun -> "bookstores"

Compare "People eat peaches from California with cream."


S ---> NP ---> Noun ---> "People"
   |
   |-> VP ---> Verb ---> "buy"
           |
           |-> NP ---> Noun ---> "books"
           |
           |-> PPLIST -> PP ---> Prep ---> "for"
                             |
                             |-> NP ---> Noun ---> "classes"
                                     |
                                     |-> PPLIST -> PP ---> Prep --> "in"
                                                       |
                                                       |-> NP -> Noun -> "bookstores"

Compare "Kings eat dinner with utensils of gold".

S ---> NP ---> Noun ---> "People"
|
   |-> VP ---> Verb ---> "buy"
           |
           |-> NP ---> Noun ---> "books"
           |
           |-> PPLIST ---> PP ---> Prep ---> "for"
                       |       |
                       |       |-> NP ---> Noun ---> "classes"
                       |
                       |-> PPLIST -> PP ---> Prep --> "in"
                                         |
                                         |-> NP -> Noun -> "bookstores"

Compare "People play golf on weekends for pleasure."

S ---> NP ---> Noun ---> "People"
   |
   |-> VP ---> Verb ---> "buy"
           |
           |-> NP ---> Noun ---> "books"
           |       |
           |       |-> PPLIST -> PP ---> Prep ---> "for"
           |                         |
           |                         |-> NP ---> Noun ---> "classes"
           |
           |-> PPLIST -> PP ---> Prep --> "in"
                                       |
                                       |-> NP -> Noun -> "bookstores"

Compare: "People eat peaches with cream for dessert."