191 views
2 votes
2 votes

A derivation of a string $w$ of length $n$ in a context-free grammar in Chomsky normal form
  1. must involve exactly $2n-1$ applications of rules for all $n> 0$
  2. must involve at least $2n$ applications of rules for all $n > 0$.
  3. must involve at least $n$ rules, but can involve an arbitrarily large number.
  4. must involve at least $n$ rules and at most $2n$ rules for all $n > 0$.

1 Answer

Best answer
2 votes
2 votes
In CNF, all rules are of the form $A\to BC$ or $A \to a.$ So, to get a string of length $n$ we need $n-1$ steps producing $n$ Non-terminals and then $n$ steps converting these non-terminals to terminals. Thus, we need exactly $n-1+n = 2n-1$ steps.

Correct Answer: A
selected by
Answer:

Related questions