reversible logic elements with memory - 広島大学 学...

99
Reversible Logic Elements with Memory Kenichi Morita Hiroshima University Design of Reversible and Quantum Circuits Dagstuhl Seminar 11502 Schloss Dagstuhl, Germany, 11-14 December 2011 1

Upload: trinhhanh

Post on 29-May-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Reversible Logic Elementswith Memory

Kenichi Morita

Hiroshima University

Design of Reversible and Quantum CircuitsDagstuhl Seminar 11502

Schloss Dagstuhl, Germany, 11-14 December 2011

1

Page 2: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Contents

1. What are reversible logic elements with

memory (RLEMs)?

2. How can we construct reversible machines

by RLEMs?

3. Can RLEMs be implemented in a reversible

physical system efficiently?

4. Which RLEM is universal, and which is not?

2

Page 3: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

1. What are reversible logic elementswith memory (RLEMs)?

3

Page 4: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

1. What are reversible logic elementswith memory (RLEMs)?

Answer (at first, it is stated very shortly):

• They are very interesting logic elements as well

as reversible logic gates (at least I think so).

4

Page 5: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Design methods of logic circuits/systems

• Traditional method:

Elements for logical operation (logic gates), and

those for memory (flip-flops) are separated.

– Also in the case of reversible logic circuits,

this method has been mainly employed.

• Method of using logic elements with memory:

– In asynchronous logic circuits

E.g., [Keller, 1974], [Buning, Priese, 1980], etc.

– In cellular automata (CAs)

Each cell is a logic element with memory

– In reversible logic circuits

E.g., [Morita, 2001]

5

Page 6: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Two kinds of reversible logic elements

(1) Reversible logic elements without memory

(i.e., reversible logic gates):

• Toffoli gate [Toffoli, 1980]

• Fredkin gate [Fredkin and Toffoli, 1982]

• etc.

(2) Reversible logic elements with memory

(RLEMs):

• Rotary element (RE) [Morita, 2001]

• m-state n-symbol RLEM (in general)

6

Page 7: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Rotary element (RE) [Morita, 2001]

• A typical reversible logic element with memory.

• A 2-state 4-input-line 4-output-line element.

• Conceptually, it has a rotatable bar.

State H State V

� �

��

��

n n′

e

e′

s′ s

w′

w � �

��

��

n n′

e

e′

s′ s

w′

w

• Its operations are very easy to understand.

7

Page 8: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Operations of a rotary element (RE)

• The bar in the box controls an incoming signal.

• Parallel case:t

� �

��

��

t + 1

� �

��

��

• Orthogonal case:t

� �

��

��

t + 1

� �

��

��

��

• Assume signal 1 is given at most one input line.

• An RE is a kind of reversible sequential machine.8

Page 9: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Reversible sequential machine (RSM)

M = (Q,Σ,Γ, δ)

Q : a set of statesΣ : a set of input symbolsΓ : a set of output symbolsδ : Q × Σ → Q × Γ : a move function

presentstate input next

state output

δ(qi, aj) = (qk, bl)

� �t : aj qi

� �t + 1 : qk bl

• M is called an RSM, if δ is one-to-one.9

Page 10: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Rotary element is formalized as an RSM

MRE = ( { , }, {n, e, s, w}, {n′, e′, s′, w′}, δRE)internalstates

inputsymbols

outputsymbols

movefunction

• The move function δRE:Input

Present state n e s w

State H: w′ w′ e′ e′

State V: s′ n′ n′ s′

• From the next state and the output, we can de-

termine the previous state and the input uniquely.

10

Page 11: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

2. How can we construct reversiblemachines by RLEMs?

11

Page 12: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

2. How can we construct reversiblemachines by RLEMs?

Answer (though it is difficult to state in one line):

• They can be constructed very simply.

12

Page 13: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Reversible sequential machine (RSM)

• We can construct any RSM by REs easily.

Example: StateInput q1 q2 q3

a1 q2 b1 q2 b2 q1 b2a2 q3 b2 q1 b1 q3 b1

� � � �

� � � ��

��

q1∗q2 q3

a1

a2

b1

b2

q1a1

q1a2

q2a1

q2a2

q3a1

q3a2

[Morita, 2003]

13

Page 14: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Reversible Turing Machines (RTMs)

• A “backward deterministic” TM.

q1

· · · a b c′ · · · ·

q2

· · · a′ b c · · · · ��

q′

· · · a′ b c′ · · · ·

• We can also construct any RTM by REs simply.

14

Page 15: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

A Simple Example of an RTM: Tparity

