Reversibility of Turing Machine Computations

Similar documents
dt dt THE AIR TRACK (II)

Lecture 8.2 Fluids For a long time now we have been talking about classical mechanics, part of physics which studies macroscopic motion of

Equational Security Proofs of Oblivious Transfer Protocols

Nuclear Instruments and Methods in Physics Research B 262 (2007)

Handout 7. and Pr [M(x) = χ L (x) M(x) =? ] = 1.

A Dynamic Theory of Strategic Decision Making applied to the Prisoner s Dilemma

Motion Analysis of Euler s Disk

Physics 215 Winter The Density Matrix

I-Hsiang Wang Principles of Communications Lecture 02

Chaotic Coupled Map Lattices

Finite fields. and we ve used it in various examples and homework problems. In these notes I will introduce more finite fields

Selfish Traffic Allocation for Server Farms

1 Identical Parallel Machines

Forced Mechanical Oscillations

Chapter 2: Introduction to Damping in Free and Forced Vibrations

Simple procedures for finding mean first passage times in Markov chains

Block designs and statistics

1 Proof of learning bounds

Reduced Length Checking Sequences

Now multiply the left-hand-side by ω and the right-hand side by dδ/dt (recall ω= dδ/dt) to get:

Ocean 420 Physical Processes in the Ocean Project 1: Hydrostatic Balance, Advection and Diffusion Answers

EQUIVALENT CIRCUIT MODEL OF SEMICONDUCTOR LASERS TAKING ACCOUNT OF GAIN SUPPRESSION

An Extension to the Tactical Planning Model for a Job Shop: Continuous-Time Control

8.1 Force Laws Hooke s Law

Some Perspective. Forces and Newton s Laws

Solutions of some selected problems of Homework 4

Math Reviews classifications (2000): Primary 54F05; Secondary 54D20, 54D65

I-Hsiang Wang Principle of Communications Lecture 02

Approximation in Stochastic Scheduling: The Power of LP-Based Priority Policies

CONTROL SYSTEMS, ROBOTICS AND AUTOMATION Vol. XV - Modeling of Discrete Event Systems - Stéphane Lafortune

U V. r In Uniform Field the Potential Difference is V Ed

BALLISTIC PENDULUM. EXPERIMENT: Measuring the Projectile Speed Consider a steel ball of mass

Analyzing Simulation Results

Polygonal Designs: Existence and Construction

1 Generalization bounds based on Rademacher complexity

MSEC MODELING OF DEGRADATION PROCESSES TO OBTAIN AN OPTIMAL SOLUTION FOR MAINTENANCE AND PERFORMANCE

About the definition of parameters and regimes of active two-port networks with variable loads on the basis of projective geometry

On weighted averages of double sequences

2 Q 10. Likewise, in case of multiple particles, the corresponding density in 2 must be averaged over all

Note-A-Rific: Mechanical

THE ROCKET EXPERIMENT 1. «Homogenous» gravitational field

Reading from Young & Freedman: For this topic, read the introduction to chapter 25 and sections 25.1 to 25.3 & 25.6.

ma x = -bv x + F rod.

Model Fitting. CURM Background Material, Fall 2014 Dr. Doreen De Leon

The accelerated expansion of the universe is explained by quantum field theory.

Defect-Aware SOC Test Scheduling

Chaos and Dynamical Systems

Intelligent Systems: Reasoning and Recognition. Perceptrons and Support Vector Machines

This model assumes that the probability of a gap has size i is proportional to 1/i. i.e., i log m e. j=1. E[gap size] = i P r(i) = N f t.

The Weierstrass Approximation Theorem

Exponent Laws Unit 4 Exponential Functions - Lesson 18

Ph 20.3 Numerical Solution of Ordinary Differential Equations

Theory for dynamic longitudinal dispersion in fractures and rivers with Poiseuille flow

Generalized NEQ for assessment of ultrasound image quality

Equilibria on the Day-Ahead Electricity Market

UNIT HOMEWORK MOMENTUM ANSWER KEY

Birthday Paradox Calculations and Approximation

A := A i : {A i } S. is an algebra. The same object is obtained when the union in required to be disjoint.

Characterizations of the (h, k, µ, ν) Trichotomy for Linear Time-Varying Systems

Chapter 6 1-D Continuous Groups

Lost-Sales Problems with Stochastic Lead Times: Convexity Results for Base-Stock Policies

Quantum algorithms (CO 781, Winter 2008) Prof. Andrew Childs, University of Waterloo LECTURE 15: Unstructured search and spatial search

MINIMUM DISTANCE DECODING OF GENERAL ALGEBRAIC GEOMETRY CODES VIA LISTS

