Abstract
Pattern matching in directed graphs is useful in many areas including type systems, functional languages, regular tree expressions, cyclic term graph rewriting systems and machine translation. We investigate in this paper the problem of directed graph pattern matching allowing some mismatches in labels. Two algorithms for computing the distance between ordered labeled rooted directed graphs, which is the central part of approximate pattern matching, are presented: the first algorithm computes the distance between two graphs P and T in time O(¦E P ¦ ¦V T ¦) and space O(¦E T ¦+¦E P ¦ ¦V T ¦). It is as fast as the best solution for determining whether a directed graph matches another. The second algorithm computes the distance between every subgraph of P and every subgraph of T in time O(¦E P ¦ ¦V T ¦ (¦V P ¦+¦V T ¦)) and space O(¦V P ¦ ¦V T ¦ (¦V P ¦+¦V T ¦)). It is the first solution for this problem.
Preview
Unable to display preview. Download preview PDF.
References
A. V. Aho, R. Sethi and J. D. Ullman. Compilers — Principles, Techniques, and Tools, chapter 6.7. Addison Wesley, 1986.
A. Amir and M. Farach. Efficient 2-dimensional approximate matching of nonrectangular figures. In Proceedings of the 2nd Annual ACM Symposium on Discrete Algorithms, pages 212–223, 1991.
A. Amir and G. M. Landau. Fast parallel and serial multidimensional approximate array matching. Theoretical Computer Science, 81:97–115, 1991.
R. C. Berwick. Learning word meanings from examples. In D. L. Waltz, editor, Semantic Structures: Advances in Natural Language Processing, chapter 3. Lawrence Erlbaum Associates, 1989.
J. Fu. Pattern matching in directed graphs. In Proceedings of the 6th Annual Symposium on Combinatorial Pattern Matching, pages 64–77, 1995.
J. Katzenelson, S. S. Pinter and E. Schenfeld. Type matching, type-graphs, and the Schanuel conjecture. ACM Transactions on Programming Languages and Systems, 14(4):574–588, Oct. 1992.
G. M. Landau and U. Vishkin. Fast string matching with k differences. Journal of Computer and System Sciences, 37:63–78, 1988.
E. W. Myers. A sublinear algorithm for approximate keyword searching. Algoritymica, 12:345–374, 1994.
S. Sato and M. Nagao. Towards memory-based translation. In Proceedings of the 13th International Conference on Computational Linguistics, 1990.
E. Sumita, H. Iida and H. Kohyama. Translating with examples: a new approach to machine translation. In Proceedings of Info Japan 90, 1990.
K. Tai. The tree-to-tree correction problem. Journal of ACM, 26(3):422–433, 1979.
R. Tarjan. Depth first search and linear graph algorithms. SIAM Journal on Computing, 1(2):146–160, 1972.
E. Ukkonen. Finding approximate patterns in strings. Journal of Algorithms, 6:132–137, 1985.
H. Watanabe. A similarity-driven transfer system. In Proceedings of the 15th International Conference on Computational Linguistics, pages 770–776, 1992.
K. Zhang and D. Shasha. Simple fast algorithms for the editing distance between trees and related problems. SIAM Journal on Computing, 18(6):1245–1262, 1989.
K. Zhang, D. Shasha and J. T. L. Wang. Approximate tree matching in the presence of variable length don't cares. Journal of Algorithms, 16:33–66, 1994.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Fu, J.J. (1996). Approximate pattern matching in directed graphs. In: Hirschberg, D., Myers, G. (eds) Combinatorial Pattern Matching. CPM 1996. Lecture Notes in Computer Science, vol 1075. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61258-0_27
Download citation
DOI: https://doi.org/10.1007/3-540-61258-0_27
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61258-2
Online ISBN: 978-3-540-68390-2
eBook Packages: Springer Book Archive