# An efficient implementation of graph grammars based on the RETE matching algorithm

Conference paper

First Online:

## Abstract

This paper is concerned with the efficient determination of the set of productions of a graph grammar that are applicable in one rewriting step. We propose a new algorithm that is a generalization of a similar algorithm originally developed for forward chaining production systems. The time complexity of the proposed method is not better than that of a naive solution, in the worst case. In the best case, however, a significant speedup can be achieved. Some experiments supporting the results of a theoretical complexity analysis are described.

## Keywords

graph grammars forward chaining conflict set RETE-matching algorithm computational complexity## Preview

Unable to display preview. Download preview PDF.

## References

- [1]Claus, V./ Ehrig, H./ Rozenberg, G. (ed.):
*Graph-Grammars and their application to computer science and biology*, Springer Lecture Notes 73, 1979Google Scholar - [2]Ehrig, H./ Nagl, M./ Rozenberg, G. (ed.):
*Graph-Grammars and their application to computer science*, Springer Lecture Notes 153, 1983Google Scholar - [3]Ehrig, H./ Nagl, M./ Rozenberg, G./ Rosenfeld, A. (ed.):
*Graph-Grammars and their application to computer science*, Springer Lecture Notes 291, 1987Google Scholar - [4]Bunke, H.:
*On the generative power of sequential and parallel programmed graph grammars*, Computing Vol. 29, pp 89–112, 1982Google Scholar - [5]Brownston, L./ Farell, R./ Kant, E./ Martin, N.:
*Programming expert systems in OPS5. An introduction to rule-base programming*, Addison-Wesley, 1986Google Scholar - [6]Forgy, C.L.:
*RETE, a fast algorithm for the many pattern / many object pattern match problem*, Artificial Intelligence Vol. 19, pp 17–37, 1982CrossRefGoogle Scholar - [7]Nagl, M.:
*Set theoretic approaches to graph-grammars*, in Ehrig, H./ Nagl, M./ Rozenberg, G./ Rosenfeld, A. (ed.): Graph-Grammars and their application to computer science, Springer Lecture Notes 291, pp 41–54, 1987Google Scholar - [8]Albert, L. / Fayes, F.:
*Average case complexity analysis of the RETE pattern-match algorithm*, Springer Lecture Notes 317, pp. 18–37, 1988Google Scholar - [9]Bunke, H.:
*Graph grammars as a generative tool in image understanding*, in Ehrig, H./ Nagl, M./ Rozenberg, G. (ed.): Graph-Grammars and their application to computer science, Springer Lecture Notes 153, pp 8–19, 1983Google Scholar - [10]Miranker, D.P.:
*TREAT: A new and efficient match algorithm for AI production systems*, Research Notes in AI, Morgan Kaufmann Publishers, 1990Google Scholar - [11]Bunke, H./ Allermann, G.:
*Inexact graph matching for structural pattern recognition*, Pattern Recognition Letters Vol. 1, pp 245–253, 1983CrossRefGoogle Scholar

## Copyright information

© Springer-Verlag Berlin Heidelberg 1991