The model of the ideal rotary element of Morita Serban E. Vlad 1 1 Oradea City Hall, 0 2 P-ta Unirii 1, 410100, Oradea, ROMANIA n email: serban e [email protected] a J 5 ] 1 Abstract H O Reversible computing is a concept reflecting physical reversibility. Until s. now several reversible systems have been investigated. In a series of pa- c pers Kenichi Morita defines the rotary element RE, that is a reversible [ logic element. By reversibility, he understands [2] that ’every computa- 3 v tion process can be traced backward uniquely from the end to the start. 2 In other words, they are backward deterministic systems’. He shows [1] 4 that any reversible Turing machine can be realized as a circuit composed 8 5 of RE’s only. . 2 Our purpose in this paper is to use the asynchronous systems theory 1 and the real time for the modeling of the ideal rotary element.1 0 1 : 2 Preliminaries v i X Definition 1 The set B = {0,1} endowed with the usual algebraical r laws , ∪, ·, ⊕ is called the binary Boole algebra. a Definition 2 The characteristic function χ : R → B of the set A A ⊂ R is defined by ∀t ∈ A, (cid:26) 1,t ∈ A χ (t) = . A 0,t ∈/ A Notation 3 We denote by Seq the set of the sequences t ∈ R, k ∈ N k which are strictly increasing t < t < t < ... and unbounded from 0 1 2 above. The elements of Seq will be denoted in general by (t ). k 1Mathematical Subject Classification (2008) 94C05, 94C10, 06E30 Keywords and phrases: rotary element, model, asynchronous system 1 Figure 1: RE in state x (t − 0) = 0 and with the input u (t) = 1 0 1 computes x (t) = 0 and x (t) = 1 0 1 Definition 4 The signals are the R → Bn functions of the form x(t) = µ·χ (t)⊕x(t )·χ (t)⊕...⊕x(t )·χ (t)⊕... (1) (−∞,t0) 0 [t0,t1) k [tk,tk+1) t ∈ R, µ ∈ Bn, (t ) ∈ Seq. The set of the signals is denoted by S(n). k Definition 5 In (1), µ is called the initial value of x and its usual notation is x(−∞+0). Definition 6 The left limit of x from (1) is x(t−0) = µ·χ (t)⊕x(t )·χ (t)⊕...⊕x(t )·χ (t)⊕... (−∞,t0] 0 (t0,t1] k (tk,tk+1] Definition 7 An asynchronous system is a multi-valued function f : U → P∗(S(n)),U ∈ P∗(S(m)). U is called the input set and its elements u ∈ U are called (admissible) inputs, while the functions x ∈ f(u) are called (possible) states. 3 The informal definition of the rotary element of Morita Definition 8 (informal)Therotary elementREhasfourinputsu ,..., 1 u , a state x and four outputs x ,..., x . Its work has been intuitively 4 0 1 4 explained by the existence of a ’rotating bar’. If (Figure 1) the state x 0 is in the horizontal position, symbolized by us with x (t − 0) = 0, then 0 u (t) = 1 -this was indicated with a bullet- makes the state remain hor- 1 izontal x (t) = 0 and the bullet be transmitted horizontally to x , thus 0 1 x (t) = 1. If (Figure 2) x is in the vertical position, symbolized by us 1 0 2 Figure 2: RE in state x (t − 0) = 1 and with the input u (t) = 1 0 1 computes x (t) = 0 and x (t) = 1 0 4 with x (t − 0) = 1 and if u (t) = 1, then the state x rotates coun- 0 1 0 terclockwise, i.e. it switches from 1 to 0 : x (t) = 0 and the bullet is 0 transmitted to x : x (t) = 1. No two distinct inputs may be activated at 4 4 a time -i.e. at most one bullet exists- moreover, between the successive activation of the inputs, some time interval must exist when all the in- puts are null. If all the inputs are null, u (t) = ... = u (t) = 0 -i.e. if 1 4 no bullet exists- then x keeps its previous value, x (t) = x (t−0) and 0 0 0 x (t) = ... = x (t) = 0. The definition of the rotary element is completed 1 4 by requests of symmetry. Remark 9 Morita states the ’reversibility’ of RE. This means that in Figures 1 and 2 where time passes from the left to the right we may say looking at the right picture which the left picture is. In other words, knowing the position of the rotating bar and the values of the outputs allows us to know the previous position of the rotating bar and the values of the inputs. In this ’reversed’ manner of interpreting things the state x 0 rotates clockwise, x ,...,x become inputs and u ,...,u become outputs. 1 4 1 4 We suppose that the outputs are states, thus the state vector has the coordinates x = (x ,x ,x ,x ,x ) ∈ S(5). 0 1 2 3 4 4 The ideal RE Remark 10 We ask that all the variables belong to S(1) and that any switch of the input is transmitted to x ,...,x instantly, without being 0 4 altered and without delays. This approximation is called by us in the following ’the ideal RE’, as opposed to ’the inertial RE’. Notation 11 We denote 0 = (0,0,0,0) ∈ B4, 3 D = {0,(1,0,0,0),(0,1,0,0),(0,0,1,0),(0,0,0,1)}. Definition 12 The set of the admissible inputs U ∈ P∗(S(4)) is U = {λ0 ·χ ⊕λ1 ·χ ⊕...⊕λk ·χ | [t0,t1) [t2,t3) [t2k,∞) k ∈ N,t ,...,t ∈ R,t < ... < t ,λ0,...,λk ∈ D} 0 2k 0 2k ∪{λ0·χ ⊕λ1·χ ⊕...⊕λk·χ ⊕...|(t ) ∈ Seq,λk ∈ D,k ∈ N}. [t0,t1) [t2,t3) [t2k,t2k+1) k Notation 13 τd : R → R, d ∈ R is the function ∀t ∈ R, τd(t) = t−d. Theorem 14 The functions u ∈ U fulfill a) u(−∞+0) = 0; b) ∀i ∈ {1,...,4}, ∀j ∈ {1,...,4}, ∀t ∈ R, i (cid:54)= j implies u (t)u (t) = 0, (2) i j u (t−0)u (t)u (t−0)u (t) = 0; (3) i i j j c) ∀u ∈ U, ∀d ∈ R, u◦τd ∈ U. Definition 15 We define the set of the initial (values of the) states Θ = {(0,0,0,0,0),(1,0,0,0,0)}. 0 Definition 16 For u ∈ U, x ∈ S(5), x(−∞+0) ∈ Θ , the equations 0 x (t) = x (t−0)(u (t)∪u (t))∪x (t−0) u (t) u (t), (4) 0 0 2 4 0 1 3 x (t) = x (t−0) x (t−0)(u (t−0)u (t)∪u (t−0)u (t))∪ (5) 1 1 0 1 1 2 2 ∪x (t−0)(x (t−0)∪u (t−0)∪u (t))(x (t−0)∪u (t−0)∪u (t)), 1 0 1 1 0 2 2 x (t) = x (t−0) x (t−0)(u (t−0)u (t)∪u (t−0)u (t))∪ (6) 2 2 0 2 2 3 3 ∪x (t−0)(x (t−0)∪u (t−0)∪u (t))(x (t−0)∪u (t−0)∪u (t)), 2 0 2 2 0 3 3 x (t) = x (t−0) x (t−0)(u (t−0)u (t)∪u (t−0)u (t))∪ (7) 3 3 0 3 3 4 4 ∪x (t−0)(x (t−0)∪u (t−0)∪u (t))(x (t−0)∪u (t−0)∪u (t)), 3 0 3 3 0 4 4 x (t) = x (t−0) x (t−0)(u (t−0)u (t)∪u (t−0)u (t))∪ (8) 4 4 0 4 4 1 1 ∪x (t−0)(x (t−0)∪u (t−0)∪u (t))(x (t−0)∪u (t−0)∪u (t)) 4 0 4 4 0 1 1 are called the equations of the ideal RE (of Morita) and the system f : U → P∗(S(5)) that is defined by them is called the ideal RE. Remark 17 The system f is finite, i.e. ∀u ∈ U,f(u) has two ele- ments {x,x(cid:48)} satisfying x(−∞ + 0) = (0,0,0,0,0) and x(cid:48)(−∞ + 0) = (1,0,0,0,0). Notation 18 Let be µ ∈ Θ . We denote by f : U → S(5) the uni-valued 0 µ (i.e. deterministic) system ∀u ∈ U, f (u) = x µ where x fulfills x(−∞+0) = µ and (4),...,(8). 4 5 The analysis of the ideal RE Definition 19 We define Φ : B5 × B4 → B5 by ∀(µ,λ) ∈ B5 × B4, Φ (µ,λ) = (µ (λ ∪ λ ) ∪ µ λ λ ,µ (λ ∪ λ ),µ (λ ∪ λ ),µ (λ ∪ 0 0 2 4 0 1 3 0 1 2 0 2 3 0 3 λ ),µ (λ ∪λ )). 4 0 4 1 Notation 20 For all k ∈ N, λ0,...,λk,λk+1 ∈ D and for any µ ∈ Θ , 0 the vectors Φ(µ,λ0...λkλk+1) ∈ B5 are iteratively defined by Φ(µ,λ0...λkλk+1) = Φ(Φ(µ,λ0...λk),λk+1). Remark 21 The iterates Φ(µ,λ0...λk) show how Φ acts when a succes- sion of input values λ0,...,λk ∈ D is applied in the initial state µ ∈ Θ . 0 For example we have Φ(µ,0) = µ, Φ(µ,λ0λ(cid:48)) = Φ(µ,λλ(cid:48)) for any µ ∈ Θ and λ,λ(cid:48) ∈ D. 0 Theorem 22 When µ ∈ Θ , λ,λ0,...,λk,... ∈ D and (t ) ∈ Seq, the 0 k following statements are true: f (λ0 ·χ ⊕λ1 ·χ ⊕...⊕λk ·χ ) = (9) µ [t0,t1) [t2,t3) [t2k,∞) = µ·χ ⊕Φ(µ,λ0)·χ ⊕Φ(µ,λ00)·χ ⊕Φ(µ,λ0λ1)·χ ⊕... (−∞,t0) [t0,t1) [t1,t2) [t2,t3) ...⊕Φ(µ,λ0...λk−10)·χ ⊕Φ(µ,λ0...λk)·χ , [t ,t ) [t ,∞) 2k−1 2k 2k f (λ0 ·χ ⊕λ1 ·χ ⊕...⊕λk ·χ ⊕...) = (10) µ [t0,t1) [t2,t3) [t2k,t2k+1) = µ·χ ⊕Φ(µ,λ0)·χ ⊕Φ(µ,λ00)·χ ⊕Φ(µ,λ0λ1)·χ ⊕... (−∞,t0) [t0,t1) [t1,t2) [t2,t3) ...⊕Φ(µ,λ0...λk−10)·χ ⊕Φ(µ,λ0...λk)·χ ⊕... [t ,t ) [t ,t ) 2k−1 2k 2k 2k+1 Theorem 23 ∀µ ∈ Θ ,∀u ∈ U,f (u) ∈ S(1) ×U. 0 µ Theorem 24 a) ∀µ ∈ Θ ,∀µ(cid:48) ∈ Θ ,∀u ∈ U, 0 0 µ (cid:54)= µ(cid:48) =⇒ f (u) (cid:54)= f (u); µ µ(cid:48) b) ∀µ ∈ Θ ,∀u ∈ U,∀u(cid:48) ∈ U, 0 u (cid:54)= u(cid:48) =⇒ f (u) (cid:54)= f (u(cid:48)); µ µ c) ∀u ∈ U,∀u(cid:48) ∈ U, u (cid:54)= u(cid:48) =⇒ f(u)∩f(u(cid:48)) = ∅. 5 Remark 25 The previous Theorem states some injectivity properties of f. The surjectivity property ∀x ∈ S ×U,∃µ ∈ Θ ,∃u ∈ U,f (u) = x 0 µ is not true. Similarlywithf, we candefinef−1 : U → P∗(S(5)),thathas analugue properties with f. For example Φ−1 : B5 × B4 → B5 is defined by ∀(ν,δ) ∈ B5 ×B4,Φ−1(ν,δ) = (ν (δ ∪δ )∪ν δ δ ,ν (δ ∪δ ),ν (δ ∪ 0 0 2 4 0 1 3 0 4 1 0 1 δ ),ν (δ ∪δ ),ν (δ ∪δ )). 2 0 2 3 0 3 4 The system f−1 ◦f : U → P∗(S(6)) defined by ∀u ∈ U, (f−1 ◦f)(u) = {(x ,v ,v ,v ,v ,v )|x ∈ f(u),v ∈ f−1(x ,x ,x ,x )} 0 0 1 2 3 4 1 2 3 4 does not fulfill the property ∀u ∈ U, ∀(x ,v ,v ,v ,v ,v ) ∈ (f−1◦f)(u), 0 0 1 2 3 4 u = v ,u = v ,u = v ,u = v 1 1 2 2 3 3 4 4 thus the conclusion of the present study is expressed by the fact that the only ’reversibility’ character of f is given by its injectivity. On the other hand, the model given by (4),...,(8) is reasonable, since it satisfies non-anticipation and time invariance [3] properties. References [1] K.Morita, Asimpleuniversallogicelementandcellularautomatafor reversible computing, Lecture Notes in Computer Science, Springer Berlin/Heidelberg, Machines, Computations and Universality, Vol. 2055, 102-113, (2001). [2] K. Morita, Reversible computing and cellular automata - a survey, Theoretical Computer Science, Vol 395, Issue 1, 101-131, (2008). [3] S. E. Vlad, ”Teoria sistemelor asincrone”, ed. Pamantul, Pitesti, (2007). 6