Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Complexity of matching problems

Published: 01 February 1987 Publication History

Abstract

The associative-commutative matching problem is shown to be 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 8 and the subject t.

References

[1]
Complexity of Matching Problems. In: Proceedings of Rewriting Techniques and Applications, Dijon, France. LNCS 202, Springer Verlag, Berlin.
[2]
Parallel Algorithms for Term Matching. In: Proceedings of 8th Conference on Automated Deduction (LADE-86), Oxford, U.K. LNCS 230, Springer Verlag, Berlin.
[3]
In: Computers and Intractability, W.H. Freeman.
[4]
Pattern Matching in Trees. Journal of Assoc, of Comp. Mach. v29. 68-95.
[5]
Associative-Commutative Pattern Matching. In: Fifth International Joint Conference on Artificial Intelligence, Tokyo, Japan,
[6]
On Equations Including String Variables. In: Proc. 23rd Ann. Symp. on Foundations of Computer Science, pp. 226-235.
[7]
In: NP-completeness of the Set Unification and Matching Problems. In: Proceedings of 8th Conference on Automated Deduction (CADE-86), Oxford, U.K. LNCS 230, Springer Verlag, Berlin.
[8]
Associative-commutative unification is NP-complete. In: Unpublished manuscript, General Electric Corporate Research and Development Center, Schenectady, NY,
[9]
Matching, Unification, and Complexity. In: To appear as a General Electric Corporate Research and Development Report,
[10]
RRL: A Rewrite Rule Laboratory. In: Proceedings of 8th Conference on Automated Deduction (CADE-86), Oxford, U.K. LNCS 230, Springer Verlag, Berlin.
[11]
Simple Word Problems in Universal Algebras. In: Leech, J. (Ed.), Computational Problems in Abstract Algebras, Pergamon Press. pp. 263-297.
[12]
Canonical Inference. In: Report ATP-32, Dept. of Mathematics and Computer Sciences, Univ. of Texas, Austin, Texas,
[13]
Decision Procedures for Simple Equational Theories with Commutative-Associative Axioms: Complete Sets of Commutative-Associative Reductions. In: Memo ATP-39, Dept. of Mathematics and Computer Sciences, Univ. of Texas, Austin, Texas,
[14]
The Refutation Completeness of Blocked Permutative Narrowing and Resolution. In: 4th Conference on Automated Deduction (CADE),
[15]
Rapid Subtree Identification Revisited. In: Technical Report RUU-CS-79-3, Dept, of Computer Science, University of Utrecht, Utrecht,
[16]
In: Combinatorial Optimization: Algorithms and Complexity, Prentice-Hall.
[17]
Complete Sets of Reductions for Some Equational Theories. Journal of Assoc. of Comp. Mach. v282. 233-264.
[18]
Building in Equational Theories. In: Meltzer, Michie, (Eds.), Machine Intelligence, 7. pp. 73-90.
[19]
Automated Theorem Proving with Simplifiers, Commutativity and Associativity. Journal of Assoc. of Comp. Mach. v21. 622-642.
[20]
Patterns and Pattern-Matching in Trees: An Analysis. Information and Control. v28 i1-3. 19-58.
[21]
A Unification Algorithm for Associative-Commutative Functions. Journal of Assoc. of Comp. Mach. v28. 423-434.

Cited By

View all
  • (2025)Automating Equational Proofs in Dirac NotationProceedings of the ACM on Programming Languages10.1145/37048789:POPL(1227-1259)Online publication date: 9-Jan-2025
  • (2024)Automatic Generation of Vectorizing Compilers for Customizable Digital Signal ProcessorsProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3617232.3624873(19-34)Online publication date: 27-Apr-2024
  • (2024)Certified First-Order AC-Unification and ApplicationsJournal of Automated Reasoning10.1007/s10817-024-09714-568:4Online publication date: 14-Nov-2024
  • Show More Cited By

Recommendations

Reviews

John A. Campbell

The matching of expressions to determine equality or equivalence is a routine operation in symbolic mathematical computations (e.g., computer algebra, program transformation, functional programming). Matching is also a component of unification algorithms, such as those used in logic programming. The general problem is NP-complete, although in practice many programs that use matching do so under special conditions where additional information is available to keep the size of their computations under control. Although most actual users of matching are not worried by NP-completeness, it is of theoretical interest to understand the natures of specialized instances of the general problem. This paper represents a technical contribution in that direction. By using 3SAT (the satisfiability problem for a set of clauses which each have three literals) as a reference problem, the authors show NP-completeness for three specialized examples of matching: when the set F of operators or function symbols contains at least one member that is both associative and commutative and at least three that are not known to be either associative or commutative, when F contains at least one associative member and at least two that are not known to be associative, and when F contains at least one commutative member and at least five that are not known to be commutative. Also, in the case where every variable involved appears no more than once in a term being matched, the first problem (associative-commutative matching) is shown to have a complexity bounded above by O( st 3), where s and t are the sizes of the pattern being matched and the structure against which it is being matched, respectively.

Access critical reviews of Computing literature here

Become a reviewer for Computing Reviews.

Comments

Information & Contributors

Information

Published In

cover image Journal of Symbolic Computation
Journal of Symbolic Computation  Volume 3, Issue 1-2
Feb./April 1987
213 pages
ISSN:0747-7171
Issue’s Table of Contents

Publisher

Academic Press, Inc.

United States

Publication History

Published: 01 February 1987

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 13 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Automating Equational Proofs in Dirac NotationProceedings of the ACM on Programming Languages10.1145/37048789:POPL(1227-1259)Online publication date: 9-Jan-2025
  • (2024)Automatic Generation of Vectorizing Compilers for Customizable Digital Signal ProcessorsProceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3617232.3624873(19-34)Online publication date: 27-Apr-2024
  • (2024)Certified First-Order AC-Unification and ApplicationsJournal of Automated Reasoning10.1007/s10817-024-09714-568:4Online publication date: 14-Nov-2024
  • (2022)Term rewriting and beyond — theorem proving in IsabelleFormal Aspects of Computing10.1007/BF018872121:1(320-338)Online publication date: 2-Jan-2022
  • (2021)DNNFusion: accelerating deep neural networks execution with advanced operator fusionProceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3453483.3454083(883-898)Online publication date: 19-Jun-2021
  • (2021)Vectorization for digital signal processors via equality saturationProceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3445814.3446707(874-886)Online publication date: 19-Apr-2021
  • (2019)A formalisation of nominal α-equivalence with A, C, and AC function symbolsTheoretical Computer Science10.1016/j.tcs.2019.02.020781:C(3-23)Online publication date: 16-Aug-2019
  • (2018)From hidden to visibleTheoretical Computer Science10.1016/j.tcs.2018.01.006722:C(52-75)Online publication date: 25-Apr-2018
  • (2017)Efficient Pattern Matching in PythonProceedings of the 7th Workshop on Python for High-Performance and Scientific Computing10.1145/3149869.3149871(1-9)Online publication date: 12-Nov-2017
  • (2017)On the parameterized complexity of associative and commutative unificationTheoretical Computer Science10.1016/j.tcs.2016.11.026660:C(57-74)Online publication date: 17-Jan-2017
  • Show More Cited By

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media