Tparity = (Q, S, q0, {qacc},0, δ)

Q = {q0, q1, q2, qacc, qrej} : a set of statesS = {0,1} : a set of tape symbolsδ = {[ q0,0,1, R, q1 ], [ q1,0,1, L, qacc ],

[ q1,1,0, R, q2 ], [ q2,0,1, L, qrej ],[ q2,1,0, R, q1 ] } : a move function

• A unary expression of an integer n is given.

• If n is even, Tparity halts in the final state qacc.

• If n is odd, Tparity halts in the state qrej.

• All the symbols read by Tparity are complemented.

15

Page 16: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

A computing process of Tparity for input “11”

t = 0�

q0

0 1 1 0 0

t = 1�

q1

1 1 1 0 0

t = 2�

q2

1 0 1 0 0

t = 3�

q1

1 0 0 0 0

t = 4�

qacc

1 0 0 1 0

δ = {[ q0,0,1, R, q1 ],[ q1,0,1, L, qacc ],[ q1,1,0, R, q2 ],[ q2,0,1, L, qrej ],[ q2,1,0, R, q1 ] }

16

Page 17: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Realizing RTMs by REs

• A memory cell (i.e., a tape square), and a finite-

state control of an RTM are formalized as RSMs.

• Therefore, they are constructed by REs system-

atically as shown above.

• Here we use additional techniques to reduce the

number of REs in them. [Morita, 2001, 2010]

17

Page 18: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Memory cell realized by REs

• It keeps a tape symbol

s ∈ {0,1}.• It also keeps the informa-

tion h whether the head is

on this cell (h = 1) or not

(h = 0).

• The REs at the positions

h and s are set to if the

value is 0, and if it is 1.

SLc′

SLI′

SLSRc′

SRI

SR

R1′

R0′

W1

W0

h

s

��

� ��

��

� �

��

��

� �

� �

SLcSLISL′

SRcSRI′

SR′

R1

R0

W1′

W0′

18

Page 19: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Finite-state control of Tparity realized by REs

• The three REs in the 4th

row correspond to q0, q1and q2. They read the

symbol currently scanned.

• Then, the four REs of the

3rd row perform writing

and state-change.

• Finally, the REs of the

1st or 2nd rows perform

a head shift.

��

��

� �� �

� �� � �

��

��

��

q0 q1 q2

q00 q10 q11 q20 q21

q1 qacc q2 qrej

SLc

SL′

SRc

SR′

R1

R0

W1′

W0′

Reject

Accept

Begin•

19

Page 20: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

The whole RE circuit that simulates Tparity

��

��

� �� �

� �� � �

��

��

��

��

��

� ��

��

� �

��

��

� �

� �

��

� ��

��

� �

��

��

� �

� �

��

� ��

��

� �

��

��

� �

� �

��

� ��

��

� �

��

��

� �

� �

Reject

Accept

Begin •

• • •

Head 0 1 1 0

• Giving a particle to “Begin,” it starts to compute.

• It is also possible to further realize this circuit in BBM.

20

Page 21: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

3. Can RLEMs be implemented in areversible physical system efficiently?

21

Page 22: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

3. Can RLEMs be implemented in areversible physical system efficiently?

Answer (from my present knowledge):

• “Yes,” by a thought experiment.

• “Unknown,” in a practical level.

22

Page 23: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Billiard ball model (BBM)

• A reversible physical model of computing.

[Fredkin and Toffoli, 1982]

• A switch gate is realized in the BBM.

c

x

��

y1 = cy2 = c·x

y3 = c·x

��

x

c

c

c·x

c·x

c·x

c·x

23

Page 24: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Realization of an RE by BBM

V

H

n n′

e

e′

ss′

w

w′

n1

n0

e1

e0

s1

s0

w1

w0

[Morita, 2008]

24

Page 25: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Parallel Case

t

� �

��

��

t + 1

� �

��

��

25

Page 26: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

26

Page 27: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

27

Page 28: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

28

Page 29: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

29

Page 30: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

30

Page 31: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

31

Page 32: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

32

Page 33: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

33

Page 34: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

34

Page 35: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

35

Page 36: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

36

Page 37: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

37

Page 38: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

38

Page 39: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

39

Page 40: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

40

Page 41: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

41

Page 42: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

42

Page 43: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: V , Input: s)

��n n′

e

e′

ss′

w

w′V

43

Page 44: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Orthogonal Case

t

� �

��

��

t + 1

� �

��

��

44

Page 45: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

H

s1

s0

45

Page 46: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

H

s1

s0

46

Page 47: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

H

s1

s0

