Academia.eduAcademia.edu

Reversible Computing

1980

The theory of revervible computing is based on invertible primitives and composition rules that premme invertibility. With these constraints, one can still satisfactorily deal with both junctional and structural aspects of computing processes, at the same time, one attains a closer correspondence between the behavior of abstract computing systemis and the microscopic physical laws (which ae presumed to be strictly reverN;ble) that underly' any concrete implementation of such systems. Here, we integrate into a comprehensive picture a variety r. c ancepts and results. According to a physical interpretation, the central r':0!., of this paper is that it i3 ideallypossible to build sequential circuits with cea .1ternal power dissipation. Even when these circuits are interfaced with o.-wextional ones, power dissipation at the Interface would be at moat pv'.P),Wonal t, the number of input/output lines, rather than to the numbe.-of lcgic gat(as in conventional computers.

LABORATORY FOR COMPUTER SCIENCE INSTITUTE OF TECOLOGY Mr/=/I-151 DTi ELECTE MAR 1 9 1980, romnuIBE caw=D~ -amkmso Toffoli February 1980 0 *:. This research %ws supported by the Office of Naval .'esearchunder Contract No. N00014-75-C-0661 LW --j 1 545 TECHNOLOGY SQUARE. CAMBRIDGE, MASSACHUSETTS 021W2 80 3 17 208 SECURITY CLASSIFICAT-ONOF THIS PAGE (Whe. Dlta Entered REPORT DOCUMEN'ATION PAGE S-tOV T-T7T7- 5 TYPE OF REPORT 6 PERIOD COVEREO .ii) R eversible Cmutng 7 BESRESUCOONSFORM RECIPIENT' CATALOG NUMBER ACCESSIC N 7_ __ _ _ _ PERFORMINGORG. REPbRT NUMBER N CONTRACTOR OPANT NUMBER(.) - AUTHORI(.) SPIERFORMINGfOANIZATIONNAME AND ADDRESS / PRCGRAM ELEMENT,PROJECT. TASK 10 M iLaboratory for Carputer )c'en-e 515 rechnology Square Carrbridge, MA 02139 LA & WORK UNIT A _-_ 1CONTROLLING OFFICE NAME AND ADORESSR II T]/ OF PAES 3 NUMBER Information Systems Program Arlington, VA 22217 14 38 MONITORINGAGENCY NAME N ADDRESJ(it alfl:nI lIoo C4IIAu I' OUffice)IS SECURITY CLASS (.I Chi. PontI) /Unclassified I$* 16 UMBRS DEC ASSIFICATION/DOWNNRADIHO OSTRIBUTION STATEMENT (of this Report) i's document has been approved for public release and sale; its distribution is unlimited 17 DISTRISIUrION STATEMENT (ol the 1H SUPFLEI ENTARY NOTES 19 KEY WORDS(" .,In,, on revi ehistlac .ted In block 20, IIt iI',ant ItromReport) DTIC E LE 7 T f. MR di 1 9 1771 nectfary and Identity bY block nu-ber) Reversible coi-putinq cirpitation universality auto)ata carvputin networks physical computing 20 USAI ld. T (Cninue on - nl*i.. ais ... n, .. d I4niiI by Aloc "-be,) Th4 f-heory of rex ersible comiputing is based on invertible primitives and carposition rules that preserve invertibility. With these constraints, one can still satisfactorily deal wich both functional and structural aspects of ca putinq processes; at the sae time, one attains a closer correspondence bbtsL en U, behavior of abstract computing systems and the microscopic physical laws (which are presned to be strictly reversible) that underly any concrete _-), L, 'Iu DD onation of such systems. 1473 EVQ IOC OT NOV 'S Heere 7 -e integrate)into a ocirprehensive TN SeOLETE SECnLTT CLASS,FICATIOII OF THIS -AGE n Doti, EI~I90l (Who,~f $99MMA LAVICATIo OF THUFPA6L. 00. &WKS* 2U. 'picture a variety of oonc~pts and results. According to a physical interpretticm, the central result of this paper is that it is ideally possible to bud sequential circuits with zero internal power dissipation. Even when these circpcs are interfaced with conventional ones, at the lines, interface would at the most proportional to thepower numberdissipation of input/output rather thanbe to number of logic gates as in conve.tional omputers. I. 1EUIYCLSIIA RL~VERSEBLE OMNPUTING * Ag," +~V Tormnaso offoli N s?2 Science MIT Laboratory for Computer 545 Technology Sq., Cambridge, MA 021St - t Abstract, The theory of revervible computing is based on invertible primitives and composition rules that premme invertibility. With these constraints, one can still satisfactorily deal with both junctional and structural aspects of computing processes, at the same time, one attains a closer correspondence between the behavior of abstract computing systemis and the microscopic physical laws (which ae presumed to be strictly reverN;ble) that underly' any concrete implementation of such systems. Here, we integrate into a comprehensive picture a variety r. cancepts and results. According to a physical interpretation, the central r':0!., of this paper is that it i3 ideallypossible to build sequential circuits with cea .1ternal power dissipation. Even when these circuits are interfaced with o.-wextional ones, power dissipation at the Interface would be at moat pv'.P),Wonal t, the number of input/output lines, rather than to the numbe.- of lcgic gat( as in conventional computers. Keywords. Reversible computing, computat'. automata, computing networks, physical computing. i u ~eruallf:,, 1. Introduction Mathematical models of computation are abstract .;w etlotuc, b,', nature unfettered by physical laws. However, if these aarc, V, ! ' dications that are relevant to concrete computing, they mehcw et r.vt n e albeit in a selective and stylized way, certain general mysical restrictio; to which all concrete computing processes are subjected. ' r instance, the T ing machine, which embodies in a heuristic form the axi.''~ of computability theory, avowedly accounts in its design[24 for the fact thai dhe speed of propagation of information is bounded, and that the amount o, 'aformation which can be encoded in the state of a finite system is bounded. However, other physli, 'This research was supported by Grant N0001445-C-061, Ofice of Naval Research, funded by DARPA. I principles of ciraparable importance, such as the reversibility at a microscopic level of the dynamical laws (which imposes severe constraints on the operation of concrete computing primltives[12,23]) and the fact that the topology of spacetime is locally Euclidean (which severely limits the range of interconnection patterns for concrete computing structures[191), are not yet adequately represented in the theory of computing. Conceivably, a better match between the abstract con ructr of the theory and its applications would be attained if a suitable counterpart of these principles were incorporated in the theory. Here, we shall be concerned with the issue of reversibilily. Intuitively, a dynamical system is reversible if from any point of its state sat one can uniquely trace a trajectory backward as well as forward in time. For a time-discrete systcom such as an automaton, this is equivalent to saying that its transition function is invertible, that is, bijective. The concept of reversibility has its origins in physics, and, in particular, in the study of continuous systems, such a.4 those characterized by a differential equation, rather than discrete systems, which are characterized by a transition function. In the continuous case, a more technical definition is necessary; namely, a dynamical system is reversible if its dynamical semigroup can be expanded to a group[14]. The connection between these two definitions is immediate, since in the discrete case the transition function coincides with the generator of the system's semigroup. It shoulbhe noted that reversibility does not imply invariance under ime reversal; the latter is a more specialized notion which is definable in a nontrivinc way only for dynamical systems having additional structure. In the past, aome misgivings were expressed concerning the computing capabilities of reversible automata. Such misgivings were cleared by the work of Bennett (reversible Turing machines[4]), Priese (reversible computers embedded in Thue systems[17]), Fredkin (conuervative logic[71), and Toffoli (reversible cellular automata[20]). Today, the concept of reveraible computing appears to be not only productive from a theoretical viewpoint but also promising in terms of technological applicationsl8l. In fact, one of the strongest motivations for the study of reversible computing comes from the desie to reduce heat dissipation in computing machinery, and thus achieve higher denhity and speed. Briefly, while the laws of physics are presumed to be strictly reversible, abstract computing is usually thought of as an irreversible process, since it may involve the evaluation of many-to-one functions. Thus, as one proceeds down from an abstract computing task to a formal realization by means of a digital network and finally to an Implementation in a physical system, at some level of this modeling hierarchy there must take place the transition from the irreversibility of the given computing process to 2 the reversibility of the physical laws. In the customary approaci;, this transition occurs at adigital very low levelasand is hidden--soof tothis speak-in thethe "physics" ~individual gate;* a consequence approach, det.ails of the work-to-heat conversion process are put beyond the reach of the conceptual model of computation that is used. On the other hand, it is possible to formulate a more general conceptual model of computation such that the gap between the irreversibility of the desired behavior and the reversibility of a given underlying mechanism is bridged in an explicit way within the model itself. This we shall do in the present paper. An important advantage of our approach is that any operations (such as the cleazing of a register) that in conventional logic lead to the destruction of macroscopic information, and thus entail energy dissipation, here can be planned at the whole-circuit level rather than at the gate level, and most of the time can be replaced by an information-lossless variant. As a consequence, it appears possible to design circuitswhose internalpower dissipation,under Ideal physical circumstances, is zero. The power dissipaticn that would arise at the interface between such circuits and the outside world would be at most proportional to the number of input/output lines, rather than to the number of logic gates. 2. Terminology and notation A function 0: X-" Y is finite if X .nd Y are finite sets. A finite automaton is a dynamical system characterized by a transition function of the form r: X X Q -- Q X Y, where r is finite. Without loss of generality, one may ass ' th such mets as X, Y, and Q above be explicitly given as indexed Cartesia. )roducts of sets. We shall occasionally call lines the individual variables associated with the individual factors of such products. By convention, the Cartesian product of zero factors is identified with the dummy set {) consisting of the empty word X.In what follows, we shall assume once and for all that all factors of the aforementioned Cart -sian products be identical copies of the Boolean set B -{O, 1). This assumption entails little loss of generality, and-at any rate-the theory of reversible computing could be developed along essentially the same lines if such assumptio i Nvere dropped. Typicalythe computation is logi ally organized around computing' pr1ritives that are not invertible, such as the NAND gate; in turn, these are realized by physical devices whi%h, while by thiir nature obeying reversible microscopic laws, are made macroscopicullyir,,versible by allowiug them to convert some work to heat. 3 The concept of "function composition" is a fundamental one in the theory of computing. According to the ordinary rules for function composition, an output variable of one function may be substituted for any number of input variables of other functions, i.e., arbitrary"fan-out" of lines is allowed. However, the process of generating multiple copies of a given signal must be treated with particular care when reversibility is an issue (moreover, from a physical viewpoint this process is far from trivial). For this reason, in all that follows we shall restrict the meaning of the term "function composition" to one-to-one composition, where any substitution of output variables for input vadiables is one-to-one (in other, words, no fan-out of lines is allowed). Any fan-out node in a given functioncomposition scheme will have to be treated as an explicit occurrence of a fan-out function of the form (z)" (z.... , z). Intuitively, the reaponsibility for providing fan-out is shifted from the composition rules to the computing primitives. We shall be dealing with various classes of abstract computers (such as combinational networks, finite Automata, Turing machines, and cellular automata) which constitute the main paradigms of the theory of computing. An abstract computer is, in essence, a function-composition schemne,* and a computation is a particular solution (which may be required to satisfy certain boundary conditions or other constraints) of such a scheme. While finite composition schemes are adequate for dealing with the most elementary aspects of computing, many computing processes of interest require an unbounded amount of resources and are more conveniently represented as taking place in infinite schemes. It is customary to express a function-composition scheme in graphical form as a causality network (or functional-dependence network). This is basically an acyclic directed graph whose nodes are labeled by associating with each of them a particular finite function and whose arcs are colored by associating with each of them a pai ticular variable. (Here, we can safely ignore certain slight technical differencea between a causality network and a directed graph.) By construction, causality networks are "loop-free," i.e., they contain no cyclic paths. A combinational network is a causality network that contahis no infinite paths. Note that a finite causality network is always a combinational one. With certain additional conventions, causality networks having a par icular iterative structure can be represented more compactly as sequential networks (cf. Section 7). We shall assume familiarity with the concept of "reali,ation" of finite func*In what follows, we shall restrict our attention to function-compoe- tio based on finite primitives. 4 c I tions and automata by means of, respectively, combinational and sequential networks. In what follows, a "realization" will always mean a componentwise one; that is, to each input (or output) line of a finite function there will correspond an input (or output) line in the combinational network that realizes it, and simiiariy for she realization of automata by sequential networks. A causality network is reversible if it is obtained by composition of invertil primitives. Note that a reversible combinatioDal network aiways defines an invertible function. Thus, in the case of combinational networks the structural aspect of "reversibility" and the functional aspect of "invertibility" coincide. A sequential network is reversible if its combinational part (i.e., the combinational network obtained by d.cting the delay elements and thus breaking the correepondlug arcs) is reversible. 3. In'"duttory concepts As exp!! ined in Section 1, our overall goal is to develop an explicit realization of computing processes within the context of reversible systems. For the moment, the processes we shall deal with v.ill be those described by finite functions, and the systems used for their realization will b,- reversible combinational networks. Later on, we shall consider sequential processes, characterized by the presence of internal states in addition to input and output states, and we shall study their realization by means of reversible sequential networks. As an introduction, let us consider two simple functions, namely, PAN.OUT (3.1a) and XOR (3.1b): 00 PAN-OUT X/ b) X1X2 Y 00 0 11 6 (3.1) XOI1 YJ X:1Y X Neither of the= functions is invertible. (Indeed, PAN-OUT X1 2 is not surjective, since, for instance, tht .utput (0, 1) cannot be obtained for any input value; and xon 5 is not injective, since, for instance, the output 0 can be obtained from two distinct input values, (0, 0) and (4,J)). Yet, b.otb functions admit c! In invertible realization. To see this, consider the invertible function table 00 t0 01 AL' o .. 11 01 xoRPANouT defined by the (3.2) which we have copied over with different headings in (3.3a), (3.3b), and (3.6b). Then, PAN.OUT can be realized by means of this function* as in (3.3a) (where we have outlined the relevant table entries), by assigning a value of 0 to the auxiliary input component c,and xon can be realized by means of the same function as in (3.3b), by simply disregarding the auxiliary output component g. In more technical terms, (3.1a) is obtained from (3.3a) by componentwise restriction, ane (3.1b) from (3.3b) by projection. o010 (a0 Fo 2l 10 10 I o0 (b) -l IC [00 [DL mm mm me -i (3.3) Y' XE1 I 2;2 In vhat follows, we shall collectively call the source the auxiliary input compo! ants that have been used in a realization, such as component c In (3.3a), and th. sink the auxiliary output components such as g in (3.3b). The remaining input components will be collectively called the argument, and the remaining output components, the result. In general, both source and sink lines will have to be introduced it, tv'_e "irain~tly, one speaks of a realization "by a network." Note, though,thairi finite function by itseit constitutes a trivial case of combinational network. to construct an invertible realiaitiou of. given function. X1X2 y 90 0 yV b (4 11 1 0I AND (3.4) NOT For example, from the invertible function 000 001 010 Oil100 101 110 ILL AND/NAID defined by the table 000 001 010 OI 100' 101 110 011 (3.5) the AND function (3.4a) can be realized as in (3.6a) with one source line and two sink lines. (a) CX1X2 ygl1j o1 0I ]1o0010 oi [001 (010 R [) uI (b) 1 "+ ie 10 0 D DIM 10 0 101 110 111 - 1 01 110 011 c (3.6) Y 112 I71~ y g2(= XI)c'=) 91(= - 1) 7 X i 4 J Yx Observe that in order to obtain the desired result the source lines must be fed with specified constant values, i.e., with values that do not depend on the argument. As for the sink lines, some may yield, values that do depend on thu argument-s in (3.6a)--and thus cannot be used as input constants for a new computation; these will be called garbage lines. On the other br.nd, some sink lines may return constant values; indeed, this happens whenever the functional relationship between argument and result is itself -a invertible one. To give a trivial example, suppose that the NOTI function (3.4b), which is invertible, were not available as a primitive. In this case one ciuld still realize it starting from another invertible function, e.g., from the xo/FAN.ouT function as in (3.6b); note that here the sink: c, returns in any case the value present at the source, c. In general; if there exists between a set of source lines and a set of sijk lines an invertible functional relationship that is independent of the value of all other Input lines, then this pair of sets will be called (for reanous that will be made clear in Section 5) a temporary-storage channel. Using the terminology just established, we htli say that the above realization of the PAN.oU function by means of an invertible combinational function is a realization with constants, that of the xoR function, with garbage, that of the AND function, with constants and garbage, and that of tht. NoT function, with temporary storage (for the sake of nomenclature, tke source lins that are part of a temporary-storage channel will not be counted as lines of :onstants). In referring to a realization, features that are not explicitly mentioned will be assumed not to have been used; thus, a realization "with temporary storag¢" is one without constants or garbage. A realization that does not require any nource or sink lines will be called an isomorphic realization. 4. The fundamental theorem Ia the light of the particular examples discussed in the previous section, this section establishes a general method for realizing an arbitrary finite function 4, by means of an invertible finite function f. Here, we are concerned with realizations in the sense defined in Section 2. In more general rnathematical parlance, a realization of a function 4 consia; a of a new function f together with two mappings p and v (respectively, th- encoder and the decoder) such that , = ifp. In this context, our plan is to obtain a realization vfi* of o, such that f is invertible and the mappings p and v' are essentially indnp-ndent of 4,and contain as little "computing power" as possible. More precisely, though the form of p and v,must obviously reflect the number of input and -output components of 4, and thus the format of O,'s truth table, 8 we want them to be otherwise independent of the particular contents of such truth table as q is made to range over the set of all combinatorial functions. In general, given any finite function one obtains a new one by assigning specified values to certain distinguished input lines (source) and disregarding certain distinguished output lines (sink). According to the following theorem, any finite function can be realized in this way starting from a suitable invertible one. T olrwm 4.1 For every finite function 4: B"-, B" there exists an !vertible finite function f Be X B"'-4 B" X B'+m'-" with r < n, such that 4 (i -(f..PII..1X Proof. Let ,..,) (4.1) 4' be defined by a binary table of the following form where X denotes a listing of all 2"' m-tuples over B and Y 6enetes a listing of the corresponding valuee of 4, which are n-tuples over B. We shall define a function f: B"+m --4 B'+"' by means of the followiiD table n M- 2n M where each block vf the form k (0 < k < 2") consists of 2" identical n-tuples each representing the integer k written in base 2, while each block of the form Y + k (0 < k < 2") consists of the 2' entries of Y each treated as a base2 integer and incremented by kmod 2". (So the sequence of "Y + V? blocks differs from the "k"sequence only by a circular permutation.) By construction, each side of this table contains each element of B"+m exactly once. Thus, f is invertible. Moreover, equation (4.1), with r - n, holds by construction. I 9 The meaning of Theorem 4.1 is illustrated in Figure 4.1 below. The operations of restriction and projection mentioned in Section 3 are respectively performed by an input encoder p and an output decoder P. While letting through the argument (z1 ,... , ,, unchanged, the encoder supplles the r source lines with constant values, I.e., with values that do not depend on the argument itself. On the other hand, while letting through the result (zj,..., S unchanged, the t-coder absorts whatever values come out of the the m + r - n sink lines. o0~~o result argument, Fio. 4.1 Any finite function can be written u the product of a trivhd encoder p, an invertible finite function f, and a trivial decoder a'. Intuitively, such a realization of 0 by means of an invertible function f is "fair," in the sense that neither p nor P,contribute to the "computing power" off Since p does not interact with the input signals, it will be more convenient to visualize it as a separate sotrce of constant input values, as in Figure 4.2b rather than as an input encoder, as in Figure 4.1; likewise, Vis more conveniently visualized as a separate sink of output values rather than as an output decoder. To sam up, whatever can be computed by an arbitrary finite function according to the schema of Figure 4.2a can also be computed by an invertiblefinite function according to the schema of Figure 4.2b. 10 source argument finite function orb fraryinvertible result argument finite function result sink FIG. 4.2 Any fiaite function (a) can be realized as an invertible finite function (b) having a number of auxiliary input lines which are ed with constants and a number of auxiliary output lines whose values are disregarded. Remark. The construction in the proof of Theorem 4.1 does not necessarily lea to a minimal realization, as often the number of source lines can be made strictly less than n and, correspondingly, the number of sink lines strictly 1=.e than m. Intuitively, in many car-s the given function 4 Is such that much of the information contained in the argument is retained in the result, so that in order to guaranteee invertibility f need only preserve in the garbage signals a traction of the total information. 5. Invertible primitives and reversible networks In the pre-ious section, each given 4 was realized by a reversible combinational network consisting of a single occurrence of an ad hoc primitivef. In this section, we shall study the realization of arbitrary finite functions by means of reversible combinational networks constructed from given primitives; in particular, from a certain finite set U of very t:mple primitives. If the given function 40is defined by means of an arbitrary combinational netwrfrk (in what follows, we shall assume for simplicity that this network be based on the NAND element), a reversible realization of 4,based on the set U can be obtained in a very simple way by subjecting the given network to straightforward translation rules. However, the reversible realization that is obtained in thin way in general requires many more sink lines (and, consequently, many more source lines) than the realization of Section 4. On the other hand, starting from the same set U of primitives but using more sophisticated synthesis techniques it is p :ssible to obtain a reversible realization of 4 that does not require any more gerhage lines than when realizing 4 by means of an ad hoc primitive /. In fact, f itself--or, for that matter, any invertible finite function-can be synthesized 11 from U without garbage, though possibly with temporary storage. In this synthesis, the peculiar constraints dictated by the reversibility context force one to pay attention to a number of issues, such as fan-out, temporary storage, and the handling of constants and garbage, which do not rse-or, at any rate, are not critical-when these constraints are not preseit. As a counterpart, the structure of the networks that are thus obtained provides more realistic indications of what an efficient physical implementation of the corresponding computing processes would have to be like. It is well known that, under the ordinary rules of function composition, the two-input NAND elemen~t constitutes a universal primitive for the set of all combinational functions. In the theory of reversible computing, a similar role is played by the AND/NAND element, defined by (3.5) and graphically represented as in Figure 5.1c. Referring to (3.6a), observe that y -, x1 (AND function) when c = 0, and y - rj' (NAND function) when c -I. Thus, as long as one supplies a value of I to input c and disregards outputs gi and 92, the ANDINAND element can be substituted for any occurence of a NAND gate in an ordinary combinational network. In spite of having ruled out fan-out as an intrinsic feature provided by the composition rul., one can still achieve it as a function realized by means of an invertible primitive, such as the XOR/FAN.OUT element defined by (3.2) and gra.,hically represented as in Figure 5.lb. In (3.3a), observe that YJ - I - x when c = 0 (PAN.OUT function); and in (3.3b), that y - xj a) x2 (xon function). Finally, recall that finite composition always yields invertible functions when applied to invertible functions (cf. Section 2). Therefore, using the set of invertible primitives consisting of the AND/NAND element and the xo/r.N.OUT element, any combinational network can be immediately translated into a reversible one which, when provided with appropriate input constarts, will reproduce the, behavior of the originai network. Indeed, even the set U consisting of the single element AND/NAND is sufficient for this purpose, since XoDrFAN.OUT can be obtained from AND/NANO, with one line of temporarty storage, by taking advantage of the mapping (I, p, q) 1-+ (1, p,), Eq).) The element-by-elemen' substitution procedure outlined above for constructing a reversible-network realization of a given combinational function is wasteful, in the sense that the number of source and sink lines that are introduced by this construction is roughlj proportional to th.: number of computing elements that make. up the network, and therefore in general much larger than the minimum required to compensate for the noninvertibility of the given function (ef. Section 4). 12 From the viewpoint of a physical implementation, where signals are encoded in some form of energy, each constant input entails the supply of energy of predictable form, or work, and each garbage output entails the removal of energy of unpredictbL:N form, or heat. In this context, ! realization with fewer source and sink lines inight point the way to a physical implementation that dissipates leas energy. Our plan to achieve a less wasteful realization will be based on the following concept. While it ir 'rue that each garbage signal is"random," in the sense that it is not predictable without knowing the value of the argument, yet it will be correlated with other signals in the network. Taking advantage of this, one can augment the network in such a way as to make correlated signals interfere with one another and produce a number of constant sirnals instead of garbage. These constants can be used as source signals in ,ther parts of the network. In tbis way, the overall number of both source and rink lines can be reduced. This proccss is analogous to the destructive interferemce of, say, sound waves. It is well-known that by superposing two correlated random signals one may obtain an overall signal which is less "noisy" that either component. In the remainder of this section we shall show how, in the abstract context of reversible computing, destructive interferencc of correlated signals can be achieved in a systematic way. For a similar process of destructive interference to take place in concrete computers (thus leading to greatly reduced power dissipation), one would have to match the abstract invertible primitives with digital gates taht are macroscopically--as well as microscopically-reversible. The arguments in [7,8,231 strongly suggest that such gates are indeed physically realizable. Returning to our mathematical exposition, we shall first show that any invertible finite function can be realized isomorphically from certain generalized AND/NAND primitives. Then, we shall show that any of these primitives can be realized from the AND/NAND element posibly with temporary stoiage but with no garbage. For convenience, we shall say that an invertible finite function is of order n if it has n input lines and n output lines. Dw INITION 5.1 Consider the set B - {0,1) with the usual structure of Boolean ring, with "(J"(exclusive-on) denoting the addition operator, "e" the additive-inverse operator (which in this case coincides with the identity operator), and juxtaposition (AND) the multiplication operator. For any n > 0, the generalized AND/NAND fanctioa of order n, denoted by O("): B" -* B", is 13 defined by ON': ,, (5.1) ker. EDx .. x Remark. (a) The e sign in (5.1), which is redundant (since ez - X), has been introduced for ease of comparison with the arguments of [23]. (b) For any 1,2,..., n-, 1 n > 0, O(n) is invertible and coincides with its Inverse. (c) For i the i-th component of O(N, i.e., O(n), coincides with the projection operator for x. (d)The last omponent the corresponding argument, i.e., of O(N, i.e., . ), coincides with the NOT function for n - I (note that, by convention, z...xz - I when i - 0), and with the exclusive-oR of its two arguments for n - 2. (e) For all other values of n, 6K') is still linear in the nth argument, but is nonlinear in the first n- I arguments. We have alteady encountered 0() under the name of the NOT element, 0(2) under the nnme of the XoRFAN.ouT element, and 0(0) under the name of the AND/NAND element. The generalized AND/NAND functions are graphically represented as Ii Figure 5.1d. -F-I-."r'--i--.r.... I IIII NOT XOR/PAN.OUT AND/NAND gencralizcd AND/NAND Fic. 5.1 Graphic representationof the generalized AND/NAND functions. This representation is offered only as a mnemonic aid in recalling a function's truth table, and is not meant to imply any "internal structure" for the function, or suggest any particular implementation mechanism. (a) 0(), which coincides with the NOT element; (b) 0(2), which coincides with the XOR/FAN.OUT element; fc? 0(), which coincides with the AND/NAND element; and, in general, (d) 9 'n, the generalized AND/NAND function of order n.The bilateralsymmetry of these symbols recalls the fact that each WARNING: of the correspondingfunctions coincides with its inverse. 14 An invertible function acts as a permutation on the elements of its domain, and it is well known that any permutation can be written as a product of elementary permutations, i.e., of permutations that exchange exactly two elements. In our attempt to synthesize arbitrary invertible functions of order n we shall consider, as building blocks, elementary permutations on B" and even more basic permutations on B" called atomic permutations. DFINITION 5.2 In the truth table for the AND/NAND element (3.5), observe that the only difference between the left- and the right-hand side of the table is that exactly two rows (namely, (0,1, 1) and (1,1, 1)) which have a Hamming distance of I (i.e., differ in exactly one position) have been exchanged. An atomic permuter is any function having this property. Any atomic permuter of order n can be constructed from the generalized element of order n by appending Nor elements to some of the Input lines and to each of the corresponding output lines, as in Figure 5.2a. Graphically, this permuter will be represented as in Figure 5.2b, where some of the Inputs to the AND-gate symbol ar negated (as denoted by a little circle). AND/NAND 2(a) ru-nd C ,* (r , , lJ I II I I I I Fia. 5.2 a t (a) Construction and (b) graphic representation of a particular atomic permuter. TIIOIM 5.1 Any invertible finite function of order n can be obtained by composition of atomic permuters of order n, and therefore by composition of generalized AND/NAND functions of order < n. Proof. It will be sufficient to show that one can obtain any elementary permutation on B". In a table of all elements of B", a sequence of table entries al, a2,... , a, (these are all n-tuples) are said to form a Gray-code path if any two entries that are adjacent in this sequence are related by an atomic permutation. Consider the pair of entries x and y that we wish to exchange, ..d consider a Gray-ode path 15 from z to y (such a path exists for any pair x, y). It is easy to verify that by means of sequence of atomic permutations item x can be moved to the end of the path, while the remainder of the path is shifted one position to the left but is otherwise unchanged. In a similar way, y can be brought to the beginning cx the path. Thus x and y can be exchanged by means of a sequence of atomic permutations without affecting the rest of the table.§ Remark. Note that the realization referred to by Theorem 5.1 is an isomorphic one (unlike that of Section 4, which makes use of source and sink lines). THEOREM 5.2 There exist invertible finite functions of order n which cannot be obtained by composition of generalized AND/NAr4D functions of order strictly less than n. Proof. In the context of the proof of Theorem 5.1, when 0(0 is applied to * any i components of B" this set is divided into 2"'4 disjoint collections of 2' n-tuples, and each collection is permuted by G( in an identical fashion. Thus, only even permutations can be obtained when i< n.Since the product of even permutations is even, only even permutations can bc obtained by one-to-one comnpodition of any number of AND]NAND functions or order less than n.4 Remark. According to this theorem, tQe AND/NAND primitive is not sufficient for the isomorphic reversible realization of arbitrary invertible finite functions of larger order. This result can be generalized to any finite set of invertible primitives, as implicit in the proof argument. Thus, one must turn to a less restrictive realization schema involviug source and sink lines. I. TH oREM 5.3 Any invertible finite function can be realized, possibly wit h temporary storage, (but with no garbagell by means of a reversible combinational network using as primitivm the generalized AND/NAND elements of order <3. Proof. In view of Theorem 5.1, it will be sufficient to reali-e (possibly with temporary storage), for each n, all atomic permuters of order n. Since these can be realized isomorphically from 0() and O(") (cf. Figure 5.2), it will be sufficient *(") O(N-'), to real'Le O() itself. We shall proceed by recursion; namely, given can Lt realized with one line of temporary storage as follows. Construct the network cf Figure 5.3, which contains two occurrences of 61n-) and one occurrence of 00). Observe that c' s- , since every generalized n the ec-ond occurrence of AND/NAND element coincides with its inverse (h..2 thus 0('- -1)cancels the effect of the first). Therefore, the pair ({c),(dc}) constitutes a temporary-storage channel. When c = 0, the reniaining variables behave as the corresponding ones of 8(1), X3 Y X5 X4 A4 FIG. 5.3 Realization with temporary storage of 0(1) from O("-1) (and 0()). In this network, when c - 0, also d - 0, and the remaining components behave as the corresponding ones of #("). In the above construction, it is clear that one line of temporary storage is added every time that one realizes the ANDf,'ANO function of the next higher order. Thence the following theorem. THnORnM 5.4. In Theorem 5.3, let r. be the order of the given invertible function, and m the number of source (as well as sink) lines requiredrequired for temporary-storagechannels in the realization. Then rm need not exceed n - 3. If only 0(3) is given as a primitive, then m need not exceed 3n - 3. Remark. The second part of this theorem reflects the fact that additional ternporary-storage lines are needed to realile NOT from AND/NAND (cf. (3.8)). The proof of Theorem 5.3 establishes a general mechanisms for bringing about destructive interfe;ence of garbage. With reference to Figure 5.3, which can serve as an outline for the general case, observe that the left portion of the network is accompanied by its "mirror image" on the right. The left portion computes an intermediate result (on the line running from c to d) that is needed ae an input to the lower portion and is returned by it urnchanged. Having performed its function, this intermediate result is then "undone" by the right portion, so that. no garbage is left. The reader may refer to (3,7] for more specific eyamples of destructive in- terference of garbage. Taken together, Theorems 5.3 and 5.4 have an interesting interpretation from the viewpoint of complexity theory. They imply a trade-off between the number of available primitives and the availability of an appropriate amount of a resource that, as we shall presently explain, can be intuitively identified with 17 temporary storage (hence the term "temporary-storage channel" introduced in Section 3.) Following the lines of the proof of Theorem 5.3, any invertible function f (Figure 5.4a) can be realised by a network of the kind illustrated in Figure 5.4b (where only some relevant details have been indicated). (a) (b) YYi ,C .. .,(=.c.) Faa. 5.4 If instead of an ad hoc reversible mechanism (a) for the Invertible function f one seeks a mechanism bvjed on the AND/NAND primitive, as in (b), auxiliaryconstant input signals 'are required. Such signals are returned unchanged al the output. Let us consider the process of traversing the box of Figure 5.4b from left to right. Each line running through th- box represents the evolution of a binary storage element. In general, all the constants entering the box will be repeatedly written over as they traverse the box itself; yet, they will emerge from the box ,ith the original values. In this context, . temporary storage channel (such as the pair ({cl,... , c, {. , c,4))) reF, -feats a "scratchpad" register which is initialized to an assigned state (say, all O's) and is invariably restored to the original state before the end of the computation. (Though more general, this behavior is analogous to that of the reversible Turing machines described by Bennett[4] and briefly discussed in Section 7.) In this context, Theorem 5.2 can be interpreted as saying that, for a given choice of reversible primitives, it may be impossible to carry out the computation of a given invertible finite function if one is restricted to working on a register ol size just enough to contain the argument (cf. the limitations of liuear-bounded automata). On the other hand, Theorem 5.3 says that this difficulty siappears as soon as one permits the use of an auxiliary temporary-storage register of appropriate size. The following list (cf. Figure 5.5) sums up in a schematic way the input/output resources of which a reversible network must avail itself in order 18 to be able to compute a finite function €, (a) argument _result (b) constants garbage (c) -- temporary storage channels (d) constants -.- j -- garbage FiG. 5.5 Classification of Input and output lines In a reverstible comblnatlonal network, according to their function. (ai Arguraent and result of the intended computation. (b) Constant and garbage lines to account for the noniDVertibility of the given function. (c) "Temporary storage" registers required when only a restricted set of primitives Isavailable. (d) Additional constant and garbage lines required when in designing the network one chooses not to take full advantage of the correlation between internal streams of data, and thus looses opportunities to bring &bout destructive interference of garbage. (a) If 0 is invertible, and the use of ad hoc primitives is allowed, then no source or sink lines ar. necessary. (b) If 0, is not invertible, it is necessary to provide source lines to be fed with specified constants and/or sink lines which will produce garbage. (c) Independently of the invertibility of 0, if only a restricted set of primitives is allowed it may be necessary to supply temporary-storage channeld (i.e, additional source lines to be fed with constants and an equal number of sink lines which will return constanta). (d) If, in order to simplify the mechanism, one chooses to ignore that certain streams of garbage within the mechanism are correlated and thus could be subjected to destructive interference, then further source and sink lines will be required, as in (b). 6. Conservative logic In view of the considerable exertions that were necessary in the previous nectione in order to obru a bona fide realization of mechar.iams having universal losic eapab litik azd a. the same time satisfying the ,-eribility constraint, jne rgt .vnder whether nontrivial computation would be possible at all if t* sutia f!urther constreintc were imposed. A ,' it tu nut hat universal logic capabilities can still be obtained t; n if one reatrkts one's attention to combinational networks that, in addition 19 to being reversible, conserve in the output the number of O's and l's that are present at the input. The study of such netw.:ks is part of a discipline called conservative logic [7] (also cf. 1I1). As a matter of fact, most of the results of Sections 4 and 5 were originally derived by Fredkin and associates in the context of conservative logic. In conservative logic, all data processing is ultimately reduced to conditional routing of signals. Roughly speaking, signals are treated as unalterable objecti; that can be moved around in the course of a computation but never created or destroyed. The physical significance of this principle will be discussed shortly. The basic primitive of conservative logic is the Fredkin gate (cf. [76]), defined by the table 000 010 001 01 1 1 to0' 0 00 0 01 010 01 1001 110 111 (6.1) IV0 111 This computing element can be visualized as a device that performs conditional crossover of two data signals a and b according to the value of a control signal c (Figure 6.A). When c - I the two data signals follow parallel paths, while when c .0 they cross over (Figure 6.1b). (b) (a) 1 00 a ;..-b Fi. 6.1 a b <,a _ b b a (a) Symbol and (b) operation of the Fredkin gate. In order to prove the universality of this gate as a logic primitive for reversible computing, it is sufficient to observe that AND can be obtained hom the mapping 'Beaides a combinational primitive (the 7redkin gate dissussed b. kow), conservative logic also posits a communication/memory primitive (the unit wire). Together, these two primitives are sufficient to account for sequential cfmputation. Moreover, they provide a basis for a theory of computation complexity which inorporates certain important physical-like constraints that are usually neglected. 20 (p,pq, Pq), and NOT and FAN-ouT from the mapping (p,1, 0) " (p,p,p. There exists only one other 3-input, 3-output conservative-loglc element, that can be used a,5 a universal primitive; this is the symmetric majority/paritysate (am) defined by (p, q,0) ~000 0 00 1 O0 001 010 ;01 0 1 1 1 1 0 (6.2) 100 ;1 .0 101 011 110 101 111 111 Intuitively, in the sm gate the three signals are rotated in one direction if their overall parity is even, and in the other direction if it is odd. While the amp gate can be realized isomorphically by means of Fredkin gates, a realization of the latter by the former requires a temporary-storage channel. In this sense, the Fredkin gate is the most elementary conservative-logic primitive--aince no 2input, 2-output invertible function Isunivernal. Finally, the Fredkin gate can be realized luomorphlcaly by means of AND/NAND gates, as shown LI Figure 6.2. X1 - C Fia. 6.2 Isomorphicrealization of the Fredkin gate by me~na OfAND/NAND gates. It is important to realize that, far from representing merely an elegant tourde-force in the theory of reversible computing, conservative logic provides an essential connection between that theory and the physics of computing circuits. In ' even more lementary coneervative-logic primitive, namely, the interaction gate[7], can be obtained if one considers invertible function whose domain and codomain coincide with a proper subset of a set of the form By. 21 fact, while in any reversible system whatsoever there are a number of conserved quantities, in physical system many of these quantities are required to have a special structure. For instance, energy, momemtum, and angular momentum are additive (this reflects certain symmetries of space and timt). Intuitively, reversibility by itself is not sufficient to give enough physical "flavor" to a theory of computing. In a conservative logic circuit, the number of l's, which is conserved in the operation of the circuit, is the sum of the number of l's in different parts of the circuit. Thus, this quantity is additive, and can be shown to play a formal role analogous to that of energy in physical systems. Other connections between conservative logic and physics will discussed in more detail in [71 In conclusion, conservative logic represents a substantial step in the development of a model of computation that adequately reflects the basic laws of p.hysics. T. Reveralble sequential computing In Sections 4 and 5, we started from a certain computing object (, iz., a finite function), and we discussed the conditions for its reversible realization first (a) as an object of the same nature (viz,, an invertible finite function) treated as a "lumped" system, thus stressing functional aspects, and then (b) as a "distributed" system (viz., a reversible combinational network), thus stressing structural aspects and paving the way for a natural physical implementation. By and large, we shall follow a similar plan in dealing with the more complex computing objects that constitute the paradigms of sequential computiug, namely, finite automata (in the present section), Turing machines (Section 8), and cellular automata (Section 9). First, we shall make a few commemts on sequential computing in general. In Section 2, we defined an abstract computer as a function-composition scheme. Some of these schemes possess a regular structure of a certain kind, namely, they are time-iterative,* and with appropriate corventions can be represented much more compactly in terms of sequential networks (cf. [9]). *If the partial-order rela-tion beteen arcs that is 1'nduced by the functioncomposition operation is interpreted as a causal relationship between signals, then certain other relations between arcs are naturally interpreted as referring to spatial and temporal relationships. In this context, a causal network may possess certain automorphisms that may be interpreted as time shifts, and Inthis case the network is time-iterativt, similarly, it may possess automorphisms corresponding to spatial shifts, and in this case it is space-iterativ. 222 Consider, for definiteness, the iterative function-composition scheme q.+1 i $ explicitly represented by the infinite causal network of Figure 7.1. q,+2 x, XS+ I !I y,, YYA Fia. 7.1 A function-compoeltion scheme havinga thne.iterative structure. The same scheme can be represented by the finite sequential network of Figttre 7.2. By comparing this figure with Figure 7.1, it is clear that the role of the so- called "delay elemente" in a sequential Letwork Isto mark out those places that correspond to the boundary between one stage and the next in the equivalent time-iterative combinational network. Fia.7.2 The 4ame function-compoasition scheme ar .'eprmented by a finite sequential network. r the previons sections, for the sake of realization argu r,- 5 we have treated a finite',tct-r, as a combinational network consisting of a sina,.'e node. Similarly, we shah , at b finite automaton as a sequential network whose combinational part cora : rif a single node, representing the automaton's transition function. Thus, for ttnple, the network of Figure 7.2 can be Identified with the finite automaton (q) '-' ( )q, x a) q). 23 Finally, recalling that a computation is a solution of a function-composition scheme (cf. Section 2), let us note that one is usually not interested in arbitrary solutions; rather, one seeks solutions corresponding to particular boundary conditions (defined, for instance, by assigning specified values to the input lines). Moreover, in the case of a time-iterative scheme, one is usually interested only in that portion of the scheme whose elements are indexed by i > is (for an arbitrary /o). The assignment of specified values to the new input lines that are created in this way (i.e., by "cutting" the network in hall) corresponds to Initializing the delay elements in the sequential-network representation. By definition, a finite automaton is reversible if its transition function is invertible. Thus, in order to realize a finite automaton by means of a reversible z,'jntirl network, it will be sufficient to take its transition function, construct a reversible realization of it, and use this as the combinational part of the desired sequential network. The problem of reversibly realizing an arbitrary finite function has been solved In Section 4. Thus, we have the following theorem. ToRPm 7.1. For every finite automaton r: X X Q-- Q X Y, where XB", Y B" and Q Bu, there exists a revesible finite automaton t: (B7 X B m) X Bu , Bu X (B" X B?+"-"), with r < n + u, sudL that 0(O . .. , O,x, ... ,xmql, ... , 7*"j(xl, f ... m,ql, ..... ,,( -l..t-- In other words, whatever can be computed by an arbitrary -nite automaton according to the scheme of Figure 7 .3a can 9lsc be coip%.ild by a, °.verible finite automaton according to the schema of Figure 7.3b. 24 (b) (a) inputold stae arbitrary te function, output state input source invertible finite output function tsink delays delays F20. 7.3 Any finite automaton (a) can be realized as a reversible finite automaton (b) having a number of auxiliaryinput lines (source) which are led with constants and a number of auxiliary output lines (Link) whose values are disregarded. The following theorem, which from a mathematical viewpoint is trivial, is a restatement of the second law of thermodynandcs. Recall that ru automaton is closed if X - (N} (i.e., there are no input lines); open, otherwise. TneoEum 7.2 If a closed, finite automaton is not reversible, then It does not admit of a reversible realization that is both closed and finite. Proof. Given a nonreversible automaton r: Q - Q, assume that t: P -- P be a reversible realization of r. That is, we assume the existence of an Invertible finite function t and of two maps p and ts (respectively, the encoder and the decoder) such that, for all i > 0, ii . (7.2) Since automaton t is finite and reversible, for any p E P there exists an ip> 0 such that '(p) = p. Thus, for any q E Q, vt'.(q)p(q) - vp(q). But, in view of (7.2), vp(q) - q and vt'(5)p(q) - r16(g)(q). As a consequence, 4 (;)(q) - q for all q. On the other hand, since automaton r is finite and nonreversible, there must be at least one q E Q such that rl(q) 74 q for all i > 0. Thus, the r-lginal assumption leads to a cor tradiction.1 Remark. According to Theorem 4.1, noninvertible functions can be com. puted by a reversible system provided that a supply of constants to madis a:valable. in an open system, this supply may come from some Input lines. In a 25 closed system, in order to perform a computation in one part of the system one may draw constants from another part, for instance, the indefinitely extended blank tape of a Turing machine (cf. Section 8). However, if the system Is also finite, this supply will eventually run out. Thus, the interpretation that a finite, closed, and reversible system "is modeling an irreversible process" can only be maintained for particular initial conditions and on a slace-time scale that is limited with respect to that of the entire system. Having discussed the realization of finite automata by means of reversible finite automata, we turn now to the realization of finite automata by means of reversible finite sequential networks based on given primitives. It is clear that all the arguments of Sections 5 and 6 concerning finite functions immediately apply to the transition function of any given finite automaton. In particular, in analogy with Figure 5.5, every finite automaton can be realized by a finite, reversible sequential network based on, say, the AND/NAND primitive and having the following form (Figure 7.4) source t input old state reversible finite ouitput new state temp. stor. channels--Isirnk Fto. 1.4 R~ealization of a finite automaton by means ala finite, reversible sequential netivork. In order to insure the desired behavior, the state components represented by the temporary-storage channels must be initialized once and for all with appropriate values (typically, all -'s), while the source mu3t be fed with appropriate constants (typically, all 0's) at every sequentialstep. In a conventional computer, power dissipation is proportional to the number of logic, gates, On the other hand, the number of constants/garbage lines in 26 Figure 7.4 is at worst protortional to the number of input/output lines (cf. Theorems 4.1 and 5.3). From the viewpoint of a physical implementation, where signals are encoded in some form of energy, the above schema can be interpreted as follows: Using invertible logic gates,it is ideally possible to build a sequential computer with -ro internal power dissipation. The only source of power dissipat;ai arises outside the circuit, typically at the input/output interface, if the user chooses to connect input or output lines to nonreversible digital circuitry. Even in this case, power dissipation is at most proportional to the number of argument/result lines,* rather than to the number of logic gates (as in ordinary computers), and is thus independent of the "complexity" of the function being computed. This constitutes the central result of the present paper. 8. Revertible Turing machines We shall assume the reader to be familiar with the concept of Turing machine. From our viewpoint, a Turing machine is a closed, time-discrete dynamical system having three state components, i.e., (a) an infinite tape, (b) the internal state of a finite automaton called head, and (c) a counter whose content indicates on which tape square the head will operate next. Let T, H, and C be the sets of tape, head, and counter states, respectively. A Turing machine is reversible if its transition function r: T X H X C -+ T X H X C is invertible. It is well kiown that for every recursive function there exists a Turing machine that ccmputes it, and, in particular, that there exist computationuniversal Turing machines. Are these capabilities preserved if one restricts one's attention to the class of reversible Tu.ing machines? The answer to the above question is positive. In fact, in [4] Bennett exhibits a procedure for constructing, for any Turing machine and for certain quite general computation formats, a reversible Turing machine that performs essentially the same computations. (The concept of "reversibility" used by Bennett is weaker than ours, insofar as the transition function and its inverse are defined only on distinguished subsets of tape/head/counter states, and even among these states there are some with no predecessors and others with no successors; however, the transition rules of Bennett's machine can easily be augmented so as to satisfy 'In fact, the free energy that must be supplied is at most that in which the input constants are encoded, and the thermal energy that must be removed is at most that of the garbage outputs. According to Theorem 4.1, the number of constant lines need not be greater than that of result lines, and the number of garbage lines need not be greater than that of argument lines. 27 our stronger definition. We shall assume this augmenting procedure to have been carried out.) In order to obtain the desired behavior, Bennett's machine is initialized so that all of the tape is blank except for one connected portion representing the computation's argument, and the head is set to a distinguished "initial" state and positioned by the argument's first symbol. At the end of the computation, i.e., when the head enters a distinguished "terminal" state, the result will appear on the tape alongside with the argument, and the rest of the tape will be blank. Thus, a number of tape squareg that are Initially blank will eventually contain the result. These squares fulfill a role similar to that played by the constants/garbage lines in Section 5, in the sense that they provide a sufficient supply of "predictable" input values (blanks) at the beginning of the computation, and collect the required smount of "random" output values (in this case, a copy of the argument-cf. the first row of (4.2)) at the end of the computation. Moreover, during the ccmputetion a number of originally blank tape squares may be written over and eventually erased. These squares fulfill a role similar to that played by the temporary-storage lines in Section 5 (cf. the discussilon centered on Figure 5.4). It is clear that, like the constants in the reversible combinational networks of Sectinn 5, the blanks in Bennett's machine play an essential role in the computation, since without their p rence one could not achieve univ.rsanlityand reiv.rribility at the same time. Intuitively, comp'atatlon "nreversible systems requires a higherdegree of "predictability"about the environment's initial conditions than comput0(lon in nonreversible ones. Owing to the "hybrid" nature of a Turing machiu, whih involveg several kinds of computing primitives (an active device, viz., the head, a passive device, viz., the tape, and mechanisms for head-tape interaction and for head movement), it is difficult to discuss the realizability of a Turing machine by means of a reversible, distributed computing mechanirm before having expressed the above primitives in terms of fewer and more elementary ones. For this reason, we shall deal with this problem at the end of the next section, when suitable tools will have been introduced. 9. Reversible celular autemata We shall assume the reader to have some familiarity with the concept of cellular automaton (cf. [21] for details and references). Fiom a physical viewpoint, cellular automata are in many respects more satisfactory models of computing 28 processes than Turing machines; in particular, they allow one to represet by means of the same mathematical machinery and at the same level of abstraction not only a computer proper but also its environment, the interface with its "users," and the "users" themselves[22]. A cellular automaton is in essence a kdimensional (k > 1) array o identical, uniformly interconnected finite automata, and constitutes a closed, time-diecrete dynamical system whose state set is a countable Cartesian product of finite sets and whose transition function is continuous (in the topological sense) and commutes with the translations (i.e., with the elements of the array'v symmetry group). A cellular automaton is reversible if its transition function is invertible. It is well known that there exist cellular automata that are computationand construction-universal. Are these capabilities preserved if one restricts one's attention to the class of reversible cellular automata? The answer to the above question is positive. In fact, in [20] Toffoli exhibji, a procedure for constructing, for any cellular automaton (presented as an infinite, spaee-iterative sequential network), a reversible cellular automaton that realizes it. (Note that until then the existence of computation- and construction-universal reversible cellular automata-which is thus establiehed-had been doubted or, by erroneous argumente, outright denied.) Assuming the original cellular automaton ft to be one-dimensional and with the von Neumann neighborhood (Figure 9.1a), with Toffoli's construction one obtaiac i two-dimensional cellular automaton M in which the flow of information between the celments of the array (or cells) can be visualized a in Figure 9.1b. 9l. (a) (b) Fia. 9.1 Infonmation flow (a) In a gien onc-dimenuloaal cellular automaton k, and (b) In the corresponding two-dimenulonal, -mvenblo realization M. Each row of M constitutes a revetsible (infinite) automaton which is, of course, open. Let us consider a particular row p. In analogy with Figure 7.3, let us interpret the arrows entering a rowv from above (In Figure 9.1) as murce line, 29 snd the ones leaving it from below as sink lines. By construction, when the source lines are fed with particular constant values (all O's) and the values on the sink lines are ignored, the "row" automaton will behave as ft. In order for M to constitute a reversible realization of f, one must guarantee that p's source lines are fed with O's at all time steps t > 0. But, by construction, if a row is initialized to a distinguished blank state and its source lines are fed with O's, then the row will remain in the blank state and its sink lines will produce O's. Thus, if all of the rows that lie above p are initialized to the blank state (Figure 9.2), an inexhaustible supply of O's will "rain down" into p. At the same time, p's sink lines will produce garbage that will spread down and sideways through the rows below p, while p itself will reproduce .M'sbehavior. p ~ ,simulation of!~ FiG. 9.2 With properinitialization,the reversible two-dimensional cellular automaton M realizes the one.dimensional automaton ft, which may be irreversible. In Section 5, we saw that, starting from a fixed, finite set of invertible logic primitives, one cannot obtain an isomorpic invertible realization for every invertible finite function; rather, in general one mat be allowed to use ad-hoc primitives (possibly as "complex" as the function itself) or introduce temporarystorage channels (thus giving up isomorphism). Similar considerations apply to finite automata. Consider now a reversible cellular automaton l f. f can always be realized as a reversible sequential network with temporary staragc. Isit possible to construct an ;omorphic reversible realization of M if one ibgiven a free hand in the choice of primitives? Surprisingly, the answer to this question is negative (Theorem 9.1 below). LWM^M9.1. Le m be the number of binarystate variables associated with eah cell ofta cellular automaton kf, and n the size of its neighborhood. A neces,30 ' sary condition for the isomorphic realizability of ft as a reveraible sequential network is that m > n. Proof. We shall sketch the proof for a one-dimensional cellular automaton if with m - 1, n-- 2, and neighborhood Index (0,-1)(i.e., the next state of cell i will depend on the current state :.cell i itself and of cell i- 1, that is, its "left" neighbor. Assume that the required realization M exists, it will have the form of Figure 9.3a. - I_ I. -t11 -_(d) I combinationalnetwork dclf dl,(c) s-I is -- Fic. 9.3 (a) Overall structure of the (assumed) isomorphic reversible realizationof &. Details of the combinationislpart of such realization:(b) paths from each cell to itself, (c) paths from each cell to its right neighbor, and (d) nodes implied by the existence of auch paths. Since each cell is "affected" by itself, there will be paths in the combinational part of M as in Figure 9.3b; similarly, since each cell is "affected" by its left neighbor, there will be paths as in Figure 9.3c. Thus, there will be nodes as in Figure 9.3d. These nodes cannot stand for invertible primitives (note fan-in at p and fan-out at q) unless further arcs exist (namely, an additional arc entering p and one leaving q). In turn, these arcs imply the existence of new nodes-and so on ad infinitum- ince connecting these arcs to one another would violate the partial ordering ("causality") associated with function composition). Clearly, it is impossible to complete the construction without introO Ing either cycles or paths of infinite length.g THEOREM 9.1 There exist reversible cellular automata that do not admit of an imuAorphic reversible realizaton. Proof. In [2, Amoroso and Patt exhibit reversible cellular avtomata (more 31 amply discussed In [21]) with m - I and n - 4. The thesis follows from Lemma 9.1.3 Finally, it is well known that any Turing machine can be embedded in a suitable cellular automaton. Thus, according to the foregoing discussion, aay Turing machine can be realized by an infinite reversible sequential nework. 10. Conclusions and perspectives What properties of an abstract computing system are critical in determining whether or not it can carry out a given task? To give an example, it is known tha. linearityis incompatible with computation universality[15]. Many other issues, dealing, for instance, with monotonicity, finiteness of storage, availability of constants, etc., have been discussed extencively in the past and are essentially settled. On the other hand, only recently has some light been thrown on the question of to what extent the imposition of the reversibliity tonstraiat affects the computing capabilities of a system. The sustained debate on this issue has been fueled and at times confused by obvious connections with certain physical questions. In this paper, we have laid down the foundationa for the theory of reversible computing, i.e., a theory of computing based on invertible primitives and composition rules that preserve invertibility, and we have shown that this theory can deal satisfactorily with both the functional and the structural aspects of computing processes. In particular, those structures that constitute the traditional paradigms of the theory of computing, such as combinational and sequential networks, finite automata, Turing machines, and cellular automata, have been ascertained to have reversible counterparts of equal computing power. (Analogous considerations apply to systems of difference equations, as will be shown in a later paper.) Thus, the choice to use reversible mechanisms in describing computing processes is a viable one. What can be gained from this choice? In the synthesis of an abstract computing system for a given task, the requirement that the system be reversible can in general be met only at the cost of greater structural complexity. In other words, one may need more (but not many more) gates and wires. However, the system's very reversibility prcmises to be a key factor in leading to a mrre efficient ph; sical realization, since, at the microscopic level, the "primitives" and the "composition rules" available in the physical world resemble much more closely those used in the theory of reversible computing than those used in traditional logic design. For example, it appears that coaservative logic might be completely modeled by processes of elastic collision tetween identical particles[7]. 32 Besides questions of efficient implementation of computing systems, there are several other research lines to which the concepts of reversible computing may give a substantial contribution. Here, we shall limit ourselves to naming a few on which some preliminary investigations have been carried out, such as error detection; numerical analysis end, in particular, the integration of differential equations; number theory and the factoring of large integers; secondorder automata and state-reduction techniques; synchronization of computing processes; and cellular automata and the modeling of fundamental physical laws. The main reason why the concept of reversibility is so pervasive is the following. In every reversible system there are a number of quantities (functions of the system's state) which are conserved, i.e., which are constant along each of the system's trajectories (ef. the "integrals of the motion" of theoretical mechanics). Both in mathematical and in physical research, experience has shown that many interesting properties of a system can usually be expressed in terms of conserved quantities, and on this basis one can often make nontrivial statements about the behavior of a system or a class of systems without having to go into a detailed, case-by-case analysis of their operation. Thus, in the more abstrect context of computing, the laws of "conservation of information" mty play r. role analogous to tho5e of conservation of energy and momentum in physics. I. Hlatorirel and bibliographical notes The computing element known as the "Fredkin gate" was apparently first described by Quine as an abstract primitive, and was known to Petri[10]. Some conservative (but not reversible) circuits using complementary signal streams were discussed by von Neumann25] as early as 1952. More recently, Kinoshita and associates[ 1]worked out a classification of logic elements that "conserve" O's and I's; their work, mof;-1 I by research in magnetic-bubble circuitry, mentions the possibility o ... nergy-efficient computation, but has apparently little concern for reversibility. The AND/NAND element was known to Petri[10], and was mentioned en passant, in the context of reversibility arguments, by Landauer[12]. The generalized AND/NAND functions were introduced by Toffoli[201 for proving the universality of reversible cellular automata. Doubts about the coaTputational capabilities of reversible cellular automata were first expressed by Moore[16], and more formally stated as a conjecture by B3urkel[5. Other parties in the debate were Smith[18), Amorovo and Patt[2], Aladyev[1, and Di Gregorlo and Ttautteur[{i]. 33 Distributed systems which are not reversible per se, but in which computation-universal, reversible structures can be embedded by proper initialization, were described by Priese[17]. The idea that universal computing capabilities could be obtained from reversible, dissipationless (and, of course, nonlinear) physical circuits apparently first oceiged to von Neumann, as reported in a posthumous paper[26]. This idea was also aired by Bennett[4], with some support from his construction of reversible Turing machines. A more formal proof of the physical realizability of such circ!-.it was given by Toffoli[23, and some conerete though not yet entirely practical approaches are outlined in [8]. A much more promising approach, based on the interaction gate, has been recently suggested by Fredkin[7]. Owing to the interdisciplinary nature of the subject, it is quite difficult to locate, evaluate, and credit all research results that may somehow be relevant to reversible computing. We shall appreciate any contributions to the above bibliographical notes. Aeknow!edgments As acknowledged in the text, many ideas discussed in the present paper were originated by Prof. Edward Frcdkin. Aside from this, I wish to thank him for much useful advice and encouragment. List of rderenees [1] ALADYBV, Viktor, "Some Questions Concerning Nonconstructibility and Computability in Homogeneous Structures," Izv. Akad. Nauk. Estonian SSR, Fiz.-Mat. 21 (1972), 210-214. [2] AMoRoso, Strafino, and PATT, Y.N., "Decision Procedus for Surjectivity and Injectivity of Parallel Maps for Tessellation Structures," J. Comptr. Syst. Sci. B(1972), 448-464. [3] BA TON, Edward, "A Reversible Computer Using Conmervative Logic," 6.895 Term Paper, MIT Dept. of Electr. Eng. Comp. Sci. (1978). [4] BENNnDTT, C.H., 'Logical Reve.'ibility of Computation," IBMJ.Res. Dev. e (1973), 525-532. [5] BuRms, A. W., "On BackwardsDeterministic, Erasable, and Garden-ofEden Automata," Tech. Rep. no. 012520.4-T, Comp. Comm. Sci. Dept., Univ. of Mhchigan (1971). 34 [6] Di Gnonio, Salvatore, and TRAUTMUR, Giorgio, "On Reversibility in Cellular Automata," J.Comptr. Syst. Sci. J1 (1975), 382-391. [7] FWDKCIN, Edward, and TorpotI, Tommaso, "Conservative Logic," (in preparation). Some of the material of this paper is tentatively available inthe form of unpublished notes from Prof. Fredkin's lectures, collected and organized by Bill Silver in a 0.895 Term Paper, "Conservative Logic," MIT Dept. of Electr. Eng. Comp. Sci. (1978). [8] FnDmIN, Edward, and ToproiL, Tommaso, "Design Principles for Achieving High-Performance Submicron Digital Technologies," Propose! to DARPA, MIT Lab. for Comp. Sci. (1978). HBNNIM, C. H., Iterative Arrays of Logical Circuits,John Wyley and Sons [9] (1961). [101 HOLT, Anatol, Personal communication (1979). [I1] KINostitTA, Kozo, et al., "On Magnetic Bubble Circuits," LM Trans. Computers 0-75 (1976), 247-253. [12] LANDAUER, RoIf, "Irreversibility and Heat Generation in the Computing Process," IBM J. 5 (t91), 183-191. [13] LANDAUSE, Rolf, "Fundamental Limitations in the Computational P.-ocess," Tech. Rep. RC 6048, IBM Thomas J. Watson Res. Center (1978). [14] MAcK Y,G. W., Mathematical Foundationsof Quantum Mechanics, W. A. Benjamin (1983). [15] Mn mn, J. D., and ZEIGLER, B. P., "On the Limits of Linearity," Theory of Machines and Computation, 229-242, Academic Press (1971). [16] MooRM, E. F., "Machine Models of Self.Reproduction," Proc. Symp. Appl. Math. (Amer. Math. Soc. 14 (1962), 17-33. [17] Pranse, Lutz, On a Simple Combinatorial Structure Sufficient for Sublying Nontrivial Self-Reproduction, J.Cybernetics 5 (1976), 101-137. [18] SNITH, A. R. 111, "Cellular Automata Theory," Tech. Rep. no. 2, Stanford Electr. Lab., Stanford Univ. (1969). [19] SUTHBRLAND, I. E., and MAD, C. M., "Micrielectronics and Computer Science," Scientific American 237:3 (Sept. 1977), 210-262. [20] TOFFOLI, Tommaso, "Computation and Construction Universality of Reversible Cellular Automata," J. Comput. Syst. Sci. 15 (1 77), 213231. [21] ToFFOLY, Tommaso, 'Cellular Automata Mechanics" (Ph.D. Thesis), Tech. Rep. no. 208, Logic of Computers Group, Univ. of Michigan (1977). [22] TorroU, Tommaso, "The Role of the Observer in Uniform Systems," Applied General Systems Research (ed. G. J.Kilr), 39-400 (Plenum 35 Press, 1978). [23) ToProLI, Tommas, "Blcontinuous Extensions of Invertible Combinatorial Functions," Tech. Memo MIT/LCS/TI-124, MIT Lab. for Comp. Scl. (1979) (to appear in Math. Byst. Theory). (24) TURING, A. M., "On Computable Numbers, with an Application to the Entscheiduugproblem," Proc. London Math. Soc., smr. 2, 43 (1936), 544546. 1251 VON Nw-mArNN, John, "Probabilistic Logics and the Synthesis of Reliable Organisms from Unreliable Components," Automata Studies (edited by C. E. Shannon and . McCarthy), 43-98, Princeton Univ. Press (1958). 126 WwvwNGTON, I. L., "ANew Concept In Computing," Proc./1R 47/(1961), 516-523. 36 OICIAL DIS rIBUTICN LIST Defense Technical Information Center Cameron Station Alexandria, VA 22314 12 copies Office of Naval Research Information Systems Program Code 437 Arlington, VA 22217 2 copies Office of Naval Research Branch Office/Boston Building 114, Section D 666 Suner Street Boston, MA02210 1 copy Office of Naval Research Branch Office/Chicago 536 South Clark Street Chicago, Mh 60605 I copy Office of Naval Research Branch Office/Pasadena 1030 East Green Street Pasadena, Ch 91106 1 copy New York Area 715 Broadway - 5th floor New York, N. Y. 10003 1 copy Naval Research Laboratory Technical Information Division Code 2627 Washington, D. C. 20375 6 copies I. Assistant Chief for Technology Office of Naval Research Code 200 Arlington, VA 22217 1 copy Office of Naval lesearch Code 455 Ailington, VA 22217 I copy Dr. A. L. Slafkosky Scientific Advisor Cmixndant of the Marine Corps (Code IR-1) Washington, D. C. 20380 1 copy Office of Naval Research Code 458 Arlington, VA 22217 I copy Naval Ocean Systems Center,Code 91 Headquarters-Ozaputer Sciences & Sirmlation Department San Diego, CA 92152 Mr. Lloyd Z. Maudlin i copy Mr. E. H. Gleissner Naval Ship Research & Developimnt Center Carptation & Math Department Bethesda, MD20084 Ioopy Captain Grace M. IVpper (008) Naval Data Automation cmad Washington Navy Yard Building 166 Washington, D. C. 20374 l copy Mr. Kin B. Thcmpson Technical Director Information Systems Divisia.i (OP-91T) Office of Chief of Naval Operations Washington, D. C. 20350 1 copy