Theory of recursive functions and effective computability
Theory of recursive functions and effective computability
The art of computer programming, volume 2 (3rd ed.): seminumerical algorithms
The art of computer programming, volume 2 (3rd ed.): seminumerical algorithms
The Generation of Optimal Code for Arithmetic Expressions
Journal of the ACM (JACM)
Code Generation for a One-Register Machine
Journal of the ACM (JACM)
Introduction to Computability
Introduction To Automata Theory, Languages, And Computation
Introduction To Automata Theory, Languages, And Computation
The Design and Analysis of Computer Algorithms
The Design and Analysis of Computer Algorithms
Optimal code generation for expression trees
STOC '75 Proceedings of seventh annual ACM symposium on Theory of computing
The complexity of theorem-proving procedures
STOC '71 Proceedings of the third annual ACM symposium on Theory of computing
The complexity of loop programs
ACM '67 Proceedings of the 1967 22nd national conference
Computation: finite and infinite machines
Computation: finite and infinite machines
The complexity of quantifier elimination and cylindrical algebraic decomposition
Proceedings of the 2007 international symposium on Symbolic and algebraic computation
Composing transformations to optimize linear code
ICTAC'07 Proceedings of the 4th international conference on Theoretical aspects of computing
Hi-index | 0.01 |
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.