Abstract
We present a primitive recursive programinf_with_lists computing the minimum of two natural numbersn andp (written in unary notation) and using primitive recursion on lists. This program has at first sight the required property of visiting simultaneously its inputs, so it is a counterexample to a theorem showing that such a program cannot be written in the language of primitive recursion on natural numbers, in the more general framework of primitive recursion on term algebras. However, its complexity is at leastinf(n,p)2 so it does not implement the algorithm we have in mind to computeinf(n,p).
Similar content being viewed by others
References
S. C. Kleene,Introduction to Meta-mathematics. North Holland (1952).
L. Colson,About Primitive Recursive Algorithms Proceedings of the sixteenth International Colloquium on Automata, Languages and Programming, Eds. G. Ausiello, M. Dezani-Ciancaglini, S. Ronchi Della Rocca, Springer-Verlag LNCS 372, (1989) 194–206.
C. Böhm, A. Berarducci,Automatic synthesis of typed Λ-programs on term algebras, Theoretical Computer Science 39 (1985) 135–154.
C. Böhm,Reducing Recursion to Iteration by Algebraic Extension, ESOP 86. Springer-Verlag LNCS 213.
C. Böhm,Reducing Recursion to Iteration by Mean of Pairs and Tuples; Foundations of logic and functional programming. Springer-Verlag LNCS 306.