Computer Science EngineeringVery hardISRO SC

The CYK algorithm runs on a string of length 10 with a grammar in Chomsky normal form. Counting each (cell, split point) pair as one step, the total number of splits examined over all cells of spans longer than 1 is

  1. A. 55
  2. B. 166.66666666666666
  3. C. 175
  4. D. 165

Correct answer: D. 165

Sum over lengths l=2..n of (n-l+1)(l-1) = (n^3 - n)/6 = 165.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic