Question:

Consider the sentence “Little children marched past the church sang”.
Assume the starting rule of the context free grammar describing the language to be S → NP VP, where S is the start symbol, NP is the noun phrase and VP is the verb phrase. For the given sentence, how many words does VP contain?

Show Hint

In basic CFG analysis, VP begins immediately after NP and minimally contains the main verb.
Updated On: Dec 20, 2025
  • One
  • Two
  • Three
  • Four
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: Identifying NP and VP.
Given the rule S → NP VP, the sentence must be divided into a noun phrase followed by a verb phrase.
Sentence:
{Little children marched past the church sang}
The noun phrase (NP) is:
Little children
Step 2: Identifying the VP.
The verb phrase begins immediately after the NP. In this sentence, the first verb encountered is marched.
The remaining sequence “past the church sang” does not form part of the VP under a simple CFG without coordination or embedding, making the sentence syntactically ill-formed.
Thus, the VP minimally contains only the verb marched.
Step 3: Counting words in VP.
VP = marched → 1 word
Step 4: Conclusion.
Under the given grammar rule, the VP contains only one word.
Final Answer: (A)
Was this answer helpful?
0
0

Questions Asked in GATE XH- C3 exam

View More Questions