Skip to main content

On the complexity of general context-free language parsing and recognition

Extended abstract

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 71))

Abstract

Several results on the computational complexity of general context-free language parsing and recognition are given. In particular we show that parsing strings of length n is harder than recognizing such strings by a factor of only 0(log n), at most. The same is true for linear and/or unambiguous context-free languages. We also show that the time to multiply \(\sqrt n \times \sqrt n\) Boolean Matrices is a lower bound on the time to recognize all prefixes of a string (or do on-line recognition), which in turn is a lower bound on the time to generate a particular convenient representation of all parses of a string (in an ambiguous grammar). Thus these problems are solvable in linear time only if n×n Boolean matrix multiplication can be done in 0(n2).

This research supported by an IBM pre-doctoral fellowship and by NSF grants GJ-474 and MCS77-02474.

This is a preview of subscription content, log in via an institution.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Bibliography

  • Adleman, L., K.S. Booth, F.P. Preparata and W.L. Ruzzo, "Improved time and space bounds for Boolean matrix multiplication", Acta Informatica, 11 (1978), 61–70.

    Google Scholar 

  • Aho, A.V., J.E. Hopcroft and J.D. Ullman, The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, MA (1974).

    Google Scholar 

  • Earley, J., "An efficient context-free parsing algorithm", Comm. ACM 13:1 (1970), 94–102.

    Google Scholar 

  • Fischer, M.J. and A.R. Meyer, "Boolean matrix multiplication and transitive closure", Conference Record IEEE 12th Annual Symposium on Switching and Automata Theory (1971), 129–131.

    Google Scholar 

  • Furman, M.E., "Application of a method of fast multiplication of matrices in the problem of finding the transitive closure of a graph", Soviet Math Dokl. 11:5 (1970), 1252.

    Google Scholar 

  • Gallaire, H., "Recognition time of context free languages by on-line Turing machines", Information and Control 15 (1969), 288–295.

    Google Scholar 

  • Graham, S.L., M.A. Harrison and W.L. Ruzzo, "Online context free language recognition in less than cubic time", Proc. 8th Annual ACM Symposium on Theory of Computing (1976), 112–120.

    Google Scholar 

  • Gray, J. and M.A. Harrison, "On the covering and reduction problems for context-free grammars", JACM 19 (1972), 675–698.

    Google Scholar 

  • Harrison, M.A., Introduction to Formal Language Theory, Addison-Wesley, Reading, MA (1978).

    Google Scholar 

  • Harrison, M.A. and I. Havel, "On the parsing of strict deterministic languages", JACM 21 (1974), 525–548.

    Google Scholar 

  • Hays, D.G., "Automatic language-data processing", in Computer Applications in the Behavioral Sciences, H. Borko (ed.), Prentice-Hall, Englewoods Cliffs, NJ (1962), 394–423.

    Google Scholar 

  • Kasami, T., "An efficient recognition and syntax analysis algorithm for context free languages", Science Report AF CRL-65-758, Air Force Cambridge Research Laboratory, Bedford, MA (1965).

    Google Scholar 

  • Munro, J.I., "Efficient determination of the transitive closure of a directed graph", Information Processing Letters 1:2 (1971), 56–58.

    Google Scholar 

  • Pan, V.Ya., "Strassen's algorithm is not optimal: Trilinear technique of aggregating, uniting and cancelling for constructing fast algorithms for matrix operations", IEEE 19th Annual Symposium on Foundations of Computer Science, (1978), 166–176.

    Google Scholar 

  • Ruzzo, W.L., "General Context-Free Language Recognition". Ph.D. Dissertation, U. C. Berkeley (1978).

    Google Scholar 

  • Strassen, V., "Gaussian elimination is not optimal", Numerische Mathematik 13 (1969), 354–356.

    Google Scholar 

  • Thatcher, J.W., "Characterizing derivation trees of context-free grammars through a generalization of finite automata theory", JCSS 1:4 (1967) 317–322.

    Google Scholar 

  • Thatcher, J.W. and J.B. Wright, "Generalized finite automata theory with an application to a decision problem of second-order logic", Math. Sys. Th. 2:1 (1968) 57–81.

    Google Scholar 

  • Valiant, L., "General context free recognition in less than cubic time", J. Computer and System Sciences 10 (1975), 308–315.

    Google Scholar 

  • Weiner, P., "Linear pattern matching algorithms", Conference Record IEEE 14th Annual Symposium on Switching and Automata Theory (1973), 1–11.

    Google Scholar 

  • Younger, D.H., "Recognition of context-free languages in time n3", Information and Control 10:2 (Feb. 1967), 189–208.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Hermann A. Maurer

Rights and permissions

Reprints and permissions

Copyright information

© 1979 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ruzzo, W.L. (1979). On the complexity of general context-free language parsing and recognition. In: Maurer, H.A. (eds) Automata, Languages and Programming. ICALP 1979. Lecture Notes in Computer Science, vol 71. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-09510-1_39

Download citation

  • DOI: https://doi.org/10.1007/3-540-09510-1_39

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-09510-1

  • Online ISBN: 978-3-540-35168-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics