Recognizing edge replacement graph languages in cubic time

  • Walter Vogler
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 532)


While in general the recognition problem for (hyper-)edge replacement grammars is NP-complete, there are polynomial algorithms for restricted graph classes. The degree of the corresponding polynomial depends on the size of the right hand sides of the grammar, and this size cannot be restricted without restricting the generative power.

In this paper we show that for the class of cyclically connected graphs the recognition problem for edge replacement grammars can be solved in cubic time, i.e. the degree of the polynomial does not depend on the size of the right hand sides of the grammar. For this result we give a suitable normal form for an edge replacement grammar. The algorithm uses the idea of the Cocke-Kasami-Younger algorithm and depends crucially on an algorithm of Hopcroft and Tarjan, which can be used to determine the form of a derivation tree for the given graph.


Edge replacement parsing triconnected components 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [BC87]
    M. Bauderon and B. Courcelle. Graph expressions and graph rewritings. Math. Systems Theory, 20:83–127, 1987.CrossRefGoogle Scholar
  2. [Bra88]
    F.J. Brandenburg. On polynomial time graph grammars. In R. Cori et al., editors, STACS '88, Proc. of the 5th Annual Symposium on Theor. Aspects of Comp. Sci., Bordeaux, Lect. Notes Comp. Sci. 294, pages 227–236. Springer, 1988.Google Scholar
  3. [CER79]
    V. Claus, H. Ehrig, and G. Rozenberg, editors. Graph-Grammars and Their Application to Computer Science and Biology, Lect. Notes Comp. Sci. 73. Springer, 1979.Google Scholar
  4. [Cou87]
    B. Courcelle. An axiomatic definition of context-free rewriting and its application to NLC graph grammars. Theor. Comp. Sci., 55:141–181, 1987.CrossRefGoogle Scholar
  5. [CW87]
    D. Coppersmith and S. Winograd. Matrix multiplication via arithmetic progressions. Proc. 19th ACM Symp. on Theory of Computing, New York City, pages 1–6, 1987.Google Scholar
  6. [ENR83]
    H. Ehrig, M. Nagl, and G. Rozenberg, editors. Graph Grammars and Their Application to Computer Science, Lect. Notes Comp. Sci. 153. Springer, 1983.Google Scholar
  7. [ENRR87]
    H. Ehrig, M. Nagl, G. Rozenberg, and A. Rosenfeld, editors. Graph-Grammars and Their Application to Computer Science, Lect. Notes Comp. Sci. 291. Springer, 1987.Google Scholar
  8. [ER90]
    J. Engelfriet and G. Rozenberg. A comparison of boundary graph grammars and context-free hypergraph grammars. Inf. and Computation, 84:163–206, 1990.CrossRefGoogle Scholar
  9. [FMR68]
    P. C. Fischer, A. R. Meyer, and A. L. Rosenberg. Counter machines and counter languages. Math. Systems Theory, 2:265–283, 1968.CrossRefGoogle Scholar
  10. [Gin66]
    S. Ginsburg. The Mathematical Theory of Context-Free Languages. McGraw-Hill, New York, 1966.Google Scholar
  11. [Hab89]
    A. Habel. Hyperedge replacement: Grammars and languages. Diss., FB Mathem. / Inform., Uni. Bremen, 1989.Google Scholar
  12. [HK87a]
    A. Habel and H.-J. Kreowski. Characteristics of graph languages generated by edge replacement. Theor. Comp. Sci., 51:81–115, 1987.CrossRefGoogle Scholar
  13. [HK87b]
    A. Habel and H.-J. Kreowski. Some structural aspects of hypergraph languages generated by hyperedge replacement. In F.J. Brandenburg et al., editors, STACS '87, Proc. of the 4th Annual Symposium on Theor. Aspects of Comp. Sci., Passau, Lect. Notes Comp. Sci. 247, pages 207–219. Springer, 1987.Google Scholar
  14. [HT73]
    J. E. Hopcroft and R. E. Tarjan. Dividing a graph into triconnected components. SIAM J. Comp., 2:135–158, 1973.CrossRefGoogle Scholar
  15. [HU79]
    J. E. Hopcroft and J. D. Ullman. Introduction to Automata Theory, Languages and Computation. Addison-Wesley, Reading, Mass., 1979.Google Scholar
  16. [Kre86]
    H.-J. Kreowski. Rule trees represent derivations in edge replacement systems. In G. Rozenberg and A. Salomaa, editors, The Book of L, pages 217–232. Springer, Berlin, 1986.Google Scholar
  17. [Lau88]
    C. Lautemann. Efficient algorithms on context-free languages. In T. Lepistö et al., editors, Automata, Languages and Programming Tampere, Lect. Notes Comp. Sci. 317, pages 362–378. Springer, 1988.Google Scholar
  18. [LW87]
    K.-J. Lange and E. Welzl. String grammars with disconnecting or a basic root of the difficulty in graph grammar parsing. Discrete Appl. Math., 16:17–30, 1987.CrossRefGoogle Scholar
  19. [Mac37]
    S. MacLane. A structural characterization of planar combinatorial graphs. Duke Math. J., 3:460–472, 1937.CrossRefGoogle Scholar
  20. [RW86]
    G. Rozenberg and E. Welzl. Boundary nlc graph grammars — basic definitions, normal forms and complexity. Inf. and Control, 69:136–167, 1986.CrossRefGoogle Scholar
  21. [Vog90]
    W. Vogler. On hyperedge replacement and bnlc graph grammars. In M. Nagl, editor, Graph-Theoretic Concepts in Comp. Sci., Proc. 15th Int. Workshop WG '89, Castle Roduc, Lect. Notes Comp. Sci. 411, pages 78–93. Springer, 1990.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Walter Vogler
    • 1
  1. 1.Institut für InformatikTechnische UniversitätMünchen 2

Personalised recommendations