before the collision and v 1 f and v 2 f after the collision. Since conservation of the linear momentum

Motion of Charges in Uniform E

DSPACE(n)? = NSPACE(n): A Degree Theoretic Characterization

Interactive Markov Models of Evolutionary Algorithms

On Process Complexity

Chapter 1: Basics of Vibrations for Simple Mechanical Systems

A Simplified Analytical Approach for Efficiency Evaluation of the Weaving Machines with Automatic Filling Repair

A sensitivity analysis algorithm for hierarchical decision models

Level Crossing Rate in Terms of the Characteristic Function: A New Approach for Calculating the Fading Rate in Diversity Systems

Data-Driven Imaging in Anisotropic Media

Homework 3 Solutions CSE 101 Summer 2017

Generalized Queries on Probabilistic Context-Free Grammars

In this chapter, we consider several graph-theoretic and probabilistic models

arxiv: v1 [math.nt] 14 Sep 2014

Momentum, p. Crash! Collisions (L8) Momentum is conserved. Football provides many collision examples to think about!

3.8 Three Types of Convergence

Kinematics and dynamics, a computational approach

XV International PhD Workshop OWD 2013, October Limitations Caused by Sampling and Quantization in Position Control of a Single Axis Robot

Embedded Systems Development

Momentum, p = m v. Collisions and Work(L8) Crash! Momentum and Collisions. Conservation of Momentum. elastic collisions

Asymptotically Tight Bounds for Performing. BMMC Permutations on Parallel Disk Systems. (Extended Abstract) Thomas H. Cormen. Leonard F.

Support Vector Machines MIT Course Notes Cynthia Rudin

Mathematical Model and Algorithm for the Task Allocation Problem of Robots in the Smart Warehouse

On Poset Merging. 1 Introduction. Peter Chen Guoli Ding Steve Seiden. Keywords: Merging, Partial Order, Lower Bounds. AMS Classification: 68W40

Experiment 2: Hooke s Law

Theoretical Computer Science

A note on the multiplication of sparse matrices

M = (Q,Σ,δ,q 0,F) Σ is the alphabet over which the transitions are defined.

A Markov Framework for the Simple Genetic Algorithm

Estimation of the Mean of the Exponential Distribution Using Maximum Ranked Set Sampling with Unequal Samples

Simulation of Discrete Event Systems

ELEMENTARY MARKOV QUEUEING SYSTEMS WITH UNRELIABLE SERVER

Module #1: Units and Vectors Revisited. Introduction. Units Revisited EXAMPLE 1.1. A sample of iron has a mass of mg. How many kg is that?

time time δ jobs jobs

Causal closure for MSC languages

Physics 139B Solutions to Homework Set 3 Fall 2009

Introductory Physics Questions

Transcription:

Reversiility of Turing Machine Coputations Zvi M. Kede NYU CS Technical Report TR-2013-956 May 13, 2013 Astract Since Bennett s 1973 seinal paper, there has een a growing interest in general-purpose, reversile coputations and they have een studied using oth atheatical and physical odels. Following Bennett, given a terinating coputation of a deterinistic Turing Machine, one ay e interested in constructing a new Turing Machine, whose coputation consists of two stages. The first stage eulates the original Turing Machine coputation on its working tape, while also producing the trace of the coputation on a new history tape. The second stage reverses the first stage using the trace inforation. Ideally, one would want the second stage to traverse whole-achine states in the reverse order fro that traversed in the first stage. But this is ipossile other than for trivial coputations. Bennett constructs the second phase y using additional controller states, eyond those used during the first stage. In this report, a construction of the new achine is presented in which the second stage uses the sae and only those controller states that the first stage used and they are traversed in the reverse order. The sole eleent that is not fully reversed is the position of the head on the history tape, where it is out of phase y one square copared to the first stage. 1 Introduction In 1973, Bennett produced a seinal paper [1] in the field of reversile coputations. Inforally stated, Bennett s goal is to construct a achine perforing the sae coputation as the original achine and then undoing it, while preserving a copy of the useful output of the coputation. In this report, the preservation of the output will not e considered, as the focus is on reversiility only. A terinating coputation of a deterinistic Turing Machine can e descried y a sequence of whole-achine states, etween the sequential steps of the coputation, in the for of One ay want to extend the coputation to otain s 1 ; s 2 ; ; s f 2 ; s f 1 ; s f (1) s 1 ; s 2 ; ; s f 2 ; s f 1 ; s f ; s f C1 ; s f C2 ; ; s F 1 ; s F ; (2) which consists of (1) and its reverse, in the sense that F D 2f 1 and s 1Ci D s F i, for i D 0; 1; ; f 2, so that (2) is s 1 ; s 2 ; ; s f 2 ; s f 1 ; s f ; s f 1 ; s f 2 ; ; s 2 ; s 1 (3) However, as the coputation is deterinistic, this is only possile if s f 2 D s f, iplying f D 1 or f D 2. That is, either the syste is stationary, or it alternates etween two states. But it ay e possile to reverse the arrow of tie and in this way reverse the coputation, just as in a classical echanical syste. New York University, zvi.kede@nyu.edu 1