47

Page 48: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

H

s1

s0

48

Page 49: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

H

s1

s0

49

Page 50: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

H

s1

s0

50

Page 51: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

51

Page 52: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

52

Page 53: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

53

Page 54: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

54

Page 55: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

55

Page 56: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

56

Page 57: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

57

Page 58: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

58

Page 59: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

59

Page 60: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

60

Page 61: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

61

Page 62: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

62

Page 63: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

63

Page 64: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

64

Page 65: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

65

Page 66: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

66

Page 67: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

67

Page 68: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

68

Page 69: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′

s1

s0

69

Page 70: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

70

Page 71: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

71

Page 72: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

72

Page 73: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

73

Page 74: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

74

Page 75: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

75

Page 76: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

76

Page 77: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

77

Page 78: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

78

Page 79: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

79

Page 80: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

80

Page 81: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

81

Page 82: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

82

Page 83: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Movements of Balls (State: H, Input: s)

�n n′

e

e′

ss′

w

w′V

s1

s0

83

Page 84: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

BBM realization of an RE (orthogonal case)

�n n′

e

e′

ss′

w

w′

��

��

� �

���

0,1

2

3

4

5

6,7

0

1

2

3

4

5

6 7

84

Page 85: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

4. Which RLEM is universal, andwhich is not?

85

Page 86: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

4. Which RLEM is universal, andwhich is not?

Answer:

• There are infinitely many 2-state RLEMs, and

“all” of them except only 4 are universal.

86

Page 87: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

RE is a 2-state 4-symbol RLEM

MRE = ( { , }, {n, e, s, w}, {n′, e′, s′, w′}, δRE)internalstates

inputsymbols

outputsymbols

movefunction

The move function δRE:Input

Present state n e s w

State H: w′ w′ e′ e′

State V: s′ n′ n′ s′

87

Page 88: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

We represent a 2-state RLEM graphically

Example: RLEM 4-289 (equivalent to an RE)

InputPresent state a b c d

State q0 q0 w q0 x q1 w q1 x

State q1 q0 y q0 z q1 z q1 y

a

bc

d ����

����

State q0

w

xy

z

a

bc

d ����

����

State q1

w

xy

z

Solid edge: the state changes to anotherDotted edge: the state remains unchanged

88

Page 89: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

2-state k-symbol RLEMs (k-RLEMs)

1. Total numbers of RLEMs:

• 2-state 2-symbol RLEMs: 4! = 24

• 2-state 3-symbol RLEMs: 6! = 720

• 2-state 4-symbol RLEMs: 8! = 40320

ID numbers are given to RLEMs:

e.g., No.2-17, No.3-453, etc.

2. Equivalence classes under the permutation of

states and I/O symbols:

• 2-state 2-symbol RLEMs: 8 classes

• 2-state 3-symbol RLEMs: 24 classes

• 2-state 4-symbol RLEMs: 82 classes

89

Page 90: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

8 representatives of 2-RLEMs

��

��

��

��

2-0 (eq. to wires)

��

��

��

��

2-1 (eq. to wires)

��

��

�����

�����

2-2

��

��

�����

��

2-3

��

��

��

�����

2-4

��

��

��

��

2-5 (eq. to wires)

��

��

��

��

2-16 (eq. to wires)

��

��

��

��������

2-17

90

Page 91: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

24 Representatives of 3-RLEMs

���

���

���

���

3-0 (eq. to wires)

���

���

���

���

3-1 (eq. to wires)

���

���

���

���

3-3 (eq. to wires)

���

���

���

���

��

3-6 (eq. to 2-2)

���

���

���

���

��

3-7

���

���

���

���

3-9

���

���

���

���

���

3-10

���

���

���

���

3-11 (eq. to 2-3)

���

���

���

���

��

3-18

���

���

���

���

��

3-19 (eq. to 2-4)

���

���

���

���

3-21 (eq. to wires)

���

���

���

���

3-23

���

���

���

������

���������

3-60

���

���

���

������

������

3-61

���

���

���

������

���

��

����

3-63

���

���

���

������

���

3-64

���

���

���

������

���

������

3-65

���

���

���

���������

3-90

���

���

���

������

3-91

���

���

���

���

3-94 (eq. to wires)

���

���

���

���

������

3-95 (eq. to 2-17)

���

���

���

���

3-450 (eq. to wires)

���

���

���

���

������

3-451

���

���

���

���������

3-453

91

Page 92: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

82 Representatives of 4-RLEMs

����

����

����

����

4-0 (eq. to wires)

����

����

����

����

4-1 (eq. to wires)

