Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Show that the stringthe girl touches the boy with the flowerhas two different leftmost derivations in grammar G2 on page 103. Describe in English the two different meanings of this sentence.

Short Answer

Expert verified

It can be shown that the given string can be derived in two different leftmost derivations in grammar G2.

Derivation 1, gives the meaning of the sentence as that the girl used the flower to touch the boy. Derivation 2 , means that the boy is holding the flower when the girl touches her.

Step by step solution

01

Explain leftmost derivations.

The leftmost derivation is derived by using the productions from the grammar. The derivation of the string from the grammar starts at the leftmost end of the string, thus it is called leftmost derivation.

02

Show that the given string can be derived in two leftmost derivations and it has two meanings.

Consider the string,the girl touches the boy with the flowerto perform left most derivation. The string can be derived using the grammar G2on page 103 as follows.

Derivation 1:

localid="1662113548058" SENTENCENOUN-PHRASEVERB-PHRASESENTENCECOMPLEX-NOUNVERB-PHRASESENTENCECOMPLEX-NOUNCOMPLEX-VERBPREP-PHRASESENTENCEARTICLENOUNCOMPLEX-VERBPREP-PHRASEARTICLENOUNCOMPLEX-VERBPREP-PHRASEThegirlCOMPLEX-VERBPREP-PHRASEThegirlVERBNOUN-PHRASEPREP-PHRASEThegirltouchesNOUN-PHRASEPREP-PHRASEThegirltouchesCOMPLEX-NOUNPREP-PHRASEThegirltouchesARTICLENOUNPREP-PHRASEThegirltouchestheNOUNPREP-PHRASEThegirltouchestheboyPREP-PHRASEThegirltouchestheboyPREPCOMPLEX-NOUNThegirltouchestheboywithCOMPLEX-NOUNThegirltouchestheboywithARTICLENOUNThegirltouchestheboywiththeNOUNThegirltouchestheboywiththeflowerDerivation 2:

localid="1662113579670" SENTENCENOUN-PHRASEVERB-PHRASESENTENCECOMPLEX-NOUNVERB-PHRASESENTENCEARTICLENOUNVERB-PHRASEARTICLENOUNVERB-PHRASETheNOUNVERB-PHRASEThegirlVERB-PHRASEThegirlCOMPLEX-VERBPREP-PHRASEThegirlVERBNOUN-PHRASEPREP-PHRASEThegirltouchesNOUN-PHRASEPREP-PHRASEThegirltouchesCOMPLEX-NOUNPREP-PHRASEThegirltouchesARTICLENOUNPREP-PHRASEThegirltouchestheNOUNPREP-PHRASEThegirltouchestheboyPREP-PHRASEThegirltouchestheboyPREPCOMPLEX-NOUNThegirltouchestheboywithCOMPLEX-NOUNThegirltouchestheboywithARTICLENOUNThegirltouchestheboywiththeNOUNThegirltouchestheboywiththeflower

Derivation 1, gives the meaning of the sentence as that the girl used the flower to touch the boy. Derivation 2 , means that the boy is holding the flower when the girl touches her.

Therefore, the string has been derived in two ways that gives two meanings.

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free