2 Bennett s Construction It is assued that the reader is copletely failiar with [1], ut as needed various points of that paper will e riefly suarized in this section. Bennett starts with a 1-tape Turing Machine whose controller s operation is defined y quintuples of the for T! T 0 ; (4) where is the old state, the new state, T is a syol to e read on the tape, T 0 is the syol to e written, and is one of, 0, and C, respectively indicating left, null, and right shift. Bennett first odifies the original 1-tape achine y replacing a quintuple with a pair of quadruples. Consider a generic quintuple, one that does not deal with the initial or the final state. So let the quintuple in (4) e the th quintuple in soe ordering of the quintuples. It is replaced y a pair of quadruples T! T 0 A 0 (5) A 0 =! ; where A 0 is an additional state, and the first quadruple instructs the head to overwrite T with T 0 and not to shift, and the second quadruple instructs the head to only shift as specified y and not to write. Let the achine e M. Then, Bennett constructs a new achine M 0, which has three tapes, working, history, and output, and which operates in three stages. In stage 1, M 0 ehaves just like M and perfors the coputation using the working tape while also writing a trace of the coputation on the history tape. In stage 2, M 0 copies the working tape, which now contains the output of the coputation, onto the output tape. In Stage 3, M 0 restores the working tape and the history tape. The quadruples defining M 0 are listed in Tale 1 of [1]. Consider a trivial odification of M 0, still to e called M 0, that is just a restriction of Bennett s construction to two tapes and reversiility (without copying the output onto the third tape). The quadruples of M 0 are listed in Tale 1. The two syols in rackets refer to the two tapes. The achine will proceed in two stages 1. In stage 1, the copute stage, M 0 executes the coputation as M did using the working tape, while writing a trace of the coputation on the history tape. This stage corresponds to Bennett s first stage. 2. In stage 2, the restore stage, M 0 uses the inforation on the history tape to restore the original values to the working tape, while erasing (and thus restoring to the original lank values) the history tape. This stage corresponds to Bennett s third stage. To enale the coputing and the restoring, the two quadruples of (5) are replaced y four quadruples 1. For stage 1 2. For stage 2 2.1 Exaple ΠT =! ΠT 0 C A 0 A 0 Π=! ΠC k Π=! ΠC 0 C 0 ΠT 0 =! ΠC j Here and susequently, when a reference to the quintuples laeled with is ade, it is assued that 2 < < N 1, so that a generic pair of instructions can e discussed. Consider an exaple of a sall part of the coputation. Let, then, M contain quadruples T! T 0 A 0 A 0 =! Note the choice of as the left shift in this exaple. Then, in M 0, there will e quadruples 2

Tale 1 Tale 1 of [1] restricted to two tapes and slightly reforatted. Note also that in the N th pair of quadruples in the Copute Stage, A f is replaced y C f. Contents of tape Working History Stage Quadruples tape tape Copute Retrace 1/ / N / N / / 1/ A 1 Π=! ΠC A 0 1 A 0 1 Π=! ΠC 1 A 2 ΠT =! ΠT 0 C A 0 A 0 Π=! ΠAf 1 Π=! ΠC A 0 N A 0 N Π=! Π0 N C f C f Π= N! Π0 CN 0 CN 0 Π=! ΠC f 1 C k Π=! ΠC 0 C 0 ΠT 0 =! ΠC j C 2 Π= 1! ΠC1 0 C1 0 Π=! ΠC 1 INPUT OUTPUT INPUT HISTORY 1. For stage 1 2. For stage 2 ΠT =! ΠT 0 C A 0 A 0 Π=! ΠC k Π=! ΠC C 0 C 0 ΠT 0 =! ΠC j In Fig. 1, there are three consecutive states of the coputation fro stage 1 and the corresponding three consecutive states fro stage 2. Only the relevant squares, two in nuer, are depicted for each of the two tapes. Looking at the upper part of the figure, illustrating a fragent of stage 1 the controller is in state ; H 1, the head assigned to the working tape, is on a square containing syol T ; and H 2, the head assigned to the history tape, is on a square whose contents is not specified, though it is known that this is the last square written on the history tape, and the square to the right of it contains a lank,. Then, see the evolution during two steps is shown. Note that H 1 shifted one square to the left, as instructed y a quadruple, and the square iediately to the right of H 2, and not indicated on the figure, contains a. Looking at the lower part of the figure, illustrating the corresponding fragent of stage 2, all the squares to the right of H 2 have een restored to the original values of and the achine will now undo a fragent of the coputation 3