����

����

����

����

4-3 (eq. to wires)

����

����

����

����

4-7 (eq. to wires)

����

����

����

����

4-9 (eq. to wires)

����

����

�����

����

����

�����

4-24 (eq. to 2-2)

����

����

�����

����

����

�����

4-25 (eq. to 3-7)

����

����

�����

����

����

�����

4-26

����

����

�����

����

����

�����

4-27

����

����

�����

����

����

��

4-31

����

����

�����

����

����

4-33

����

����

�����

����

����

���

4-34

����

����

�����

����

����

4-35 (eq. to 3-9)

����

����

�����

����

����

��

4-42

����

����

�����

����

����

��

4-43 (eq. to 3-10)

����

����

�����

����

����

4-45 (eq. to 2-3)

����

����

�����

����

����

4-47

����

����

����

����

�����

4-96

����

����

����

����

�����

4-97 (eq. to 3-18)

����

����

����

����

�����

4-99 (eq. to 2-4)

����

����

����

����

�����

4-101

����

����

����

����

4-105 (eq. to wires)

����

����

����

����

4-107 (eq. to 3-27)

����

����

����

����

4-113

����

����

����

����

��

���

4-288

����

����

����

����

��

���

4-289

����

����

����

����

��

����

4-290

����

����

����

����

��

4-291

����

����

����

����

��

4-293

����

����

����

����

4-304

����

����

����

����

������

4-305

����

����

�������

����

��

���

4-312

����

����

�������

����

��

���

4-313

����

����

�������

����

��

����

4-314 (eq. to 3-60)

����

����

�������

����

��

4-315 (eq. to 3-61)

����

����

�������

����

��

����

4-316

����

����

�������

����

��

4-317

����

����

�������

����

�����

���

4-319

����

����

�������

����

��������

4-321 (eq. to 3-63)

����

����

�������

����

�����

4-322

����

����

�������

����

��������

4-323

����

����

�������

����

4-328

����

����

�������

����

������

4-329

����

����

�������

����

������

4-330

����

����

�������

����

���

4-331

����

����

�������

����

��

����

4-333

����

����

�������

����

4-334 (eq. to 3-64)

����

����

�������

����

������

4-335 (eq. to 3-65)

����

����

����

����

��

���

4-576

����

����

����

����

��

���

4-577

����

����

����

����

��

����

4-578

����

����

����

����

��

4-579

����

����

����

����

��

����

4-580 (eq. to 3-90)

����

����

����

����

��

4-581 (eq. to 3-91)

����

����

����

����

4-592 (eq. to wires)

����

����

����

����

������

4-593 (eq. to 2-17)

����

����

����

����

4-598

����

����

����

����

������

4-599

����

����

���

���

�������

�������������

4-2592

����

����

���

���

�������

����������

4-2593

����

����

���

���

�������

�������

��

4-2594

����

����

���

���

�������

�������

��

����

4-2595

����

����

���

���

�������

�������

4-2596

����

����

���

���

�������

�������

������

4-2597

����

����

���

���

�������

����

�����

���

���

4-2608

����

����

���

���

�������

����

�����

4-2609

����

����

���

���

�������

����

4-2610

����

����

���

���

�������

����

������

4-2611

����

����

���

���

�������

����

��

����

���

4-2614

����

����

���

���

�������

����

��

4-2615

����

����

����

�������������

4-3456

����

����

����

����������

4-3457

����

����

����

�������

4-3460

����

����

����

�������

������

4-3461

����

����

����

����

4-3474 (eq. to wires)

����

����

����

����

������

4-3475 (eq. to 3-451)

����

����

����

����

������

4-3477 (eq. to 3-453)

����

����

����

����

4-23616 (eq. to wires)

����

����

����

����

������

4-23617

����

����

����

����

������

4-23619

����

����

����

����������

������

4-23623

����

����

����

��������������

����

4-23625

92

Page 93: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Numbers of representatives of degenerate

and non-degenerate 2-, 3-, and 4-RLEMs

Degenerate k-RLEMsNon-

degeneratek Total Type (i) Type (ii) Type (iii) k-RLEMs2 8 2 2 0 43 24 3 3 4 144 82 5 4 18 55

93

Page 94: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Universality of an RE

From the previous discussion, we can see that an

RE is universal in the following sense.

• Any reversible sequential machine can be real-

ized by a garbage-less circuit made only of REs.

• Any reversible Turing machine can be realized

by a garbage-less infinite circuit made of REs.

On the other hand, there are many kinds of RLEMs,

and thus we have a question.

