US 3 • DAVID G. KAY • UC IRVINE • SPRING 2018
The timing of these assignments is somewhat flexible, depending on exactly what we talk about in class.
Here is a phrase-structure grammar like the one we looked at in class. It describes an extremely limited subset of English. Each line is a "rewrite rule"—it says that the item to the left of the arrow can be rewritten as the item(s) to the right of the arrow. Thus, the first line says that S (for "sentence") can be rewritten as NP (for "noun phrase") followed by VP (for "verb phrase"). The vertical bar means "or" (so the last line says that V can become "
ate" or "
chased" or "
saw". (We use the
typewriter font to indicate "terminal symbols" that could occur in the language as part of the final sentence (i.e., that can't be rewritten because they don't occur on the left side of any grammar rule).)
S —> NP VP
NP —> Art N
VP —> V NP
(a) Write three varied sentences that this grammar produces. (That is, start with S and keep rewriting symbols, according to the grammar's rewrite rules, until all you have are "terminal symbols" (English words) that can't be rewritten any further. This isn't the same as just assembling sentences out of the listed words.)
(b) Write two Engish sentences that this grammar does not produce, but that it could produce if the definitions of Art, N, and V were expanded. (That is, come up with sentences that don't require any structural change to the grammar, but just require new words in the existing categories.)
(c) Write two English sentences that this grammar could not produce even if all the words in the sentence were included in the definitions of Art, N, and V.
(d) Does this grammar really describe a subset of English? That is, is every sentence it can generate acceptable to most English speakers? If it can generate any sentences that are not part of English, then the grammar does not describe a subset of English; if you think this is the case, give an example of such a sentence.
The grammar above is finite. We could list all the possible sentences in the language it describes. With one small addition, the grammar below is infinite (as all natural languages are infinite):S —> NP VP
(e) Write two sentences that this grammar produces but the first grammar doesn't (which means you'll use the second alternative for NP at least once).