HackerPapers

arXiv:cs/0112018cs.CL

Fast Context-Free Grammar Parsing Requires Fast Boolean Matrix Multiplication

Lillian Lee

Abstract

In 1975, Valiant showed that Boolean matrix multiplication can be used for parsing context-free grammars (CFGs), yielding the asympotically fastest (although not practical) CFG parsing algorithm known. We prove a dual result: any CFG parser with time complexity $O(g n^{3 - \epsilson})$, where $g$ is the size of the grammar and $n$ is the length of the input string, can be efficiently converted into an algorithm to multiply $m \times m$ Boolean matrices in time $O(m^{3 - ε/3})$. Given that practical, substantially sub-cubic Boolean matrix multiplication algorithms have been quite difficult to find, we thus explain why there has been little progress in developing practical, substantially sub-cubic general CFG parsers. In proving this result, we also develop a formalization of the notion of parsing.

arXiv comments
To appear in Journal of the ACM
Journal reference
Journal of the ACM 49(1), pp. 1--15, January 2002
DOI
Subjects
cs.CLComputation and Language cs.DSData Structures and Algorithms

On Hacker News

Linked by 2 identifiable commenters in 2 comments across 2 threads, from Jun 2016 to Sep 2016.

Comments linking this paper, per year.

Discussed in comments2 threads

    • Minor technical nitpick for the README: You're not moving up the Chomsky hierarchy but rather moving sideways ;). PEGs are non-Chomskyan parsing formalisms, in the sense that the family of languages describable by PEGs are not to be found in the Chomsky hierarchy. For example…

      ulrikrasmussenView on HNParent context

    • It is known that any fast CFG parsing algorithm can be turned into a fast boolean matrix multiplication algorithm. So if CFG parsing was n^2, so is boolean matrix multiplication :) See http://arxiv.org/abs/cs/0112018

      DannyBeeView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.