Quadruples Working tape History tape T A [ T /] [ ] j [/ ] [ ] A k C [/ ] [ ] C k C k C k C [ /] [ ] C j C T C C j C j Figure 1 A fragent of stage 1 and the corresponding fragent of stage 2 for M 0. just descried aove. The controller is in state C k. H 1 is on a square whose contents is unspecified, and to its right is a square with T 0, which needs to e replaced y T. The inforation to do that is in the square on which H 2 is. The first quadruple instructs H 1 to shift to the right and H 2 to write a. The second quadruple instructs H 1 to overwrite T 0 with T and instructs H 2 to shift to the left. 3 Bennett s Construction Modified So far, Bennett s construction was descried. Now, y uilding on Bennett s construction, it will e shown that it is possile to tie-reverse a Turing Machine coputation so that there are no new states in stage 2, and the traversal of states in stage 2 is the reversal of their traversal in stage 1. Before descriing the odified construction, it is useful reviewing Bennett s reason for the replaceent of quintuple (4) y a pair of quadruples (5). The sequence of operations in a quintuple during a single step involves in general two squares 1. Read the syol on the current square. 2. Write a syol on that square. 4

Tale 2 Tale 1 odified, with quadruples replaced y quintuples. Letter x stands for any syol that could e on a tape, so that any quintuple with x stands for a faily of quintuples, one for each possile value of x on the tape. Note for future reference that H 2 does not shift in instructions N of stage 1 ut shifts to the left in instructions N of stage 2. Contents of tape Working History Stage Quintuples tape tape Copute 1/ A 1 Œ! Œ 0 0 A 0 1 A 0 1 Œ! Œ C 1 C A 2 INPUT / Œ T! Œ T 0 0 0 A 0 A 0 Œ T 0! Œ T 0 C Retrace N / N / Af 1 Œ! Œ 0 0 A 0 N A 0 N Œ! Œ 0 N 0 A f A f Œ N! Œ 0 A 0 N A 0 N Œ x! Œ 0 x 0 A f 1 OUTPUT HISTORY / Œ x! Œ x A 0 A 0 Œ T 0 x! Œ T 0 x 0 1/ A 2 Œ x 1! Œ x A 0 1 A 0 1 Œ! Œ 0 0 A 1 INPUT 3. Shift. As stated in [1], the reversal of these actions is 1. Shift. 2. Read a syol on the current square. 3. Write a syol on that square. But this is not allowed under the original definition of quintuples. Bennett thus decoposes the quintuple into two quadruples. The first perfors 1. Read the syol on the current square. 2. Write a syol on that square. The second perfors 1. Shift. During stage 1, H 1, on the working tape, in general, changes the direction of its shifts ultiple ties. During stage 2, these shifts need to e reversed, and a shift occurs efore a syol can e read and overwritten ased on the specifications of the original quintuple. 5

