Overview
The CYK Algorithm fills a table of grammar variables that can produce each substring.
Checks whether a string can be generated by a context-free grammar.
Compact metadata for implementation and discovery.
The CYK Algorithm fills a table of grammar variables that can produce each substring.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n^3 |G|)
Average
O(n^3 |G|)
Worst
O(n^3 |G|)
Space
O(n^2 |G|)
table[start, length] includes A if A -> B C and B,C cover a splitBuilds parse recognition from shorter spans.
Show a triangular dynamic programming table filling from short spans to long spans.
CYK Algorithm operates in O(n^3 |G|) time and O(n^2 |G|) space within the Dynamic Programming Parser family. Key governing relation: table[start, length] includes A if A -> B C and B,C cover a split. Often compared with Recursive Descent Parsing and Pratt Parsing.
What each reference supports for this entry.
Formal-languages reference for CYK parsing over context-free grammars in Chomsky normal form.
Good next jumps from the relationship graph, ranked for useful discovery.
CYK and Earley parsing are dynamic-programming parsers for context-free grammars.