• Which RLEM is universal and which is not?

94

Page 95: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Non-degenerate k-RLEMs are ALL universal

if k > 2

Lemma 1 [Lee et al., 2008] An RE is simulated by

a circuit composed of RLEMs 2-3 and 2-4.

Lemma 2 RLEMs 2-3 and 2-4 can be constructed

by any one of 14 non-degenerate 3-RLEMs.

Lemma 3 Any non-degenerate k-RLEM can sim-

ulate a non-degenerate (k − 1)-RLEM, if k > 2.

The next theorem is derived from Lemmas 1–3.

Theorem [Morita et al., 2010] Every non-degenerate

k-RLEM is universal, if k > 2.

95

Page 96: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Hierarchy of 2-state non-degenerate RLEMs

Every 2-state k-symbol

RLEM k-n (k > 2)

RLEM2-17

RLEM2-3

RLEM2-4

RLEM2-2

� ��

universal

non-universal

[Mukai, Morita, (in preparation)]

• A → B (A �→ B, respectively) represents that

A can (cannot) simulate B.• Any two combination of {2-3, 2-4, 2-17} is uni-

versal. [Lee, et al., 2008], [Mukai, Morita, (in preparation)]

96

Page 97: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

Concluding Remarks

Q1. What are RLEMs?

A: They look interesting objects to study.

Q2. How can we construct reversible machines by

RLEMs?

A: There is an easy implementation method.

Q3. Can RLEMs be implemented in a reversible phys-

ical system efficiently?

A: Ideally yes, but practically unknown.

Q4. Which RLEM is universal, and which is not?

A: There are several simple and universal RLEMs.

97

Page 98: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

References

[Bennett, 1973 ] Bennett, C.H., Logical reversibility of computation,IBM J. Res. Dev., 17, 525–532 (1973).

[Buning, Priese, 1980 ] Buning, H.K., Priese, L., Universal asynchronousiterative arrays of Mealy automata, Acta Informatica, 13, 269–285(1980).

[Fredkin, Toffoli, 1982 ] Fredkin, E., Toffoli, T., Conservative logic, Int.J. Theoret. Phys., 21, 219–253 (1982).

[Keller, 1974 ] Keller, R.M., Towards a theory of universal speed-inde-pendent models, IEEE Trans. Computers, C-23, 21–33 (1974).

[Lee et al., 2008 ] Lee, J., Peper, F., Adachi S., Morita, K., An asyn-chronous cellular automaton implementing 2-state 2-input 2-outputreversed-twin reversible elements, Proc. ACRI 2008, LNCS 5191,Springer-Verlag, 67–76 (2008).

[Morita, 2001 ] Morita, K., A simple reversible logic element and cellu-lar automata for reversible computing, Proc. 3rd Int. Conf. on Ma-chines, Computations, and Universality, LNCS 2055, Springer-Verlag,102–113 (2001).

[Morita, 2003 ] Morita, K.: A new universal logic element for reversiblecomputing, Grammars and Automata for String Processing (C. Martin-Vide, V. Mitrana, eds.), Taylor & Francis, London, 285–294 (2003).

98

Page 99: Reversible Logic Elements with Memory - 広島大学 学 …ir.lib.hiroshima-u.ac.jp/files/public/3/32376/...Reversible Logic Elements with Memory Kenichi Morita Hiroshima University

[Morita et al., 2005 ] Morita, K., Ogiro, T., Tanaka, K., Kato, H.,Classification and universality of reversible logic elements with one-bit memory, Proc. 4th Int. Conf. on Machines, Computations, andUniversality, LNCS 3354, Springer-Verlag, 245–256 (2005).

[Morita, 2008 ] Morita, K., Reversible computing and cellular automata— A survey, Theoretical Computer Science, 395, 101–131 (2008).(also available at: http://ir.lib.hiroshima-u.ac.jp/00025576)

[Morita, 2010 ] Morita, K., Constructing a reversible Turing machine bya rotary element, a reversible logic element with memory,Hiroshima University Institutional Repository,http://ir.lib.hiroshima-u.ac.jp/00029224 (2010).

[Morita et al., 2010 ] Morita, K., Ogiro, T., Alhazov, A., Tanizawa, T.,Non-degenerate 2-state reversible logic elements with three or moresymbols are all universal, Proc. RC 2010 (2010).(Final version: J. Multiple-Valued Logic and Soft Computing, 18,37–54 (2012)).

[Toffoli, 1980 ] Toffoli, T., Reversible computing, Automata, Languagesand Programming LNCS 85, Springer-Verlag, 632–644 (1980).

99