Questions: CYK Algorithm and Membership Testing

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

Why does the CYK algorithm require the grammar to be in Chomsky Normal Form before it can be applied?

ACNF grammars generate a strictly larger class of languages than arbitrary CFGs
BCNF's restriction to productions A → BC means every substring can be split into exactly two non-empty parts to check — enabling the dynamic programming recurrence
CCNF grammars are smaller and reduce the number of table entries needed
DCYK only works correctly when the grammar has no epsilon productions
Question 2 Multiple Choice

You have run CYK on a string w of length n against a CNF grammar with start symbol S. What determines whether w is in the language?

AWhether any cell in the table contains S
BWhether the start symbol S appears in cell T[1,n]
CWhether cell T[n,n] contains S after all productions are applied
DWhether S appears in every cell along the main diagonal
Question 3 True / False

CYK is a top-down parsing algorithm: it starts with the start symbol and expands production rules until it either matches the input or exhausts most possibilities.

TTrue
FFalse
Question 4 True / False

Converting a CFG to CNF before applying CYK does not change which strings the grammar accepts — the language is preserved.

TTrue
FFalse
Question 5 Short Answer

Where does CYK's O(n³) time complexity come from? Describe the three nested loops and what each iterates over.

Think about your answer, then reveal below.