Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( a ) Consider the grammar L below: S - > NP V P | V P NP NP - > Pronoun | Proper Noun

(a) Consider the grammar L below:
S -> NP V P | V P NP
NP -> Pronoun | Proper Noun | Determiner Nominal | NP PP
V P -> Verb | V P NP | V P PP
PP -> Preposition NP
ADV P -> Adverb
Nominal -> Noun Nominal | Noun
Noun -> flight | breeze | trip | morning | afternoon
V erb -> is | prefer | takes | need | want | fly .
Adjective -> cheapest | long | first | latest | other
Adverb -> very
Pronoun -> me | I | you | it
Proper Noun -> London | New York | Cape Town
Determiner -> the | a | an | this | these | that
Preposition -> from | to | on | near
Conjunction -> and | or | but
Is L a context-free grammar? Justify your answer. (6)
(b) Using L from (a) above, give the complete parse tree for the sentence
Do you desire the morning flight from New York to Lon do n?
You should enhance the grammar by adding one or more production rules in an appropriate
way, if you deem it necessary, in order to produce a linguistically valid parse
tree.
You do not need to include the question mark (?) as part of the parse tree.(a) Consider the grammar L below:
Is L a context-free grammar? Justify your answer. (6)
(b) Using L from (a) above, give the complete parse tree for the sentence
Do you desire the morning flight from New York to London?
You should enhance the grammar by adding one or more production rules in an ap-
propriate way, if you deem it necessary, in order to produce a linguistically valid parse
tree.
You do not need to include the question mark (?) as part of the parse tree. (12)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions