GATE Computer ScienceVery hardGATE CS (PYQ pattern)

For the CNF grammar S → AB | BC; A → BA | a; B → CC | b; C → AB | a, the CYK table for the string aabab has a top cell (the whole string). Which variables does that cell contain?

  1. A. { S, A, C }
  2. B. { A, B, C }
  3. C. { S, C }
  4. D. ∅

Correct answer: C. { S, C }

Computing all split points for the substring of length 5 with the table of shorter substrings leaves exactly { S, C } in the top cell.

More Theory of Computation questions

Exams that ask this topic