Complexity of matching problems

  • Dan Benanav
  • Deepak Kapur
  • Paliath Narendran
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 202)


We show that the associative-commutative matching problem is NP-complete; more precisely, the matching problem for terms in which some function symbols are uninterpreted and others are both associative and commutative, is NP-complete. It turns out that the similar problems of associative-matching and commutative-matching are also NP-complete. However, if every variable appears at most once in a term being matched, then the associative-commutative matching problem is shown to have an upper-bound of O (|s| * |t|3), where |s| and |t| are respectively the sizes of the pattern s and the subject t.

Key words

Matching Associative Associative-Commutative Commutative NP-Completeness 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

8. References

  1. [1]
    Garey, M.R. and Johnson, D.S., Computers and Intractability, W.H. Freeman, 1979.Google Scholar
  2. [2]
    Hullot, J.M., „Associative-Commutative Pattern Matching,” Fifth International Joint Conference on Artificial Intelligence, Tokyo, Japan, 1979.Google Scholar
  3. [3]
    Iwama, K., „On Equations Including String Variables,” Proc. 23rd Ann. Symp. on Foundations of Computer Science, 1982, pp. 226–235.Google Scholar
  4. [4]
    Kanellakis, P., private communication.Google Scholar
  5. [5]
    Kapur, D. and Sivakumar, G., „Architecture of and Experiments with RRL, a Rewrite Rule Laboratory,” Proceedings of a NSF Workshop on the Rewrite Rule Laboratory, September 6–9, 1983, General Electric CRD Report, 84GEN004, April, 1984, pp. 33–56.Google Scholar
  6. [6]
    Knuth, D.E. and Bendix, P.B., „Simple Word Problems in Universal Algebras,” in Computational Problems in Abstract Algebras (ed. J. Leech), Pergamon Press, 1970, pp. 263–297.Google Scholar
  7. [7]
    Lankford, D.S., „Canonical Inference,” Report ATP-32 Dept. of Mathematics and Computer Sciences, Univ. of Texas, Austin, TX (1975).Google Scholar
  8. [8]
    Lankford, D.S., and Ballantyne A.M., „Decision Procedures for Simple Equational Theories with Commutative-Associative Axioms: Complete Sets of Commutative-Associative Reductions,” Memo ATP-39, Dept. of Mathematics and Computer Sciences, Univ. of Texas, Austin, TX (1977).Google Scholar
  9. [9]
    Lankford, D.S., and Ballantyne, A.M., „The Refutation Completeness of Blocked Permutative Narrowing and Resolution,” Fourth Conference on Automated Deduction, 1979.Google Scholar
  10. [10]
    Papadimitriou, C.H., and Steiglitz, K., Combinatorial Optimization: Algorithms and Complezity, Prentice-Hall, 1982.Google Scholar
  11. [11]
    Peterson, G.E., and Stickel, M.E., „Complete Sets of Reductions for Some Equational Theories,” Journal of the ACM, Vol. 28, No. 2, pp. 233–264.Google Scholar
  12. [12]
    Plotkin, G., „Building in Equational Theories,” Machine Intelligence 7 (eds. Meltzer and Michie), pp. 73–90.Google Scholar
  13. [13]
    Slagle, J., „Automated Theorem Proving with Simplifiers, Commutativity and Associativity,” JACM Vol. 21, 1974, pp. 622–642.Google Scholar
  14. [14]
    Stickel, M.E., „A Unification Algorithm for Associative-Commutative Functions,” JACM 28 (1980), pp. 423–434.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1985

Authors and Affiliations

  • Dan Benanav
    • 1
  • Deepak Kapur
    • 1
  • Paliath Narendran
    • 1
  1. 1.Corporate Research and DevelopmentGeneral Electric CompanySchenectady

Personalised recommendations