Abstract
We provide a treatment of the reversible Turing machines (RTMs) under a strict function semantics. Unlike many existing reversible computation models, we distinguish strictly between computing the function \(\lambda x.f(x)\) and computing the function \(\lambda x. (x, f(x))\), or other injective embeddings of f. We reinterpret and adapt a number of important foundational reversible computing results under this semantics. Unifying the results in a single model shows that, as expected (and previously claimed), the RTMs are robust and can compute exactly all injective computable functions. Because injectivity entails that the RTMs are not strictly Turing-complete w.r.t. functions, we use an appropriate alternative universality definition, and show how to derive universal RTMs (URTMs) from existing irreversible universal machines. We then proceed to construct a URTM from the ground up. This resulting machine is the first URTM which does not depend on a reversible simulation of an existing universal machine. The new construction has the advantage that the interpretive overhead of the URTM is limited to a (program dependent) constant factor. Another novelty is that the URTM can function as an inverse interpreter at no asymptotic cost.
Similar content being viewed by others
Notes
This natural definition of universality for reversible Turing machine was previously suggested by Li and Vitányi, cf. [22, Sect. 8.1.4], although no concrete constructions were given.
However, the reversible machine is not (quasi-)real-time, while the irreversible one is, and it is not obvious that a quasi-realtime RTM should be possible without altering the tape contents. This hints that RTMs and TMs might have different structural complexity, at least fine-grained. For a formal language RTM model with a read-only one-way input tape, Axelsen et al. have recently shown that this is indeed the case, for a hierarchy between real-time and linear time [8].
This can be enforced by tracking the non-blank part of the tape, and ensuring that this contains no blanks at halting.
Should any of these conditions fail, we can rename as necessary to introduce them, without altering the fine-grained behavior of the machines.
Of course, increasing the amount of static resources does not limit expressivity, as the extra resources can simply be ignored.
We could also have defined the semantics for k-tape TMs such that the input was always given on a single tape, i.e., restricted to unary functions, but this would have severely hampered the presentation.
The simulation of symbol rules provided in [25, Lemma 3, p. 227] is unfortunately flawed: translation of the rules (q, (s, u), p) and (r, (t, v), p)) breaks reversibility if the encodings of u and v share a longer prefix than that of the encodings of s and t. Our proof can be adapted for use in the 2-symbol machine of [25], by reading and writing 0’s where our 3-symbol construction uses blanks.
It is not difficult to see that the reliance on legal computation runs turns the definition—which appears to be about the inner workings of the machine—into one about the extensional behavior. For Turing machines this would then fall under Rice’s theorem.
References
Abramov, S., Glück, R.: Principles of inverse computation and the universal resolving algorithm. In: Mogensen, T.Æ., Schmidt, D.A., Sudborough, I.H. (eds.) The Essence of Computation: Complexity, Analysis, Transformation. Lecture Notes in Computer Science, vol. 2566, pp. 269–295. Springer, Heidelberg (2002)
Axelsen, H.B.: Clean translation of an imperative reversible programming language. In: Knoop, J. (ed.) Compiler Construction, CC 2011. Proceedings, Lecture Notes in Computer Science, vol. 6601, pp. 142–161. Springer, Heidelberg (2011)
Axelsen, H.B.: Time complexity of tape reduction for reversible Turing machines. In: De Vos, A., Wille, R. (eds.) Reversible Computation, RC 2011. Revised Papers, Lecture Notes in Computer Science, vol. 7165, pp. 1–13. Springer, Heidelberg (2012)
Axelsen, H.B., Glück, R.: A simple and efficient universal reversible Turing machine. In: Dediu, A.H., Inenaga, S., Martín-Vide, C. (eds.) LATA 2011. Proceedings, Lecture Notes in Computer Science, vol. 6638, pp. 117–128. Springer, Heidelberg (2011)
Axelsen, H.B., Glück, R.: What do reversible programs compute? In: Hoffman, M. (ed.) FOSSACS 2011. Proceedings, Lecture Notes in Computer Science, vol. 6604, pp. 42–56. Springer, Heidelberg (2011)
Axelsen, H.B., Glück, R., Yokoyama, T.: Reversible machine code and its abstract processor architecture. In: Diekert, V., Volkov, M.V., Voronkov, A. (eds.) Computer Science—Theory and Applications, CSR 2007. Proceedings, Lecture Notes in Computer Science, vol. 4649, pp. 56–69. Springer, Heidelberg (2007)
Axelsen, H.B., Holzer, M., Kutrib, M., Malcher, A.: Reversible shrinking two-pushdown automata. In: Dediu, A.H., Martín-Vide, C., Truthe B. (eds.) LATA 2016. Proceedings, Lecture Notes in Computer Science. Springer, Heidelberg (2016). To appear
Axelsen, H.B., Jakobi, S., Kutrib, M., Malcher, A.: A hierarchy of fast reversible Turing machines. In: Krivine, J., Stefani, J.B. (eds.) Reversible Computation, RC 2015. Proceedings, Lecture Notes in Computer Science, vol. 9138, pp. 29–44. Springer, Heidelberg (2015)
Axelsen, H.B., Yokoyama, T.: Programming techniques for reversible comparison sorts. In: Feng, X., Park, S. (eds.) APLAS 2015. Proceedings, Lecture Notes in Computer Science, vol. 9458, pp. 407–426. Springer, Heidelberg (2015)
Bennett, C.H.: Logical reversibility of computation. IBM J. Res. Dev. 17(6), 525–532 (1973)
Feynman, R.: Quantum mechanical computers. Opt. News 11, 11–20 (1985)
Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for bi-directional tree transformations: a linguistic approach to the view update problem. ACM Trans. Programm. Lang. Syst. 29(3), 17 (2007)
Glück, R., Kawabe, M.: A program inverter for a functional language with equality and constructors. In: Ohori, A. (ed.) APLAS 2003. Proceedings, Lecture Notes in Computer Science, vol. 2895, pp. 246–264. Springer, Heidelberg (2003)
Glück, R., Kawabe, M.: Derivation of deterministic inverse programs based on LR parsing. In: Kameyama, Y., Stuckey, P.J. (eds.) Functional and Logic Programming. Proceedings, Lecture Notes in Computer Science, vol. 2998, pp. 291–306. Springer, Heidelberg (2004)
Glück, R., Kawada, Y., Hashimoto, T.: Transforming interpreters into inverse interpreters by partial evaluation. In: Proceedings of the Partial Evaluation and Semantics-Based Program Manipulation, PEPM 2003, pp. 10–19. ACM Press (2003)
Glück, R., Sørensen, M.: A roadmap to metacomputation by supercompilation. In: Danvy, O., Glück, R., Thiemann, P. (eds.) Partial Evaluation. Proceedings, Lecture Notes in Computer Science, vol. 1110, pp. 137–160. Springer, Heidelberg (1996)
Jones, N.D.: Computability and Complexity: From a Programming Language Perspective. Foundations of Computing. MIT Press, Cambridge (1997)
Kutrib, M., Malcher, A.: Reversible pushdown automata. In: Dediu, A.H., Fernau, H., Martín-Vide, C. (eds.) LATA 2010. Proceedings, Lecture Notes in Computer Science, vol. 6031, pp. 368–379. Springer, Heidelberg (2010)
Kutrib, M., Malcher, A.: One-way reversible multi-head finite automata. In: Glück, R., Yokoyama, T. (eds.) Reversible Computation, RC 2012. Revised Papers, Lecture Notes in Computer Science, vol. 7581, pp. 14–28. Springer, Heidelberg (2012)
Landauer, R.: Irreversibility and heat generation in the computing process. IBM J. Res. Dev. 5(3), 183–191 (1961)
Lecerf, Y.: Machines de Turing réversibles. Récursive insolubilité en \(n\in {N}\) de l’équation \(u=\theta ^n u\), où \(\theta \) est un “isomorphisme de codes”. Comptes Rendus Hebdomadaires des Séances de l’Académie des Sciences 257, 2597–2600 (1963)
Li, M., Vitányi, P.M.B.: An Introduction to Kolmogorov Complexity and Its Applications. Springer, New York (1993)
McCarthy, J.: The inversion of functions defined by Turing machines. In: Shannon, C.E., McCarthy, J. (eds.) Automata Studies, pp. 177–181. Princeton University Press, Princeton (1956)
Morita, K.: Reversible computing and cellular automata—A survey. Theo. Comp. Sci. 395(1), 101–131 (2008)
Morita, K., Shirasaki, A., Gono, Y.: A 1-tape 2-symbol reversible Turing machine. Trans. IEICE E 72(3), 223–228 (1989)
Morita, K., Yamaguchi, Y.: A universal reversible Turing machine. In: Durand-Lose, J., Margenstern, M. (eds.) Machines, Computations and Universality, MCU 2007. Proceedings, Lecture Notes in Computer Science, vol. 4664, pp. 90–98. Springer, Heidelberg (2007)
Mu, S.C., Hu, Z., Takeichi, M.: An algebraic approach to bi-directional updating. In: Chin, W.N. (ed.) APLAS 2004. Proceedings, Lecture Notes in Computer Science, vol. 3302, pp. 2–20. Springer, Heidelberg (2004)
Schellekens, M.: MOQA; unlocking the potential of compositional static average-case analysis. J. Log. Algebr. Program. 79(1), 61–83 (2010)
van de Snepscheut, J.L.A.: What Computing Is All About. Springer, New York (1993)
Thomsen, M.K., Axelsen, H.B.: Parallelization of reversible ripple-carry adders. Parallel Process. Lett. 19(2), 205–222 (2009)
Thomsen, M.K., Axelsen, H.B., Glück, R.: A reversible processor architecture and its reversible logic design. In: De Vos, A., Wille, R. (eds.) Reversible Computation, RC 2011. Revised Papers, Lecture Notes in Computer Science, vol. 7165, pp. 30–42. Springer, Heidelberg (2012)
Thomsen, M.K., Glück, R., Axelsen, H.B.: Reversible arithmetic logic unit for quantum arithmetic. J. Phys. A Math. Theo. 42(38), 2002 (2010)
Toffoli, T.: Reversible computing. In: de Bakker, J.W., van Leeuwen, J. (eds.) ICALP 1980. Proceedings, Lecture Notes in Computer Science, vol. 85, pp. 632–644. Springer, New York (1980)
Van Rentergem, Y., De Vos, A.: Optimal design of a reversible full adder. Int. J. Unconv. Comput. 1(4), 339–355 (2005)
Yokoyama, T., Axelsen, H.B., Glück, R.: Principles of a reversible programming language. In: Computing Frontiers, CF 2008. Proceedings, pp. 43–54. ACM Press (2008)
Yokoyama, T., Axelsen, H.B., Glück, R.: Fundamentals of reversible flowchart languages. Theo. Comp. Sci. 611, 87–115 (2016)
Yokoyama, T., Glück, R.: A reversible programming language and its invertible self-interpreter. In: Partial Evaluation and Program Manipulation, PEPM 2007. Proceedings, pp. 144–153. ACM Press (2007)
Acknowledgments
The authors wish to thank Michael Kirkedal Thomsen for help with the figures in Sect. 5, and Tetsuo Yokoyama for inspiring discussions on computability issues.
Author information
Authors and Affiliations
Corresponding author
Additional information
Revised and extended version of the conference papers [4, 5]. This research was partially supported by Danish Council for Strategic Research under the MicroPower project and the Danish Council for Independent Research | Natural Sciences under the Foundations of Reversible Computing project; the second author was partially supported by the Japan Society for the Promotion of Science. The authors acknowledge partial support from COST Action IC1405 Reversible Computation.
Rights and permissions
About this article
Cite this article
Axelsen, H.B., Glück, R. On reversible Turing machines and their function universality. Acta Informatica 53, 509–543 (2016). https://doi.org/10.1007/s00236-015-0253-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00236-015-0253-y