Let E be the set of all simple arithmetic expressions of the form E(x) = xTl…Tk where x is a nonnegative integer variable and each Ti is a multiplication or integer division by a positive integer constant. We investigate the complexity of the inequivalence and the bounded inequivalence problems for expressions in E. (The bounded inequivalence problem is the problem of deciding for arbitrary expressions E1(x) and E2(x) and a positive integer l whether or not E1(x) ≠ E2(x) for some nonnegative integer x<l. If l = ∞, i.e., there is no upper bound on x, the problem becomes the inequivalence problem.) We show that the inequivalence problem (or equivalently, the equivalence problem) for a large subclass of E is decidable in polynomial time. Whether or not the problem is decidable in polynomial time for the full class E remains open. We also show that the bounded inequivalence problem is NP-complete even if the divisors are restricted to be equal to 2. This last result can be used to sharpen some known NP-completeness results in the literature. Note that if division is rational division, all problems are trivially decidable in polynomial time.
[1]
Sartaj Sahni,et al.
On the Computational Complexity of Program Scheme Equivalence
,
1980,
SIAM J. Comput..
[2]
Oscar H. Ibarra,et al.
The Complexity of the Equivalence Problem for Simple Loop-Free Programs
,
1982,
SIAM J. Comput..
[3]
E. Mark Gold,et al.
Complexity of Automaton Identification from Given Data
,
1978,
Inf. Control..
[4]
Jeffrey D. Ullman,et al.
Introduction to Automata Theory, Languages and Computation
,
1979
.
[5]
Dennis Tsichritzis,et al.
The Equivalence Problem of Simple Programs
,
1970,
JACM.
[6]
I. Herstein,et al.
Topics in algebra
,
1964
.
[7]
Leonard M. Adleman,et al.
NP-Complete Decision Problems for Binary Quadratics
,
1978,
J. Comput. Syst. Sci..
[8]
Stephen A. Cook,et al.
The complexity of theorem-proving procedures
,
1971,
STOC.