5 questions to test your understanding
Why does the CYK algorithm require the grammar to be in Chomsky Normal Form before it can be applied?
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?
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.
Converting a CFG to CNF before applying CYK does not change which strings the grammar accepts — the language is preserved.
Where does CYK's O(n³) time complexity come from? Describe the three nested loops and what each iterates over.