Note, that in contrast, the oveents of H 2 on the history tape follow the sae pattern for every achine. Looking at Tale 1, note that during stage 1, H 2 shifts only to the right, and during stage 2, it shifts only to the left. Therefore, the ehavior of H 2 can e specified using the original-for quintuples. This provides significant advantage the direction of the shift can depend not only on the state of the controller, ut also on the syol read y H 2. This akes it natural to produce a specification of the achine so that it ehaves differently depending on the stage the achine is in. Tale 1 is odified to otain Tale 2. This odification of M 0 will e called M 00. In its definition, quadruples are replaced y quintuples of the for (using Bennett s notation) A Œ ˇ! Œ ı A ; which eans if the achine is in state A, H 1 reads ˇ, and H 2 reads, then H 1 writes ı and shifts y, and H 2 writes and shifts y, and the new state is A. Exaining Tale 2, note that the quintuples do not add anything new to the ehavior of H 1. They are just the quadruples of Tale 1 written ore cuersoely. However, the situation is quite different with H 2. Looking at the two quintuples of in stage 1, H 2 does nothing in the first quintuple and oth writes and shifts in the second quintuple. In stage 2, it oth writes and shifts in the first quintuple an does nothing in the second quintuple. The key oservation is, that as a consequence of the construction, in stage 1, H 2 reads a lank,, and in stage 2, it reads a non-lank,. Therefore the ehaviors of the achines, including the direction of shifts, are different in the two stages, even though the controller states are the sae in stage 2 as in stage 1. 3.1 Exaple Consider now an exaple, analogous to Exaple 2.1. So again M contains quadruples Then, in M 00, there will e quintuples 1. For stage 1 2. For stage 2 T! T 0 A 0 A 0 =! Œ T! Œ T 0 0 0 A 0 A 0 Œ T 0! Œ T 0 C Œ x! Œ x C A 0 A 0 Œ T 0 x! Œ T 0 x 0 In Fig. 2, there are three consecutive states of the coputation, fro stage 1 and the corresponding three consecutive states fro stage 2. Only the relevant squares, three in nuer, are depicted for each of the two tapes. Looking at the upper part of the figure, illustrating a fragent of stage 1, the controller is in state, H 1 is on a square containing syol T, and H 2 is on a square whose contents is a lank,. Contrast this with Exaple 2.1, in which it was known that H 2 was on a square not containing. Then, oserve the evolution during two steps. Note that H 1 shifted one square to the left, as instructed y a quintuple, and the square under H 2, which is not indicated in the figure, contains a. Looking at the lower part of the figure, illustrating the corresponding fragent of stage 2, all the squares to the right of H 2 have een restored to the original values of and the achine will now undo a fragent of the coputation just descried aove. The controller is in state. H 1 is on a square whose contents is unspecified, and to its the right is a square with T 0, which needs to e replaced y T. The inforation to do that is in the square on which H 2 is. The first quintuple instructs H 1 to shift to the right and for H 2 to write a and to shift to the left. The second quintuple instructs H 1 to overwrite T 0 with T and instructs H 2 not to do anything. 6

Working tape HistoryQuintuples tape T A [ T ] [ 0 0] j [ ] [ ] A k A [ x ] [ x ] k [ x] [ T 0 x 0] A j T Figure 2 A fragent of stage 1 and the corresponding fragent of stage 2 for M 00. 4 Discussion As stated in Section 1 it is ipossile to otain a coputation of the for (3). However, it is possile to otain soething of very close for to it. A whole-achine state (cf. [1]) is the state of the controller, the contents of the tapes, and the positions of the heads on the tapes. For a 2-tape Turing Machine, this could e a quintuple of the for where 1. is the state of the controller. s D. ; ˇ1; ˇ2; 1 ; 2 /; 2. ˇ1 (respectively ˇ2) is the description of tape 1 (respectively tape 2). This will e a inial finite sequence of squares on the tape that includes all the non-lank squares. Note that as the origin of a tape is not specified as part of the definition of a Turing Machine (a tape is hoogeneous), it is not eaningful to specify the asolute position of the sequence of squares on the tape. 3. 1 (respectively 2 ) is the position of the H 1 (respectively H 2 ) with respect to the leftost square of ˇ1 (respectively ˇ2). If ˇ1 (respectively ˇ2) is epty, then 1 (respectively 2 ) is not eaningful and is set to 0. 7

Figure 3 Whole-achine configurations corresponding to Fig. 2. Only tape 2 is shown. Epty squares denote lank squares and shaded squares denote non-lank squares. Squares that are not shown to the left and to the right of the shown squares all contain lanks. The squares indicated y ellipses are shaded and do not contains lanks. The square shaded fro lower left to upper right corners contains. Syols in other shaded squares are not specified. In Fig. 3, the values of, ˇ2, and 2, corresponding to Fig. 2 are shown scheatically. Let the top achine state in the upper part of the figure take place in step t 1 and the otto achine state in the lower part of the figure take place in step t 2. Then oserve that for i D 0, 1, or 2. 1. t1 Ci D t2 i, 2. ˇ2t 1 Ci D ˇ2t 2 i, 3. 2 t 1 Ci D 2 t 2 i 3. Note that the positions of H 2 are not the sae for the corresponding whole-achine states. The reason for the out of synchronization of H 2 is the difference etween instructions corresponding to N in stage 1 and stage 2 of Tale 2. In stage 1 during the two instructions in N, H 2 does not ove, and in stage 2 it oves one square to the left. Thus, during stage 2, it will e ahead of the other eleents of the whole-achine state. Note that after M 00 reaches the end of stage 2, H 2 is one square to the left of the square it was on at the eginning of stage 1. But as tape 2 is epty and there is no origin, in oth cases 2 D 0. 8

Reference [1] Bennett, C. H. Logical reversiility of coputation. IBM Journal of Research and Developent 17, 525 532 (1973). 9