195k views
4 votes
If G = (V, Σ, R, S) is in Chomsky normal form then the right-hand side of every rule in R has length two

true
false

User Mwlebour
by
7.7k points

1 Answer

2 votes

Final answer:

In Chomsky normal form, production rules can have either two non-terminal symbols or one terminal symbol on the right-hand side, so it's not true that every rule has a right-hand side of length two.

Step-by-step explanation:

If G = (V, Σ, R, S) is in Chomsky normal form (CNF), then it is not necessarily true that the right-hand side of every rule in R has length two.

Chomsky normal form is a way of simplifying the production rules in a context-free grammar to make it suitable for certain types of parsing algorithms. A production rule in CNF can have either:

  1. Exactly two non-terminal symbols on the right-hand side, or
  2. A single terminal symbol on the right-hand side.

Therefore, while many rules in a grammar in Chomsky normal form will have right-hand sides of length two (when both symbols are non-terminals), there are also rules that have a single terminal symbol on the right-hand side. This is to accommodate terminations of derived strings in the language.

User Charu
by
8.2k points