|
ABSTRACT
We look at several classes of straight-line programs and show that the equivalence problem is either undecidable or computationally intractable for all but the trivial classes. For example, there is no algorithm to determine if an arbitrary program (with positive, negative, or zero integer inputs) using only constructs x ← 1, x ← x + y, x ← x/y (integer division) outputs 0 for all inputs. The result holds even if we consider only programs which compute total 0/1 - functions. For programs using constructs x ← 0, x ← c, x ← cx, x ← x/c, x ← x + y, x ← x − y, skip l, if p(x) then skip l, and halt,1 the equivalence problem is decidable in [equation] time (&lgr; is a fixed positive constant and N is the maximum of the sizes of the programs). The bound cannot be reduced to a polynomial in N unless P &equil; NP. In fact, we prove the following rather surprising result: The equivalence problem for programs with one input/output variable and one intermediate variable using only constructs x ← x + y and x ← x/2 is NP-hard. We also show the decidability of the equivalence problem for a certain class of programs and use this result to prove the following: Let IN be the set of natural numbers and f be any total one-to-one function from IN onto IN × IN. (f is called a pair generator. Such functions are useful in recursive function and computability theory.) Then f cannot be computed by any program using only constructs x ← 0, x ← c, x ← x + y, x ← x − y, x ← x * y, x ← x/y, skip l, if p(x) then skip l, and halt.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
 |
2
|
|
| |
3
|
Aho, A.V. and Ullman, J.D., Optimization of straight line programs, SIAM J. Computing, 1, 1 (March 1972), pp. 1–19.
|
 |
4
|
|
| |
5
|
Constable, R.L., Hunt, H.B., and Sahni, S., On the computational complexity of scheme equivalence, Proc. Eight Annual Princeton Conference on Information Sciences and Systems (1974), pp. 15–20.
|
 |
6
|
|
| |
7
|
Davis, M., “Computability and Unsolvability,” McGraw-Hill, New York, 1958.
|
| |
8
|
Davis, M., Matijasevič, Y., and Robinson, J., Hilbert's tenth problem. Diophantine equations: Positive aspects of a negative solution, Proc. of Symposium on Pure Mathematics, 28 (1976), pp. 323–378.
|
| |
9
|
|
| |
10
|
|
| |
11
|
Karp, R.M., Reducibility among combinatorial problems, in “ Complexity of Computer Computations,” R.E. Miller and J.W. Thatcher, Eds., Plenum Press, New York, 1972, pp. 85–104.
|
| |
12
|
|
 |
13
|
|
| |
14
|
|
| |
15
|
|
| |
16
|
Sahni, S., Computationally related problems, SIAM J. Computing 3 (1974), pp. 262–279.
|
 |
17
|
|
|