80_Toffoli

Embed Size (px)

Citation preview

  • 8/12/2019 80_Toffoli

    1/13

  • 8/12/2019 80_Toffoli

    2/13

    6

    A n i m p o r t a n t a d v a n t a g e o f o u r a p p ro a c h is t h a t a n y o p e r a t io n s ( s uc h a s t h e c l e a r i n g

    o f a r e g i s t e r ) t h a t i n c o n v e n t i o n a l lo gic l ea d to t h e d e s t r u c t i o n o f m a c r o s c o p i c i n f o r m a -

    t i o n , a n d t h u s e n t a i l e n e r g y d i s s i p a t i o n , h e r e c a n b e p l a n n e d a t t h e w h o l e - c i r c u i t l e v e l

    r a t h e r t h a n a t t h e g a t e le ve l, a n d m o s t o f t h e ti m e c a n b e re p la c e d b y a n i n f o r m a t i o n -

    los s t e s s va r i an t . As a consequence , i t appears possible to des ign circui ts w h o s e i n t e r n a l

    p o w e r diss ipat ion under i dea l physical circumstances i s z er o. T h e p o w e r d i s s i p a t i o n t h a t

    w o u l d a r i s e a t t h e i n t e r f a c e b e t w e en su c h c i rc u i ts a n d t h e o u t s i d e w o r ld w o u l d b e a t m o s t

    p r o p o r t i o n a l t o t h e n u m b e r of i n p u t / o u t p u t l in es, r a th e r t h a n t o t h e n u m b e r o f l o g ic g a t e s .

    2 T e r m i n o lo g y a n d

    n o t a t i o n

    A f u n c t io n 4 : X - ~ Y is finite i f X and Y are f in i te se ts . A f i n i t e a u to ma to n is a

    d y n a m i c a l s y s t e m c h a r a c t e r iz e d b y a t r a n s i ti o n f u n c ti o n o f t h e f o r m r : X X Q --~ Q X Y

    w h e r e r i s f i n it e . W i t h o u t lo ss o f g e n e r a li t y , o n e m a y a ss u m e t h a t s u c h s e t s a s X , Y , a n d

    Q a b o v e b e e x p l i c i t l y g i v en a s i n d e xe d C a r t e s ia n p r o d u c t s o f s e ts . W e s h a l l o c c a s i o n a l l y

    c a l l l ines t h e i n d i v i d u a l v a ri a b l e s as s o ci a te d w i t h t h e i n d i v i d u a l f a c t o r s o f s u c h p r o d u c t s .

    I n w h a t f o l l o w s , w e s h a l l a s s u m e o n c e a n d f o r all t h a t a l l f a ct o rs o f t h e a f o r e m e n t i o n e d

    C a r t e s i a n p r o d u c t s b e i d e n t i c a l c o pi es o f t h e B o o le a n s e t B ---~ ( 0 , 1 ) . A f i n i t e f u n c t i o n i s

    o f o r de r n i f i t ha s n inp u t l ine s.

    T h e p r o c e s s o f g e n e r a t in g m u l t ip l e c op ie s o f a g iv e n s i g n a l m u s t b e t r e a t e d w i t h

    p a r t i c u l a r c a r e w h e n r e v e r s i b i li t y i s a n ' i ss u e ( m o r eo v e r, f ro m a p h y s i c a l v i e w p o i n t t h i s

    p r o c e s s i s f a r f r o m t r i v i a l ). F o r t h i s r ea s o n, in a ll t h a t f ollo w s w e sh a l l r e s t r i c t t h e m e a n i n g

    o f t h e t e r m f u n c t i o n c o m p o s it io n to one-to-one c o m p o s i t i o n , w h e r e a n y s u b s t i t u t i o n o f

    o u t p u t v a r i a b l e s fo r i n p u t v a r ia b l e s is o n e -t o -o n e . T h u s , a n y f a n - o u t n o d e i n a g i v e n

    f u n c t i o n - c o m p o s i t i o n s c h e m e w i l l h a v e t o b e t r e a t e d a s a n e x p l i c i t o c c u r r e n c e o f a f a n -

    o u t f u n c t i o n o f t h e f o r m ( x ) H ( x , . . . , x ). In t u i t iv e l y , t h e r e sp o n s i b i l i ty f o r p r o v i d i n g f a n -

    o u t i s s h i f t e d f r o m t h e c o m p o s i t i o n r u l e s t o t h e c o m p u t i n g p r i m i t i v e s .

    A b s t r a c t c o m p u t e r s ( s u ch a s f in it e a u t o m a t a a n d T u r i n g m a c h i ne s ) a r e e s s e n t i a l l y

    f u n c t i o n - c o m p o s i t i o n s c h e m e s . I t i s c u s t o m a r y t o e x p J ' e s s a f u n c t i o n - c o m p o s i t i o n s c h e m e

    i n g r a p h i c a l f o r m a s a causal i ty ne twork . Th i s i s ba s ica l ly an acyc l i c d i re c ted g ra ph in

    w h i c h n o d e s c o r r e s p o n d t o f u n ct io n s a n d a rc s t o v a ri ab l es . B y c o n s t r u c t i o n , c a u s a l i t y

    n e t w o r k s a r e l o o p - fr e e , i .e ., t h e y c o n t a i n n o c y cl ic p a t h s . A combina t iona l n e t w o r k i s

    a c a u s a l i t y n e t w o r k t h a t c o n t a in s n o in f in it e p a th s . N o t e t h a t a f i n it e c a u s a l i t y n e t w o r k

    i s a l w a y s a c o m b i n a t i o n a l o n e . W i t h c e r ta i n a d d i t i o n a l c o n v e n t i o n s ( s u c h a s t h e u s e o f

    s p e c i a l m a r k e r s c a l l e d delay e le m e n ts ), c a u s a l i ty n e t w o r k s h a v i n g a p a r t i c u l a r i t e r a t i v e

    s t r u c t u r e c a n b e r e p r es e n te d m o r e c o m p a c tl y a s sequential n e t w o r k s .

    A c a u s a l i t y n e t w o r k i s r e ve r si b le if i t is o b t a i n e d b y c o m p o s i t io n o f i n v e r t i b l e p r i m i -

    t i v e s . N o t e t h a t a r e v e r si b le c o m b i n a t i o n a l n e t w o rk a |w a y s d e f in e s a n i n v e r t i b l e f u n c t i o n .

    T h u s , i n t h e ca s e o f c o m b i n a t i o n a l n e t w o rk s t h e s t r u c t u r a l a s p e c t o f r e v e r s i b i l i t y a n d

    th e fun c t i on a l a spe c t o f inve r t ib i l i ty coinc ide . A s equen t i a l ne tw ork is revers ib le i f

    i t s co mb in a t i o n a l p a r t ( i.e ., t h e c o m b i n a ti o n a l n e t w o r k o b t a i n e d b y d e l e t i n g t h e d e l a y

    e l e m e n t s a n d t h u s b r e a k i n g t h e c o r r es p o n d in g a rc s) i s r e v er si b le .

    W e s h a l l a s su m e f a m i l ia r i ty w i t h t h e c o n ce p t o f r e a li z a ti o n o f fi n it e f u n c t i o n s a n d

    a u t o m a t a b y m e a n s o f, r e sp e ct iv e ly , c o m b i n at io n a l a n d s eq u e n ti a l n e t w o r k s . I n w h a t

    fo l lows , a r ea l i z a t ion wi l l a lwa ys mean a componentwise o n e ; t h a t i s , t o e a c h i n p u t ( o r

    o u t p u t ) l i n e o f a f i n it e f u n c t i o n t h e r e will c o rr e sp o n d a n i n p u t ( o r o u t p u t ) l i n e i n t h e

    c o m b i n a t i o n a l n e t w o r k t h a t r e al iz es i t, an d s im i l ar ly f o r t h e r e a li z a ti o n o f a u t o m a t a b y

    s e q u e n t i a l n e t w o r k s .

  • 8/12/2019 80_Toffoli

    3/13

    6 4

    3

    I n t r o d u c t o r y c o n c e p t s

    A s e x p l a i n e d i n S e c t i o n 1 , o u r o v e r a l l g o a l i s t o d e v e l o p a n e x p l i c i t r e a l i z a t i o n o f

    c o m p u t i n g p r o c e s s e s w i t h i n t h e c o n t e x t o f r e ve rs ib l e s y s t e m s . A s a n i n t r o d u c t i o n , l e t u s

    co ns id er tw o s im ple f un c t ion s , nam ely , VAN-OUT (3 .1a) and x o a (3 .1b) :

    2:1 X2 y

    x Y192 0 0 0

    ( a) 0 ~ O 0 ( b) 0 1 ~ 1

    1 1 1 0 1

    I 1 0 ( 3 . 1 )

    F A N O U T

    Yl ---'~X

    X R

    X 2

    N e it h er of the se fun c t io ns is inver t ib le . ( Indeed, V^N-OVT is no t s u r j e c t i v e , s i n c e , f o r i n -

    s t a n c e , t h e o u t p u t ( 0 ,1 ) c a n n o t b e o b t ai n ed f or a n y i n p u t va lu e ; a n d x o a i s n o t i n j e c t i v e ,

    s i n c e , f o r i n s t a n c e , t h e o u t p u t 0 c a n b e o b t a i n e d f ro m t w o d i s t i n c t i n p u t v a l u e s , ( 0 , 0 ) a n d

    ( 1 , 1 ) ) . Y e t , b o t h f u n c t i o n s a d m i t o f a n i n v e rt ib l e r e a l iz a t io n .

    T o s e e t h i s , c o n s i d e r t h e i n v e r t i b l e f u n ct io n x o a /v ^ N . o u v d e f in e d b y t h e t a b l e

    O O

    O l ~

    1 1

    1

    1 0 '

    1 1 1

    3 . 2 )

    w hic h we h av e cop ied ove r w i th d i f fe ren t head ings in (3.3a ), (3.3h ), an d (3 .6b ). T he n , VAN-

    O UT c a n b e r e a l i z e d b y m e a n s o f t h is f u nc t io n * a s i n (3 .3 a) ( w h e r e w e h a v e o u t l i n e d t h e

    r e l e v a n t t a b l e e n t r ie s ), b y a ss ig n in g a v a lu e o f 0 to t h e a u x i l i a r y in p u t c o m p o n e n t c ; a n d

    x o a c a n b e r e a li z e d b y m e a n s o f t h e s am e f u nc t io n as in ( 3.3 b), b y s i m p l y d i s r e g a r d i n g

    t h e a u x i l i a r y o u t p u t c o m p o n e n t 9 . In m o r e t ec h n ic a l t e rm s , (3 .1 a) i s o b t a i n e d f r o m ( 3 . 3 a )

    b y c o m p o n e n t w i s e r e s t r i c t i o n , and (3 .1b) f rom (3 .3b) by p r o j e c t i o n .

    c x Yl 92 xl x2 y g

    o~ ~ ] ~ ~o

    (a ) o m ~ m ~ (b) ~ ] fi 3 [ ] l

    1 0 i 0 [ ] [ ] ~ ~ 0

    o i [ i ] [i ] [ ~

    c - - = 0

    92 = x ~ y -= xl ~ x~

    (3 .3)

    * O r d i n a r i l y , o n e sp e a k s o f a r e al iz a ti o n b y a n e tw o r k . N o t e , t h o u g h , t h a t a f i n it e f u n c t i o n

    b y i t s e l f c o n s t i t u t e s a t r i v ia l c a se o f c o m b i n a t i o n a l n e t w o r k .

  • 8/12/2019 80_Toffoli

    4/13

    6 3 5

    In w h a t fo l lows , we sha l l co l l ec t ively ca ll the s ou rc e t h e a u x il i ar y i n p u t c o m p o n e n t s

    th a t ha ve been used in a rea l i z a tion , sUch a s com ponen t c in (3 .3a) , a nd the sink t h e

    a u x i l i a r y o u t p u t c o m p o n e n t s s u ch a s g in (3 .3 b). T h e r e m a i n in g i n p u t c o m p o n e n t s w i l l

    be co l l ec t ive ly ~ a lled

    the argument

    a n d t h e r e m a in i ng o u t p u t c o m p o n e n t s ,

    the

    r e s u l t .

    I n g e n e r a l , b o t h s o u r c e a n d s i n k lin es w ill h a v e to b e i n t ro d u c e d i n o r d e r t o c o n s t r u c t

    a n i n v e r t i b l e r e a l i z a t io n o f a g iv e n f u n c t i o n .

    Xl ~ '2 Y

    O 0 0

    z y

    ( a ) 0 _ ~ 0 ( b ) 0 _ ,

    1

    1 0

    1 / 1

    3 . 4 )

    A N D N O T

    X2

    F o r e x a m p l e , f ro m t h e

    invertible

    func t ion AND/NAND def ined by th e tab le

    1 1

    1 1

    0 1 1 ~ 1 1 1

    1 0 0 1 0 0

    1 0 1 1 0 1

    1 1

    1 1 0

    1 1 1 1 1

    ( 3 . s )

    t h e ANn fun c t io n (3 .4a) c an be rea l iz ed a s in (3 .6a) w i th one source l ine an d two s ink l ine s .

    ~ )

    C X l X 2 y gl g2

    o ~ [ ~ [ ~ o o

    o ~ m [ ~ o

    o m ~ ~ ] o

    o m m - - . [ i ] 1 1

    1 0 0 1 0 0

    1 0 I 1 0 1

    1 1 0 1 1 0

    1 1 1 0 1 1

    x c y c~

    O O

    (b)

    1 o - 1 o

    c = O c = l

    i

    x2

    i

    ~ ( = 6

    ( 3 . 6 )

    O b s e r v e t h a t i n o r d e r t o o b t a i n t h e d e si re d r e su l t t h e s o u rc e l in e s m u s t b e f e d w i t h

    s p e c i f i e d c o n s t a n t v a l u e s , i .e ., w i t h v a l u e s t h a t d o n o t d e p e n d o n t h e a r g u m e n t . A s f o r

  • 8/12/2019 80_Toffoli

    5/13

    636

    t h e s i n k l in e s, s o m e m a y y ie ld v a lu e s t h a t d o d e pe n d o n t h e a r g u m e n t - - a s i n ( 3 . 6 a ) - -

    a n d t h u s c a n n o t b e u s e d a s in p u t c o n s t a nt s f o r a n ew c o m p u t a t i o n ; t h e s e w i ll b e c a l l e d

    g a r b a g e l i n e s . O n t h e o t h e r h an d~ s o m e s i n k l in e s m a y r e t u r n c o n s t a n t v a l u e s ; i n d e e d ,

    t h i s h a p p e n s w h e n e v e r t h e f u n c ti o n a l r e la ti o ns h ip b et w ee n a r g u m e n t a n d r e s u l t i s i t s e l f

    a n i n v e r t i b l e o n e . T o g i v e a t r i v i a l e x a m p l e , s u p p o se t h a t t h e N OT f u n c t i o n ( 3 . 4 b ), w h i c h

    i s i n v e r t i b l e , w e r e n o t a v a i l a b l e as a p r i m i ti v e . I n t h i s c a s e o n e c o u l d s t i l l r e a l i z e i t s t a r t i n g

    f r om an o t he r inve r t ib l e func t io n , e .g . , f rom the XOa/FAN-OUT fun c t ion a s in (3 .6b ) ; n o te

    t h a t h e r e t h e s i n k , c , r e t u r n s i n a n y c a se t h e v a l u e p r e s e n t a t t h e s o u r c e , c . I n g e n e r a l , i f

    t h e r e e x i s t s b e t w e e n a s e t o f s o u r ce l in e s a n d a s e t o f s i n k li n e s a n i n v e r t i b l e f u n c t i o n a l

    r e l a t i o n s h i p t h a t i s i n d e p e n d e n t o f th e v a lu e o f a ll o t h e r i n p u t l in e s, t h e n t h i s p a i r o f

    se t s w i l l be ca l l ed ( fo r r ea sons tha t w i l l be made c l ea r in Sec t ion 5 ) a t e m p o r a r y - s t o r a g e

    c h a n n e l

    U s i n g t h e t e r m i n o l o g y ju s t e s t ab li sh e d, w e s h a ll s a y t h a t t h e a b o v e r e a l i z a t i o n o f

    t h e F ^N -O U T f u n c t i o n b y m e a n s o f a n i n v e r ti b le co m b i n a t i o n a l f u n c t i o n i s a r e a l i z a t i o n

    w i t h c o n s t a n t s , t h a t o f t h e x o a f u n c t i o n , wi th g a r b a g e , t h a t o f t h e A N D f u n c t i o n , w i t h

    c o n s t a n t s a n d g a r b a g e , a n d t h a t o f t h e NOT f u n ct io n , w i t h t e m p o r a r y s t o r a g e ( b r t h e s a k e

    o f n o m e n c l a t u r e , t h e s o u r ce li ne s t h a t a r e p a rt o f a t e m p o r a r y - s t o r a g e c h a n n e l w i ll n o t b e

    c o u n t e d a s l i n e s o f c o n s t a n t s ) . I n re f er r in g to a r e a li z a ti o n , f e a t u r e s t h a t a r e n o t e x p l i c i t l y

    m e n t i o n e d w i ll b e a ss u m e d n o t to h av e b e en u s ed ; t h u s , a r ea l iz a t io n w i t h t e m p o r a r y

    s t o r a g e i s o n e

    w i t h o u t

    c o n s t a n t s o r g a rb a g e . A r e a l iz a t io n t h a t d o e s n o t r e q u i r e a n y

    s o u r c e o r s i n k l i n es w i ll b e c a ll e d a n

    isomorphic

    rea l iza t ion .

    4 T h e f u n d a m e n t a l t h eo r e m

    I n t h e l i g h t o f t h e p a r t i c u l a r e x a m p l e s d i sc u s se d in t h e p r e v i o u s s e c t i o n , t h i s s e c t i o n

    e s t a b l i s h e s a g e n e r a l m e t h o d f o r r e al iz in g a n a r b i t r a r y f i n it e f u n c t i o n ~b b y m e a n s o f a n

    i n ve r t i b l e

    f i n i t e f u n c t i o n f .

    I n g e n e r a l , g i v e n a n y f i n i t e f u n c t i o n o n e o b t a i n s a n e w o n e b y a s s i g n i n g s p e c i f i e d

    v a l u e s t o c e r t a i n d i s t i n g u i s h e d i n p u t l in e s (s ou rc e) a n d d i s r e g a r d in g c e r t a i n d i s t i n g u i s h e d

    o u t p u t l i n e s (s i n k ). A c c o r d i n g t o t h e fo llo w in g t h e o r em , a n y f i n it e f u n c t i o n c a n b e r e a l i z e d

    i n t h i s w a y s t a r t i n g f r o m a s u i t a b l e

    invertible

    one .

    THEOREM 4.1 F o r

    ever y

    f in i te funcf io n ~b: Bin--* B the re e xis ts an

    i n ve r t i b l e

    f i n i t e

    f u n c t i o n

    f : B r B ~ - - + B X B r + m - , w / th r ~

    n such tha t

    : o , . . . , o , . . . , : ,: ,. ,, )

    i , . . . , , .

    4 . 1 )

    T h u s , w h a t e v e r c a n b e c o m p u t e d b y a n a r b i t r a ry f in it e f u n c t io n a c co r d i n g t o t h e s c h e m a

    o f F i g u r e 4 . 2 a c a n a l s o b e c o m p u t e d b y a n

    inver~ible

    f in i te f u n c t i o n a c c o r d i n g t o t h e

    s c h e m a o f F i g u r e 4 .2 b.

  • 8/12/2019 80_Toffoli

    6/13

  • 8/12/2019 80_Toffoli

    7/13

    6 8

    s o u r c e a n d s i n k l i n e s m i g h t p o i n t t h e w a y t o a p h y s i c a l i m p l e m e n t a t i o n t h a t d i s s i p a t e s

    l e ss e n e r g y .

    O u r p l a n t o a c h i e v e a l es s w a s t e f u l r e a li z at io n w ill b e b a s e d o n t h e f o l l o w i n g c o n c e p t .

    W h i l e i t i s t r u e t h a t e a c h g a r b a g e s ig n a l is r a n d o m , i n t h e s e n s e t h a t i t i s n o t p r e d i c t a b l e

    w i t h o u t k n o w i n g t h e v a l u e o f th e a r g um e n t , y e t i t w ill b e c o r r el a te d w i t h o t h e r s i g n a l s

    i n t h e n e t w o r k . T a k i n g a d v a n t a g e o f t h is , o n e c a n a u g m e n t t h e n e tw o r k in s u c h a w a y a s

    t o m a k e c o r r e l a te d s i g n al s i n te r fe r e w i t h o n e a n o t h e r an d p r o d u c e a n u m b e r o f c o n s t a n t

    s i g n a l s i n s t e a d o f g a rb a g e . T h e s e c o n s t a n t s c a n b e u se d a s s o u r ce s i g n a l s i n o t h e r p a r t s o f

    t h e n e t w o r k . I n t h i s w a y , t h e o v e ra ll n u m b e r o f b o t h s o u r ce a n d s i n k l i n e s c a n b e r e d u c e d .

    I n t h e r e m a i n d e r o f t h i s se c ti o n w e s h a ll s h o w h o w , i n t h e a b s t r a c t c o n t e x t o f r e v e r s i b l e

    c o m p u t i n g , d e s t r u c t i v e i n te r fe r en c e o f c o rr el at ed s i gn a ls ca n b e a c h i e v e d i n a s y s t e m a t i c

    w a y . F i r s t , w e s h M l p r o v e t h a t a n y i n v e r ti b le f i ni te f u n c t i o n c a n b e r e a li z e d

    i s o m o r p h i c a l l y

    f r o m c e r t a i n g e n e r a l i z e d ^ ND /N ^N D p r im i t iv e s . T h e n , w e s h a l l p r o v e t h a t a n y o f t h e s e

    p r i m i t i v e s c a n b e r e a li ze d f r o m t h e ^ N n/N A N n e le m e n t p os s ib l y w i t h t e m p o r a r y s t o r a g e

    b u t w i t h n o g a r ba g e .

    D E FIN IT IO N 5 .1 C o n s i d e r th e s e t B = { 0 ,1 } w i t h t h e u s u a l s t r u c t u r e o f B o o l e a n

    r i n g , w i t h ( ~ ( e x c lu s i v e -o n ) d e n o t i n g t h e a d d i t io n o p e r a t o r , a n d j u x t a p o s i t i o n { ^N o )

    t h e m u l t i p l i c a t i o n o p e ra t o r . F o r a n y n > 0 , t h e general i zed A ND /N AN n f u n c t i o n o f o r d e r

    n , de no te d b y 0 ('1) : B ~ B , is de f ined by

    r I i

    c - ) : i .

    5 .U

    \ x n / z , (~ x lx2 ' x , - I

    W e h a v e a l r e a d y e n c o u n t e re d 0 0) u n d e r t h e n a m e o f t h e N oT e le m e n t , 0 ( 2 ) u n d e r t h e

    n a m e o f th e XOnlFAN-OUTe l e m e n t , a n d 0 3) u n d e r t h e n a m e o f t h e A ND /N ^N D e l e m e n t . T h e

    ge ne ra l i z ed AND/NAND func t io ns a re g raph ica l ly r ep re sen ted a s in F ig u r e 5 .1d .

    ( a ) ( b ) ( c ) ( d ) r - - = - - , .

    I I t I

    I I I I t M

    I

    L . . . . . . . . J . c . . . . . . . a

    NOT xon./PAN OUT ANDINAND

    g e n e r l i z e dN D / N A N D

    F I G . . 5 . 1 G r a p h i c re p r e s e n t a i o n f t h e e n e r M i z e d N D / N A N D f un c t i o n s . W ^ R N I N C :

    T h i s r e p r e s e n t a t i o n i s o f fe r ed o n l y a s a m n e m o n i c a i d in r ec a ll in g a f u n c t i o n ' s t r u t h

    t a b l e , a n d i s n o t m e a n t t o i m p l y a n y i n te r n al s t ru c t u r e f or t h e f u n c t i o n , o r s u g g e s t

    a n y p a r t i c u l a r i m p l e m e n t a t i o n m e c h a n i sm . (a ) 0 (0 , w h ic h c o i n c i d e s w i t h t h e N OT

    ele m en t; (b) 0 (2) , wh ich co incides w i th the

    x o n / r ^ N . o u v

    element; (c) 0 3),

    w h i c h c o i n -

    c i d e 8 With th e AND/NAND elem ent ; an d, in genera l , (d)

    OCn ,

    h e g e n e r a l i z e d AND/NAND

    f u n c t i o n o f o r d e r n .

    T h e b il at er a l s y m m e t r y

    o f

    t h e s e s y m b o l s r e c a l l s t h e

    f a c t ~ h a t

    e a c h

    o f

    t h e c o r r e s p o n d i n g

    f u n c t i o n s

    coincides with i ts inverse.

  • 8/12/2019 80_Toffoli

    8/13

    6 9

    THEOREM 5.1 A n y inve rfible f inite function o f o r d e r n c a n b e o b t a i n e d b y c o m p o s i t i o n

    o f

    genera l i zed

    ANn/N^Nn fun c t ions o f o rde r < n .

    R e m a r k . N o t e t h a t th e re a l iz a t io n r e fe r re d t o b y T h e o r e m 5 .1 i s a n i s o mo r p h i c o n e

    ( u n l i k e t h a t o f S e c t i o n 4 , w h i c h . m a k e s u s e o f so u r ce a n d s i n k l in e s) .

    T H g o n E M 5 . 2 T h e r e e x i s t invertible finite functions o f o r d e r n w h i c h c a n n o t b e

    o b t a i n e d b y c o m p o s i t i o n o f generalized ANWNAN, f u n c t io n s o f o r d e r s t r i c t l y l e s s t h a n n .

    R e m a r k . A c c o r d i n g t o t h i s t h e o r em , t h e ^N D/N ^N D p r i m i t i v e i s n o t s u f f i c i e n t f o r t h e

    i s o mo r p h i c r e v e r s i b l e r e a l i z a t i o n o f a r b i t r a r y i n v e r t i b l e f i n i t e f u n c t i o n s o f l a r g e r o r d e r .

    T h i s r e s u l t c a n b e g e n e r al iz e d t o a n y f /H i re s e t o f in v e rt ib l e p r im i t i v e s T h u s , o n e m u s t

    tu rn to a l e s s re s t r i c t ive rea l i z a t ion s chema invo lv ing source and s ink l ine s .

    T n ~ o n ~ M 53 A n y inverfible f inite function can be realized, poss ibly w ith t em.p o r a r y

    s t o r a g e , [ b u t w i t h n o g ar b ag e ] b y m e a n s o f a

    reversible combinational

    n e t w o r k

    u s in g a s

    pr im it iv es the general ized ^ND/N^Nn elements

    of or de r

  • 8/12/2019 80_Toffoli

    9/13

    640

    T h e f o l l owi ng l is t (c f . F i gu r e 5 .5 )

    r e s o u r c e s o f w h i c h a r e v e r s ib l e n e t w o r k

    a f i n i t e f u n c t i o n ~ .

    s u m s u p i n a s c h e m a t i c w a y t h e i n p u t / o u t p u t

    m u s t a v a il it se lf in o r d e r t o b e a b l e t o c o m p u t e

    (a)

    argument _~

    ( b) constantg

    ( c ) - ~ - ~ e m p o r a r y

    o , s t a , t s

    rcsult

    garbage

    s ~ o ra g e c h a n n e l s - ~ -

    . - - ga r bage

    F I G . 5 . 5 Classification o f input a n d output l ines in a reversible com binational n e t -

    work , according to t h e i r function. (a) Argument a n d r e s u lt o f t h e in tended c o m -

    putat ion. (b) Constant a n d g a r b a g e lines to acco unt f o r the noninvcrt ibi l i ty of the

    g i v e n function. (c) Temporary s t o r age registers required when on ly a restric ted

    s e t o f primitives is available. (d) Additional c o n s t a n t a n d g a r b a g e lines required

    w h e n i n designing the network one choos es no t to t a k e ful l advantage of the c o r -

    relation b e t w e e n i n t e r n a l s t r e a m s o f d a t a , a n d thus looses opportunities t o b r i n g

    abou t d es t ruc t ive i n t e r f e r e n c e o f g a r b a g e .

    6 C o n s e r v a t i v e l o g ic

    U n i v e r s a l l og i c c a p a b il it ie s c an s ti ll b e o b t a i n ~ e v e n if o n e r e s t r i c t s o n e ' s a t t e n t i o n

    t o c o m b i n a t i o n a l n e t w o r k s t h a t , i n a d d i ti o n t o b e in g r e ve r si b le , c o n s e r v e i n t h e o u t p u t

    t h e n u m b e r o f O's a n d l ' s t h a t a r e pr es en t a t t h e i n p u t. T h e s t u d y o f s u ch n e t w o r k s i s

    p a r t o f a d i s c i p l i n e c a l l e d conserva tive logic [7] ( a ls o c f . [11 ]) . As a m a t t e r o f t a c t , m o s t

    o f t h e r e s u l t s o f S e c t i o n s 4 a n d 5 w e r e o r ig i n al ly d e r iv e d b y F r e d k i n a n d a s s o c i a t e s i n t h e

    c o n t e x t o f c o n s e r v a t i v e l o g i c .

    I n c o n s e r v a t i v e l o g ic , al l d a t a p r oc e ss in g is u l ti m a t e l y r e d u c e d t o condit ional rout ing

    o f s ig n a l s . R o u g h l y s p e a k in g , s ig n als a re t re a t e d a s u n a l t e ra b l e o b j e c t s t h a t c a n b e m o v e d

    a r o u n d i n t h e c o u r s e o f a c o m p u t a t io n b u t n e v e r c r e a te d o r d e s t r o y e d .

    T h e b a s i c p r i m i t i v e o f c o n s e r v a t i v e l og ic is t h e E r e d k i n . g a t e , d e f i n e d b y t h e t a b l e

    c z l ::2 c' Yl y2

    0 0 0 0 0 0

    0 0 I 0 1 0

    0 0 0 0 1

    0 I I ~ 0 1 1

    1 0 0 1 0 O

    1 0 I 10 1

    1 0 110

    I I I I I

    0 . 1 )

    T h i s c o m p u t i n g e l e m e n t c an b e vi su a li ze d as a d e vi c e t h a t p e r f o r m s c o n d i t i o n a l c r o s s o v e r

    o f t w o data s i g n a ls a a n d b a c c o r d in g t o t h e v a lu e o f a c o n t r o l s ig n a l c ( F i g u r e 6 . 1 a ) . W h e n

    c - - I t h e t w o d a t a s i g n a ls fo ll o w p a r a ll e l p a t h s , w h il e w h e n e ~ 0 t h e y c r o s s o v e r ( F i g u r e

    6 . 1 b ) .

  • 8/12/2019 80_Toffoli

    10/13

    641

    a ) b )

    c ~ ~ I ~ i~ 1

    a b

    b a

    F r o . 6 . 1 ( a) S y m b o l a n d (b) operaion o f t h e F r e d k i n g a t e .

    I n o r d e r t o p r o v e t h e u n i v e r s a l i t y o f t h i s g a t e as a lo gic p r i m i t i v e f o r r e v e r s i b l e c o m -

    p u t i n g , i t i s s u f f i c i en t to o b s e r v e t h a t AND c a n b e o b t a i n e d f r o m t h e m a p p i n g ( p , q , 0 )

    (p , pq , ~q) , an d Nov an d VAN-OUT from the m app ing (p , 1 , 0) H (p ,p , ~) .

    I n a c o n s e r v a t i v e lo g ic c i rc u i t, t h e n u m b e r o f l ' s , w h i c h i s c o n s e r v e d i n t h e o p e r a t i o n

    o f t h e c i r c u i t , is t h e s u m o f t h e n u m b e r o f / ' s i n d i ff e re n t p a r t s o f t h e c i r c u i t . T h u s , t h i s

    q u a n t i t y i s a n a d d i t i v e i n te g r a l o f t h e m o t i on , a n d c a n b e s h o w n t o p l a y a r ol e a n a l o g o u s

    t o t h a t o f e n e r g y i n p h y s i c a l s y s te m s . O t h e r c o n n e ct io n s b e tw e e n c o n s e r v a t i v e l o g ic a n d

    p h y s i c s w i ll d i s c u s s e d i n m o r e d e t a i l in [ 7] , w h e r e, i n p a r ti c u l a r , w e d e s c r i b e a p h y s i c a l

    rea l i z a t ion o f the Fredk in ga te ba sed on e l a s t i c co l l i s ions .

    7

    ever s ib l e

    s e q u e n t ia l c o m p u t i n g

    I n S e c t i o n s 4 a n d 5 , w e s t a r t e d f r o m a c e r t ai n c o m p u t i n g o b j e c t ( v i z ., a f i n i t e f u n c -

    t ion ) , an d we d i scussed the cond i t ions fo r i t s r eve rs ib le r ea l i z a t ion f i rs t (a ) a s an o b j ec t o f

    t h e s a m e n a t u r e ( v iz ., a n in v e rt ib l e f in it e f u n ct io n ) t r e a te d a s a l u m p e d s y s t e m , t h u s

    s t r e s s i n g f u n c t i o n a l a s p e c t s, a n d th e n (b ) a s a d i s t r i b u t e d s y s t e m ( v iz . , a r e v e r s i b l e

    c o m b i n a t i o n a l n e t w o r k ) , t h u s st re ss in g s t ru c t u r a l a s p ec ts a n d p a v i n g t h e w a y f o r a n a t u r a l

    p h y s i c a l i m p l e m e n t a t i o n .

    B y a n d l a rg e , w e s h a ll fo ll ow a s im i la r p l an i n de a li n g w i t h t h e m o r e c o m p l e x c o m p u t i n g

    o b j e c t s t h a t c o n s t i t u t e t h e p a r a d i gm s o f s e qu e nt ia l c o m p u t i n g , n a m e l y , f i n i t e a u t o m a t a

    ( i n t h e p r e s e n t s e c t i o n ) , Tur ing mach ines (Sec t ion 8) , and c e ll u la r a u t o m a t a ( S e c t i o n 9 ) .

    B y d e f i n i t i o n , a f in i t e a u t o m a t o n i s reversible i f i t s t r a n s i t i o n f u n c t i o n i s i n v e r t i b l e .

    T h u s , i n o r d e r t o r e a l iz e a f in i te a u t o m a t o n b y m e a n s o f a r ev e r s ib l e s e q u e n t i a l n e t w o r k ,

    i t w i l l b e s u f f i c i e n t t o t a k e i t s tr a n s i t io n f u n c t i o n , c o n s t r u c t a r e v e r s i b le r e a l i z a t i o n o f i t ,

    a n d u s e t h i s a s t h e c o m b i n a t i o n a l p a r t o f t h e d e si re d s e q u en t ia l n e tw o r k . T h e p r o b l e m

    o f r e v e r s i b l y r e a l iz i n g a n a r b i t r a r y f in i te f u n c t io n h a s b ee n so l v e d in S e c t i o n 4 . T h u s , w e

    h a v e t h e f o ll o w in g t h e o r em .

    TEOrmM 7.1 . Fo r eve ry fin i t e au toma ton r : X X Q-~ .Q x Y , w h e r e X -~- B m, Y ~ B n,

    a n d Q .~- B u , th ere exis ts a reversib le f i n it e au toma ton ~: (B r X B m) X B u--~ B u X (B n X

    B r + m - ) , wi~h r

  • 8/12/2019 80_Toffoli

    11/13

    64

    a )

    i n p u t - - ~ a r b i ~ r a r y ~ - - - o u t p u t

    old

    s t a ~ ]

    finite [new

    s~a~e

    ? / f u n c t i o n ~

    (b) sou rce ~

    i np u t ~ i u v e rt ib l e ~ - - o u t p u t

    finite [

    funct ion

    l d e l a s

    F I G . 7 . 3 A ny f in i t e au toma ton ( a ) c a n be real ized a s a revers ib le f in i te au tom aton

    b ) h av ing a num ber o f aux i li a r y inpu t lines ( s o u r c e ) w h i c h a r e fed w i th cons tan ts

    and a number o f auxiliary outp ut lines sink)

    whose

    values are disregarded.

    H av ing d i scussed the r ea li za tion o f f in it e au to m ata by m eans o f r ever s ib l e f i n i t e

    au to m at a , we tu rn now to t he rea liza tion o f f in ite au to m ata b y means o f r ever s ib l e f i n i t e

    sequent ial networks based on given pr imi t ives .

    I t i s c l ear t ha t a l l t he a rgum ent s o f Sections 5 and B concern ing f in i te f un c t io ns im-

    m ed ia t e ly a pp ly to the t r ans it i on func t ion o f any g iven f in it e au to m aton . In pa r t i cu l a r ,

    ev er y f in i te au tom ato n can be r ea li zed by a f in it e, r evers ibl e sequen t i a l ne tw ork ba se d

    on , sa y , the AND/NAND pr imi t ive. W ith reference to Figu re 5 .5, one can visu al ize su ch a

    rea l i za t ion by feed ing back , v i a de l ay e lemen ts , some o f t he r esu l t l ines t o so m e o f t he

    ar gu m en t l ines, and a l l a ll o f t he t emporary - sto rage ou tp u t s t o the co r re spon d ing inp u t s .

    In o rd er t o i n su re t he des ir ed behav io r, the de l ay e l emen ts assoc i a ted wi th t he t em po ra ry -

    s to rage channel s mus t be i n i t i a l i zed

    once

    and for

    all

    w i t h ap p r o p r i a t e v a l u es ( t y p i ca l l y ,

    al l O's), w hi le the sourc e l ines mu st be fed wi th ap propr iate c on stan ts ( ty pic al ly , a l l O 's)

    at every

    sequential step.

    In a c onven t iona l com puter , power d issipa tion i s p ropor t iona l t o t he nu m be r o f l og i c

    g a t e s . O n t h e o t h e r h an d , t h e n u mb er o f co n s t an t s /g a r b ag e l in e s in F i g u r e 7 .4 i s a t

    w ors t p rop or t iona l t o t he number o f i npu t /ou tpu t l ines ( ef . Theo rems 4 .1 and 5 .3 ). F ro m

    th e v i ew po in t o f a phys i ca l implemen ta tion , where s ignals a re encoded in som e fo rm of

    en erg y , t he abo ve schema can be in te rp re ted as fo l lows:

    U sing invertible logic

    g a t e s ,

    i t

    is ideally possible to build a sequential comp uter w ith zero internal p o w e r dissipation.

    Po w er d i ss ipa t ion migh t a r ise ou t s ide t he c ir cu it, t yp i ca l ly a t t he i np u t /o u t pu t i n t e r fac e ,

    i f t he user chose to connec t i npu t o r ou tpu t l i nes t o nonrever s ib l e d ig i t a l c i r cu i t ry . Even

    i n t h i s c a s e , p o w er di ss ip a ti o n i s a t m o s t p r o po r ti o na l t o t h e n u mb er o f a r g u m en t / r e s u l t

    l ines ,* r a th er t han to t he number o f log ic ga t es ( as i n o rd inary c om puter s ) , an d i s t h us

    i n d e p en d en t o f t h e co mp l ex it y o f t h e f un ctio n b e in g co mp u t ed . Th i s co n s t i t u t e s t h e

    cen t ra l r esu l t o f t he p resen t paper .

    8 Rev ersible Turing machines

    W e sha l l assum e the r eade r t o be f ami lia r wi th t he concep t

    of Turing m achine.

    F r o m

    * A cco r d i n g t o T h eo r em 4 .1 , t h e n u mb er o f co n s tan t lin es n eed n o t b e g r ea t e r t h an t h a t o f

    r e s u l t l in e s , an d t h e n u mb er o f g a r bag e lin es need n o t b e g r ea t e r th an t h a t o f a r g u m en t

    l ines .

  • 8/12/2019 80_Toffoli

    12/13

    64

    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 H C ---, T H (7 is

    invertible.

    It is well known that for every reeursive function .there exists a Turing machine that

    computes it, and, in particular, that there exist computation-universal Turing machines.

    Are these capabilities preserved if one restricts one's attention to the class of reversible

    Turing machines?

    The answer to the above question is positive. In fact, in [4] Bennett exhibits a proce-

    dure for constructing, for any Turing machine and for certain quite general computat ion

    formats, a reversible Turing machine that performs essentially the same computations.

    In order to obtain the desired behavior, Bennett's machine is initialized so tha t 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 ar gu ment 's

    first symbol. At the end of the computation, i.e., when the head enters a dist inguished

    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 squares that are ini tially blank will

    eventual ly 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 amount of random output values (in this case, a copy of the argu ment --cf .

    the first row of (4.2)) at the end of the computation. Moreover, during the computation 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 temlSorary-storage lines in Section 5.

    It is clear that, like the constants in the reversible combinational networks of Section

    5, the blanks in Bennett' s machine play an essential role in the computation, since witho ut

    their presence one could not achieve universality and revers ibi l i ty at the same time.

    Intuit ively, computation in reversible systems requires a higher degree of pr e d i c t ab i l i t y

    about the env i ronm ent ' s ini tia l conditions than computation in nonreversible ones.

    9 Rev ers ib l e ce l lu lar au tom ata

    We shall assume the reader to have some familiarity with the concept of ce l lu lar

    au toma to n- -i n essence an array of identical, uniformly interconnected finite automata[21].

    From a physical viewpoint cellular automata are in many respects more satis factory models

    of computing processes than Turing machines[22], and for this reason the question of

    whether there exist reversible cellular automata that are computation- and construction-

    universal is of particular interest (and has been long debated).

    The answer to the above question is positive. In hct, in [20] Toffoli exhibits a proce-

    dure for construct ing, for any cellular automaton (presented as an infinite, space-i terative

    sequential network), a reversible cellular automaton that realizes it. As in the case of

    r.eversible Turing machines, also in reversible cellular automata the predictability of a

    computing structure's environment plays an essential role in making the computation

    proceed as intended.

    It is well known that any Turing machine can be embedded in a suitable cellular

  • 8/12/2019 80_Toffoli

    13/13

    644

    a u t o m a t o n . T h u s , a c c o r di n g t o th e fo re go in g d is c us s io n , a n y T u r i n g m a c h i n e c a n b e

    r e a l i z e d b y a n i n f i n i t e reversible s~quential nework.

    1 0 . C o n c l u s i o n s

    W e h a v e s h o w n t h a t t h e c h o ic e t o u se re ve rs ib le m e c h a n i s m s i n d e s c r ib i n g f u n c t i o n a l

    a n d s t r u c t u r a l a s p e c t s o f c o m p u t i n g p ro ce ss es is a v i ab l e o n e . W h a t c a n b e g a i n e d f r o m

    t h i s c h o i c e ?

    I n t h e s y n t h e s i s o f a n a b s t r a c t c o m p u t in g s y s te m , t h e r e q u i re m e n t t h a t t h e s y s t e m

    b e r e v e r s i b l e c a n i n g e n e ra l be m e t o n ly a t t h e c o s t o f g r e a t e r s t r u c t u r a l c o m p l e x i t y .

    T h i s l o g ic a l o v e r h e a d i s q u i t e s li gh t; o n t h e o t h e r h a n d , t h e s y s t e m ' s v e r y r e v e r s i b i l i t y

    p r o m i s e s t o b e a k e y f a c t o r i n l e a di n g t o a m o r e e ff ic ie n t p h y s i c a l r e a l i z a t i o n , s i n c e , a t t h e

    m i c r o s c o p i c l e v e l, t h e p r i m i ti v e s a n d t h e c o m p o s i t io n r u le s a v a i l a b l e i n t h e p h y s i c a l

    w o r l d r e s e m b l e m u c h m o r e c lo s el y t h o s e u s ed in t h e t h e o r y o f r e v e rs i b le c o m p u t i n g t h a n

    t h o s e u s e d i n t r a d i t i o n a l l o g i c d e s i g n .

    A c k n o w l e d g m e n t s

    M a n y i d e a s d is c u s s ed in th e p r e s e n t p a p e r w ere o r ig i n a te d b y P r o f . E d w a r d F r e d k i n ,

    t o w h o m I a l s o o w e m u c h u s e f u l a d v ic e a n d e n c o u r a g m e n t .

    T h i s r e s e a r c h w a s s u p p o r t e d b y th e A d y a n c e d R e s e a r c h P r o j e c t s A g e n c y o f t h e

    D e p a r t m e n t o f D e f e n s e a n d w a s m o n it o re d b y t h e O ffic e o f N a v a l R e s e a r c h u n d e r C o n t r a c t

    N o . N 0 0 0 1 4 - 7 5 - C - 0 6 6 1 .

    i s t o f re ferences

    [ ] B E N N E T T ,C . H . , L o g i c a l R e v e r s i b i li t y o f C o m P u t a t i o n , I 1J M J . R e s . D e v . O ( 1 9 7 3 ) ,

    5 2 5 -5 3 2 .

    [7] FaEDK~N,E d w a r d , a n d T o r'v o~ a , T o m m a s o , ' * C o n s e rv a t iv e L o g i c , ( in p r e p a r a t i o n ) .

    S o m e o f t h e m a t e r i a l o f th i s p a p e r is te n t a ti v e l y a v a i la b l e in t h e f o r m o f u n p u b l i s h e d

    n o t e s f r o m P r o f . F r e d k i n ' s l e c tu r e s, c o l le c t ed a n d o r g a n i z e d b y B i l l S i l v e r i n a

    6.895 Term P a p e r , C o n s e r v a ti v e L o g ic , a n d in t h e f o r m o f a n o t h e r 6.895 T e r m

    P a p e r , A R e v e r si b le C o m p u t e r U s i n g C o n s e r va t iv e L o g ic , b y E d w a r d B a r t o n ,

    b o t h a t t h e M I T D e p t . o f E l e c t r. E n g . C o m p . S ci. (1 9 78 ).

    [11] KINOSmTA,Ko z o , e t a l. , On M ag n e t i c Bu b b le C i rcu i t s ,

    I E E E

    T r a n s . C o m p u t e r s

    C-25 (1976) , 247-253 .

    [ 1 2 ] L ^ N D ^ U E n , R o l f , I r re v e r s ib i li ty a n d H e a t G e n e r a t i o n i n t h e C o m p u t i n g P r o c e s s ,

    m J. 5 1961), 183-191.

    [ 2 0 ] T o v r o L I , T o m m a s o , C o m p u t a ti o n a n d C o n s t r u c ti o n U n i v e r s a l it y o f R e v e r s i b l e

    C e l lu l a r A u to m ata , J . Co m p u t . Sy s t . Sc i. 1 5 (19 7 7 ), 2 1 3 -2 3 1 .

    [ 2 1 ] T o P l~ O L t, T o m m a s o , C e l l u l a r A u t o m a t a M e c h a n ic s ( P h . D . T h e s i s ) , Tech . Rep .

    n o . 208, L o g i c o f C o m p u t e r s G r o u p , U n i v . o f M i c h ig a n ( 19 7 7) .

    [ 2 2 ] T o v v O L i , T o m m a s o , T h e R o l e o f t h e O b s e r ve r i n U n i f o r m S y s t e m s , A p p l i e d

    G e n e r a l Systems Research (ed . G. J . Kl ir ), 395-400 (P len um Pres s , 1978).

    [ 2 3 ] T o v r o m , T o m m a s o , '~ B ic on tin uo us E x t e n s io n s o f I n v e r t i b le C o m b i n a t o r i a l

    F u n c t i o n s ,

    Tech.

    M e m o

    MIT/LCS /TM-1 2 4 ,

    M I T L a b . f o r C o m p . S c i . ( 1 9 79 ) ( t o

    a p p e a r i n

    Math. SysL Theory .

    [ 2 7 ] T o v F o m , T o m m a s o , '~ R e ve rs ib le C o m p u t i n g , Tech. M e m o M I T / L C S / T M - 1 51 , M I T

    L a b . f o r C o m p . S c i. (1 9 80 ).