# On partially ordered graph grammars

## Abstract

Graph grammars are systems for the generation of directed, node and edge labeled graphs. They rewrite single nodes only and establish connections between the inserted graph and the neighbors of the replaced node on the basis of node labels and edge labels. If there is only a single edge label, then graph grammars are closely related to NLC graph grammars.

A partially ordered graph is a graph together with a spanning tree. These components are distinguished by their edge labels. A partially ordered graph grammar is the union of a graph grammar and a tree grammar. These components fit together such that their rewriting processes yield partially ordered graphs with the tree grammar generating spanning trees.

Here we concentrate on the computational complexity of some restricted types of graph grammars and their languages with emphasis on intractability. It turns out that node and edge labeled tree grammars generate PSPACE-complete sets of connected graphs of finite degree, and that one-sided linear edge-unlabeled tree grammars generate NP-complete sets of graphs. However, the complexity is polynomial, if the graphs have finite degree and are generated by a one-sided linear partially ordered graph grammar. This situation closely parallels the case of NLC and regular BNLC grammars. NLC graph grammars can be seen as undirected, edge-unlabeled graph grammars, and, on the other hand, edge-unlabeled undirected one-sided linear partially ordered graph grammars and edge-unlabeled undirected one-sided linear partially ordered tree-graph grammars are special BNLC graph grammars.

## Keywords

node and edge labeled graphs trees graph grammars tree-graph grammars partially orderd graph grammars NLC ELC ECE embeddings computational complexity PSPACE and NP-completeness## Preview

Unable to display preview. Download preview PDF.

## References

- [1]IJ.J. Aalbersberg, A. Ehrenfeucht and G. Rozenberg, "On the membership problem for regular DNLC grammars". Discrete Applied Mathematics 13 (1986), 79–85.CrossRefGoogle Scholar
- [2]IJ.J. Aalbersberg, J. Engelfriet and G. Rozenberg, "The complexity of regular DNLC graph languages". Report 86-03, Rijksuniversiteit Leiden (1986).Google Scholar
- [3]F. J. Brandenburg, "On the complexity of the membership problem of graph grammars", in: Proceedings of the Workshop on Graphtheoretic Concepts in Computer Science 83, M.Nagl and J. Perl, eds., Tauner-Verlag Linz (1983), 40–49.Google Scholar
- [4]V. Claus, H. Ehrig, and G Rozenberg (eds.), "Graph Grammars and their Application to Computer Science and Biology", Lecture Notes in Computer Science 73 (1980).Google Scholar
- [5]A. Ehrenfeucht, M. Main and G. Rozenberg, "Restrictions on NLC graph grammars", Theoret. Comput. Sci 31 (1984), 211–223.CrossRefGoogle Scholar
- [6]M.R. Garey and D.S. Johnson, "Computers and Intractability — A Guide to the Theory of NP Completeness", Freeman, San Francisco (1979).Google Scholar
- [7]R.C. Gonzales, J.J. Edwards and M.G. Thomason, "An algorithm for the inference of tree grammars", Int. J. Comput. Inform. Sci, 5 (1976), 145–164.CrossRefGoogle Scholar
- [8]F. Harary, "Graph Theory", Addison Wesley, Reading (1969).Google Scholar
- [9]M.A. Harrison, "Introduction to Formal Language Theory", Addison Wesley, Reading, (1979).Google Scholar
- [10]D.Janssens, "Node label controlled graph grammers", Ph.D. thesis, University of Antwerp, (1983).Google Scholar
- [11]D. Janssens and G. Rozenberg, "On the structure of node label controlled graph languages", Information Sciences 20 (1980), 191–216.CrossRefGoogle Scholar
- [12]D. Janssens and G. Rozenberg, "Restrictions, extensions, and variations of NLC grammars", Information Sciences 20 (1980), 217–244.CrossRefGoogle Scholar
- [13]D. Janssens and G. Rozenberg, "A characterization of context-free string languages by directed node-label controlled graph grammars", Acta Informatica 16 (1981), 63–85.CrossRefGoogle Scholar
- [14]D. Janssens and G. Rozenberg, "Decision problems for node label controlled graph grammars", J. Comput. System Sci. 22 (1981), 144–177.Google Scholar
- [15]D. Janssens and G. Rozenberg, "Graph grammars with neighbourhood-controlled embedding", Theoret. Comput. Sci. 7 (1982), 55–74.CrossRefGoogle Scholar
- [16]M. Kaul, "Syntaxanalyse von Graphen bei Präzedenz-Graph-Grammatiken", Technical Report MIP 8610, Universität Passau, (1986).Google Scholar
- [17]M. Kaul, "Practical applications of precedence graph grammars", this volume.Google Scholar
- [18]K.-J. Lange, E. Welzl, "String grammars with disconnecting or a basic root of the difficulty in graph grammar parsing", Discrete Applied Mathematics 16, 1987, 17–30.CrossRefGoogle Scholar
- [19]H.J. Ludwigs, "Properties of ordered graph grammars", Lecture Notes in Computer Science 100 (1981), 70–77.Google Scholar
- [20]M. Nagl, "Graph-Grammatiken Theorie, Implementierung, Anwendungen", Vieweg Verlag, Braunschweig (1979).Google Scholar
- [21]G. Rozenberg and E. Welzl, "Boundary NLC graph grammars — basic definitions, normal forms, and complexity", Inform. and Control 69 (1986), 136–167.Google Scholar
- [22]G. Rozenberg and E. Welzl, "Graph theoretic closure properties of the family boundary NLC graph languages", Acta Informatica 23 (1986), 289–309.CrossRefGoogle Scholar
- [23]G. Rozenberg and E. Welzl, "Combinatorial properties of boundary NLC graph languages", Discrete Applied Mathematics 16 (1987), 59–73.CrossRefGoogle Scholar
- [24]R. Schuster, "Graphgrammatiken und Grapheinbettungen: Algorithmen und Komplexität" Dissertation, Universität Passau, (1987).Google Scholar
- [25]Q. Y. Shi and K. S. Fu, "Parsing and translation of (attributed) expansive graph languages for science analysis", Proc. 6 ICPR, Munich (1982), 684–687.Google Scholar
- [26]A. O. Slisenko, "Context-free grammars as a tool for describing polynomial-time subclasses of hard problems", Inform. Process. Letters 14 (1982), 52–56.CrossRefGoogle Scholar