In: Computer Science
The grammar below generates a tiny subset of English sentences, without worrying much about subject-verb agreement:
G = {
S → NP VP
NP → the Adj N | N
VP → V | V NP
Adj → happy | angry | ε |
V → chases | growls | purrs
N → cat | dog
}
Convert G into Chomsky Normal Form. When eliminating rules that mix terminals and non-terminals on the RHS of a rewrite rule, add needed rules only, and please use the form Xword → word (e.g., Xthe → the).
Type or paste question here