Solving Routing Problems With Cellular Automata (1996)

Embed Size (px)

Citation preview

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    1/10

    S o l v i n g R o u t i n g P r o b l e m s w i t h C e l l u l a r

    A u t o m a t a

    C . H o c h b e r g e r , R . H o m a n n ,

    M i c r o p r o g r a m m i n g a n d C o m p u t e r A r c h i t e c t u r e

    T e c h n i c a l U n i v e r s i t y o f D a r m s t a d t

    A l e x a n d e r s t r . 1 0 , D a r m s t a d t , D - 6 4 2 8 3 , G e r m a n y

    A b s t r a c t

    N e w v a r i a n t s o f t h e c l a s s i c a l L e e a l g o r i t h m f o r t h e r o u t i n g o f c o n n e c t i o n s

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

    c e l l u l a r p r o c e s s i n g m o d e l . T w o c e l l u l a r a l g o r i t h m s a r e d e s c r i b e d : ( 1 )

    a c e l l u l a r s h o r t e s t p a t h a l g o r i t h m w i t h o n l y 1 4 s t a t e s p e r c e l l , w h i c h

    i s i n d e p e n d e n t o f t h e g r i d s i z e a n d ( 2 ) a p a r a l l e l a l g o r i t h m f o r r o u t i n g

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

    1 M o t i v a t i o n

    A l a r g e n u m b e r o f p r o b l e m s c a n b e s o l v e d i f t h e y a r e d e s c r i b e d a s c e l l u l a r

    a l g o r i t h m s . T y p i c a l s u c h p r o b l e m s a r e p h y s i c a l e l d s , l a t t i c e g a s m o d e l s , d i u -

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

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

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

    T h e f o l l o w i n g r o u t i n g a l g o r i t h m w a s d e v e l o p e d , w h e n t h e e x p r e s s i v e p o w e r

    o f t h e l a n g u a g e C D L 1 ] 2 ] f o r t h e d e s c r i p t i o n o f c e l l u l a r a l g o r i t h m s w a s e x p l o r e d

    f o r d i e r e n t a p p l i c a t i o n s .

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

    p r i n t e d c i r c u i t b o a r d . I t t u r n e d o u t , t h a t b y m a p p i n g c l a s s i c a l a l g o r i t h m s

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

    t h i s c a s e , t h e c l a s s i c a l L e e r o u t i n g a l g o r i t h m n d i n g t h e s h o r t e s t p a t h b e t w e e n

    t w o p o i n t s w a s t r a n s f o r m e d i n t o a n m o r e e c i e n t f o r m , w h e r e o n l y 1 4 s t a t e s

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

    T h e b a s i c c e l l u l a r r o u t i n g a l g o r i t h m c a n a l s o b e m o d i e d a n d e x t e n d e d i n

    o r d e r t o n d m u l t i - p o i n t c o n n e c t i o n s o r s p e e d - u p t h r o u g h p a r a l l e l i z a t i o n .

    2 L e e A l g o r i t h m

    A v e r y w e l l k n o w n a p p r o a c h t o r o u t i n g p r o b l e m s i s t h e L e e a l g o r i t h m 7 ] . I t s

    p u r p o s e i s t o n d a n o p t i m a l p a t h b e t w e e n t w o p o i n t s o n a r e g u l a r g r i d . E a c h

    p o i n t o f t h e g r i d i s a s s o c i a t e d w i t h a w e i g h t . T h e a l g o r i t h m n d s t h e p a t h

    o n t h e g r i d w i t h t h e l o w e s t s u m o f w e i g h t s . B y a d j u s t i n g t h e w e i g h t s o f t h e

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

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    2/10

    p a t h . L e t u s c o n s i d e r a n e x a m p l e : T h e u s e r s i m p l y s e a r c h e s f o r t h e s h o r t e s t

    p a t h b e t w e e n t w o p o i n t s . I n t h i s c a s e t h e u s e r s p e c i e s t h e w e i g h t o n e f o r a l l

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

    p o i n t s . T h i s i s t h e s h o r t e s t p a t h b e t w e e n t h e t w o c h o s e n p o i n t s . I n a n o t h e r

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

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

    e x i s t i n g p a t h s a n d a v e r y l o w w e i g h t t o a l l o t h e r g r i d p o i n t s . T h e a l g o r i t h m

    w i l l t h e n n d t h e p a t h w i t h a s f e w c r o s s i n g s a s p o s s i b l e .

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

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

    a c c u m u l a t e d w e i g h t f o r t h e s t a r t i n g p o i n t S i s i n i t i a l i z e d t o 0 :

    f o r a l l g r i d p o i n t s i d o

    a c w ( i ) : = i n f i n i t y ;

    a c w ( s t a r t i n g p o i n t ) : = 0

    s t e a d y : = f a l s e

    w h i l e n o t s t e a d y d o

    s t e a d y : = t r u e ;

    f o r a l l g r i d p o i n t s i d o

    m i n _ n e i g h b o u r : = m i n ( a c w ( n e i g h b o u r s ( i ) ) ) ;

    a c w ( i ) : = m i n _ n e i g h b o u r + w e i g h t o f t h i s p o i n t ;

    i f a c w ( i ) h a s c h a n g e d t h e n s t e a d y : = f a l s e ;

    F i g u r e 1 s h o w s a s a m p l e g r i d i n t h e m i d d l e o f t h e c a l c u l a t i o n o f t h e a c c u -

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

    E

    2

    1

    1

    1

    1

    1

    1

    1111

    111

    1 111

    11

    11111

    11111

    11111

    11111

    11111

    11111

    11111

    11

    1

    21

    S 2

    212

    12

    2

    2

    11

    11

    1

    11

    F i g u r e 1 : S a m p l e g r i d i n t h e m i d d l e o f p h a s e 1

    I n t h e s e c o n d p h a s e t h e a c t u a l p a t h i s e s t a b l i s h e d . F o r t h i s p u r p o s e t h e

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

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

    t h e s t a r t i n g p o i n t . F i g u r e 2 s h o w s a s a m p l e g r i d a t t h e e n d o f p h a s e o n e .

    I n g u r e 3 o n e o f t h e p o s s i b l e r e s u l t i n g p a t h s i s s h o w n . N o t e , t h a t t h e r e a r e

    s e v e r a l p o s s i b i l i t i e s t o b u i l d a p a t h f r o m t h e e n d p o i n t t o t h e s t a r t p o i n t . A t

    t h e e n d p o i n t y o u c a n e i t h e r g o r i g h t o r d o w n .

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    3/10

    E

    S

    1

    1

    1

    1

    2

    2

    2

    2

    2 2

    2

    2

    33

    3

    3

    3

    3

    3

    3

    3

    3

    3

    4

    4

    4

    4

    4

    4

    4

    4

    4

    4

    4

    4

    5

    5

    5

    5

    5

    55

    5

    5

    5

    5

    6

    6

    6

    6

    6

    66

    6

    7 7

    7

    7

    7

    7

    7

    7

    6

    8

    8

    8

    8

    8

    9

    9

    9

    9

    1 0

    1 0 1 1

    F i g u r e 2 : S a m p l e g r i d a t t h e e n d o f p h a s e 1

    E

    S

    1

    1

    1 2

    2

    2

    2

    2 2

    2

    33

    3

    3

    3

    3

    3

    3

    3

    3

    4

    4

    4

    4

    4

    4

    4

    4

    4

    4

    4

    5

    5

    5

    5

    55

    5

    5

    5

    5

    6

    6

    6

    6

    66

    6

    7 7

    7

    7

    7

    7

    7

    6

    8

    8

    8

    8

    8

    9

    9

    9

    9

    1 0

    1 0 1 1

    P

    P

    PPPPP

    F i g u r e 3 : O n e p o s s i b l e p a t h

    O b s t a c l e s c a n b e m o d e l e d b y i n n i t e w e i g h t s a g r i d p o i n t s . S i n c e t h e s u m

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

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

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

    a u t o m a t o n . U n f o r t u n a t e l y t h e n u m b e r o f s t a t e s r e q u i r e d t o p e r f o r m t h e a l g o -

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

    w e i g h t t h a t m a y o c c u r . T h u s w e d e c i d e d t o d e v e l o p a v e r s i o n o f t h e a l g o r i t h m 5 ]

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

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

    3 T w o p o i n t r o u t i n g o n c e l l u l a r a u t o m a t a

    T h e a c c u m u l a t e d w e i g h t s i n t h e L e e a l g o r i t h m a r e n e e d e d t o n d t h e s h o r t e s t

    p a t h . I n s t e a d o f s t o r i n g t h e a c c u m u l a t e d w e i g h t s w e c o u l d a l s o s t o r e t h e d i r e c -

    t i o n i n w h i c h w e h a v e t o m o v e t o g e t b a c k t o t h e s t a r t i n g p o i n t . W i t h t h e s e

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

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

    w e i g h t s o n t h e g r i d p o i n t s .

    W e p r e s e n t t h e m o d i e d a l g o r i t h m i n C D L . T h i s l a n g u a g e h a s b e e n d e v e l -

    o p e d t o d e s c r i b e c e l l u l a r a u t o m a t a i n a c o n c i s e a n d r e a d a b l e w a y , i n d e p e n d e n t

    o f t h e t a r g e t a r c h i t e c t u r e . C o m p i l e r s a r e a v a i l a b l e t h a t t r a n s l a t e C D L i n t o C

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

    h a r d w a r e s i m u l a t o r s l i k e t h e C E P R A f a m i l y 3 ] .

    T h e a l g o r i t h m c a n b e d e s c r i b e d a s f o l l o w s :

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    4/10

    ( 0 1 ) c e l l u l a r a u t o m a t o n L e e _ r o u t i n g ;

    ( 0 2 )

    ( 0 3 ) c o n s t d i m e n s i o n = 2 ;

    ( 0 4 ) d i s t a n c e = 1 ;

    ( 0 5 )

    ( 0 6 ) c e l l = 0 , 0 ] ;

    ( 0 7 ) n o r t h = 0 , 1 ] ; e a s t = 1 , 0 ] ; s o u t h = 0 , - 1 ] ; w e s t = - 1 , 0 ] ;

    ( 0 8 )

    ( 0 9 ) t y p e c e l l t y p e = ( f r e e , u s e d , s t a r t , g o a l ,

    ( 1 0 ) / * p h a s e 1 : w a v e m a r k s * /

    ( 1 1 ) w a v e _ u p , w a v e _ r i g h t , w a v e _ d o w n , w a v e _ l e f t ,

    ( 1 2 ) / * p h a s e 2 : p a t h d i r e c t i o n s * /

    ( 1 3 ) p a t h _ u p , p a t h _ r i g h t , p a t h _ d o w n , p a t h _ l e f t ,

    ( 1 4 ) c l e a r , r e a d y ) ;

    ( 1 5 )

    ( 1 6 ) g r o u p w a v e = { w a v e _ u p , w a v e _ r i g h t , w a v e _ d o w n , w a v e _ l e f t } ;

    ( 1 7 ) p a t h = { p a t h _ u p , p a t h _ r i g h t , p a t h _ d o w n , p a t h _ l e f t } ;

    ( 1 8 ) n e i g h b o u r s = { n o r t h , e a s t , s o u t h , w e s t } ;

    ( 1 9 )

    ( 2 0 ) v a r n : c e l l a d d r e s s ;

    ( 2 1 ) c : c e l l t y p e ;

    ( 2 2 )

    ( 2 3 ) r u l e

    ( 2 4 ) c a s e * c e l l o f

    ( 2 5 ) f r e e : i f o n e ( n i n n e i g h b o u r s & c i n w a v e : * n i n { s t a r t , w a v e } )

    ( 2 6 ) t h e n * c e l l : = c ;

    ( 2 7 ) g o a l : i f o n e ( n i n n e i g h b o u r s & c i n p a t h : * n i n { s t a r t , w a v e } )

    ( 2 8 ) t h e n * c e l l : = c ;

    ( 2 9 ) w a v e : i f ( * n o r t h = p a t h _ d o w n ) o r ( * e a s t = p a t h _ l e f t ) o r

    ( 3 0 ) ( * s o u t h = p a t h _ u p ) o r ( * w e s t = p a t h _ r i g h t ) t h e n

    ( 3 1 ) * c e l l : = e l e m e n t ( c e l l t y p e , v a l u e ( * c e l l ) + 4 )

    ( 3 2 ) e l s e

    ( 3 3 ) i f o n e ( n i n n e i g h b o u r s : * n i n { p a t h , c l e a r } ) t h e n

    ( 3 4 ) * c e l l : = c l e a r ;

    ( 3 5 ) c l e a r : * c e l l : = f r e e ;

    ( 3 6 ) s t a r t : i f o n e ( n i n n e i g h b o u r s : * n i n p a t h ) t h e n

    ( 3 7 ) * c e l l : = r e a d y ;

    ( 3 8 ) e n d ; / * o f c a s e * /

    A t t h e b e g i n n i n g o f t h e r s t p h a s e a l l c e l l s a r e i n t h e f r e e s t a t e , e x c e p t f o r

    t h e s t a r t a n d t h e e n d p o i n t . I n t h e r s t p h a s e a l l c e l l s c h e c k w h e t h e r t h e r e i s

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

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

    i s p e r f o r m e d i n l i n e ( 2 5 ) a n d ( 2 6 ) . T h e o n e f u n c t i o n s u c c e s s i v e l y a s s i g n s a l l

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

    e a c h a s s i g n m e n t t h e c o n d i t i o n f o l l o w i n g t h e c o l o n i s c h e c k e d . T h e e v a l u a t i o n o f

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    5/10

    t h e o n e f u n c t i o n s t o p s i f a n a s s i g n m e n t i s f o u n d , t h a t s a t i s e s t h e c o n d i t i o n , i . e .

    t h e c o r r e s p o n d i n g n e i g h b o u r i s i n s t a t e s t a r t o r i n a n y o f t h e s t a t e s w a v e . T h e

    r s t a s s i g n m e n t i s n = n o r t h a n d c = w a v e _ u p . T h e a s s i g n m e n t t o c i s o n l y u s e d

    f o r i t s s i d e e e c t t o s t o r e t h e w a v e s t a t e c o r r e s p o n d i n g t o t h e n e i g h b o u r b e i n g

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

    c h a n g e t o w a v e _ r i g h t s i n c e i t m u s t p o i n t t o t h i s n e i g h b o u r . F i g u r e 4 s h o w s a

    s a m p l e g r i d a t t h e e n d o f p h a s e o n e . T h e w a v e m a r k s a r e s y m b o l i z e d b y s m a l l

    a r r o w s . T h e b l a c k s q u a r e s a r e o b s t a c l e s . W e h a d t o i n t r o d u c e t h e s p e c i a l s t a t e

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

    6

    ?

    -

    -

    ?

    ?

    ?

    ?

    ?

    S

    E

    F i g u r e 4 : W a v e m a r k s a t t h e e n d o f p h a s e o n e

    P h a s e o n e e n d s w h e n t h e e n d p o i n t ( s t a t e g o a l , l i n e s ( 2 7 ) { ( 2 8 ) ) i s r e a c h e d

    b y t h e w a v e . N o w t h e p a t h i s b u i l t b a c k w a r d t o w a r d s t h e s t a r t p o i n t a l o n g t h e

    w a v e m a r k s ( l i n e s ( 2 9 ) { ( 3 4 ) ) . I f a c e l l i s o n e o f t h e w a v e s t a t e s a n d i t s e e s a

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

    t h e d i r e c t i o n o f i t s p r e v i o u s m a r k ( F i g . 5 ) . T h i s i s d o n e i n t h e C D L p r o g r a m b y

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

    j j

    j

    jjj

    6

    ?

    -

    -

    ?

    ?

    ?

    ?

    ?

    S

    E

    F i g u r e 5 : T h e p a t h a l o n g t h e f o r m e r m a r k s

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

    s e q u e n t r o u t i n g p a s s e s ( l i n e s ( 3 3 ) { ( 3 4 ) ) . F o r t h i s p u r p o s e a l l c e l l s t h a t s e e a

    n e i g h b o u r c e l l w h i c h i s a p a t h n o t p o i n t i n g t o w a r d s t h i s c e l l a r e c l e a r e d . S u c h

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

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

    i n t h e n e x t g e n e r a t i o n ( l i n e ( 3 5 ) ) . S i n c e t h e b u i l d i n g o f t h e p a t h m o v e s a l o n g

    t h e s h o r t e s t p a t h , i t i s i m p o s s i b l e t h a t a c e l l i n c l e a r s t a t e c a n r e a c h a c e l l

    w h i c h w i l l b e i n t h e p a t h b u t i s n o t y e t p a r t o f i t .

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

    b e c o m e p a r t o f t h e p a t h . T h e s t a r t c e l l c h a n g e s i t s s t a t e t o r e a d y a n d t h e r e b y

    s i g n a l s t h a t t h e p a t h i s c o m p l e t e ( l i n e s ( 3 6 ) { ( 3 7 ) ) .

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    6/10

    T h i s i m p l e m e n t a t i o n o f o u r a l g o r i t h m r e q u i r e s o n l y 1 4 s t a t e s a n d t h u s c a n

    v e r y e a s i l y b e r e a l i z e d i n h a r d w a r e .

    4 R o u t i n g M u l t i p l e N e t s S i m u l t a n e o u s l y

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

    c e l l u l a r a u t o m a t o n , i t i s d e s i r a b l e t o r o u t e m u l t i p l e c o n n e c t i o n s s i m u l t a n e o u s l y .

    E a c h s i n g l e c o n n e c t i o n c a n b e r o u t e d a s i n t h e s i m p l e c a s e . U n f o r t u n a t e l y s o m e

    n e w p r o b l e m s a r i s e i n t h i s c a s e . C o n s i d e r t h e s i t u a t i o n i n g u r e 6 . O b v i o u s l y

    a s o l u t i o n e x i s t s . I t i s s h o w n i n g u r e 7 .

    S 2

    E 1

    E 2

    S 1

    F i g u r e 6 : T w o n e t s i n a c r i t i c a l s i t u a t i o n

    P 2P 2

    P 2

    P 2 P 2 P 2 P 2 P 2 P 2

    S 2

    P 1P 1P 1P 1E 1

    P 2 P 2 P 2 P 2

    E 2

    P 1 P 1 P 1 P 1 P 1 P 1 S 1

    F i g u r e 7 : S o l u t i o n f o r t h i s p r o b l e m

    B u t i f b o t h c o n n e c t i o n s s t a r t r o u t i n g a t t h e s a m e t i m e , c o n n e c t i o n 2 w i l l

    f o r m a b a r r i e r s o t h a t c o n n e c t i o n 1 c a n n o t b e p e r f o r m e d ( F i g . 8 ) .

    -

    -

    -

    -

    - - - - - -

    -----

    -

    -

    - -

    -

    - - - -

    -

    ---

    - -

    6

    6

    ?

    ?

    E 1 P 2

    P 2

    E 2

    S 2

    P 2

    S 1

    F i g u r e 8 : S h o r t p a t h b l o c k s l o n g p a t h

    T h e s o l u t i o n t o t h i s p r o b l e m c a n b e d i v i d e d i n t o t w o s u b p r o b l e m s . I n t h e

    r s t s t e p a s t a r t p o i n t h a s t o d e t e c t , t h a t i t c a n n o t e s t a b l i s h a p a t h t o i t s

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    7/10

    e n d p o i n t . I n t h e s e c o n d s t e p i t h a s t o r e m o v e p a t h s t h a t h a v e a l r e a d y b e e n

    f o r m e d , t o b e a b l e t o r e a c h i t s e n d p o i n t .

    H o w c a n a s t a r t p o i n t d e t e r m i n e t h a t t h e r e i s n o p a t h t o i t s e n d p o i n t ?

    T o s o l v e t h i s q u e s t i o n l e t u s r s t c o n s i d e r a s i n g l e c e l l w i t h i n t h e s e a r c h w a v e .

    T h i s c e l l c a n n o t b e c o m e a p a r t o f t h e p a t h i f n o n e o f i t s n e i g h b o u r s p o i n t s

    t o w a r d s i t . F i g u r e 9 i l l u s t r a t e s t h i s s i t u a t i o n . N o n e i g h b o u r p o i n t s t o w a r d s

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

    t h e m a r k e d c e l l c o u l d n e v e r b e c o m e p a r t o f t h e p a t h . T h e m a r k e d c e l l c a n

    n o w c h a n g e i t s s t a t e i n t o d e a d _ e n d . I n t h e n e x t g e n e r a t i o n t h e u p p e r c e l l

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

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

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

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

    n e i g h b o u r s o f t h e s t a r t p o i n t a r e i n t h e s t a t e d e a d _ e n d t h e s t a r t p o i n t k n o w s

    t h a t a p a t h t o t h e e n d p o i n t i s i m p o s s i b l e .

    -

    6

    ?

    -

    6

    ?

    6 6

    66

    66

    6 6

    --

    --

    ? ?

    ??

    S

    F i g u r e 9 : W a v e m a r k , t h a t c a n n o t b e c o m e p a r t o f t h e p a t h

    T h e s t a r t p o i n t m u s t b e a b l e t o r e m o v e e x i s t i n g p a t h s i f t h e y b l o c k t h e p a t h

    t o t h e e n d p o i n t . F o r t h i s p u r p o s e w e h a d t o i n t r o d u c e a n e t p r i o r i t y . A s e a r c h

    w a v e t h a t h a s t h e s a m e p r i o r i t y a s a n e x i s t i n g p a t h w i l l n o t c r o s s t h a t p a t h .

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

    b e g i n n i n g a l l n e t s s t a r t w i t h t h e s a m e p r i o r i t y . A s s o o n a s a s t a r t p o i n t d e t e c t s

    t h a t i t c a n n o t n d a p a t h t o t h e e n d p o i n t ( F i g . 1 0 ) , i t i n c r e a s e s i t s p r i o r i t y

    a n d s p r e a d s a n e w s e a r c h w a v e . T h i s n e w s e a r c h w a v e w i l l n o w c r o s s e x i s t i n g

    p a t h s w i t h l o w e r p r i o r i t y ( F i g . 1 1 ) .

    D D D D D D D

    DDDDDDD

    D D D D D D

    D D

    DDD

    DD

    DDDD

    D D D

    E 1 P 2

    P 2

    S 2

    P 2

    E 2

    S 1

    F i g u r e 1 0 : S t a r t p o i n t 1 d e t e c t s d e a d l o c k

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    8/10

    -

    -

    -

    - - - - -

    -----

    -

    -

    - -

    -

    - - - -

    -

    ---

    - -

    6

    6

    ?

    ?

    -

    E 1

    P 2

    E 2

    S 2

    P 2

    S 1

    D

    D

    -

    -

    -

    - - - - -

    -----

    -

    -

    - -

    -

    - - - -

    -

    ---

    - -

    6

    6

    ?

    ?

    -

    -

    -

    -

    -

    -

    E 1

    E 2

    S 2

    S 1

    F i g u r e 1 1 : T w o c o n s e c u t i v e g e n e r a t i o n s o f a s e c o n d s e a r c h w a v e c r o s s i n g t h e

    e x i s t i n g p a t h

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

    c l e a r e d f r o m t h e g r i d , s t a r t p o i n t 2 w h o s e p a t h w a s b r o k e n w i l l s e n d o u t a n e w

    s e a r c h w a v e ( F i g . 1 2 ) . T h e c e l l s m a r k e d w i t h " C " f o r m a c l e a r i n g w a v e t h a t

    r e m o v e s t h e w a v e m a r k s f r o m n e t 1 . T h i s c l e a r i n g w a v e r u n s o v e r t h e e l d a s

    s o o n a s t h e p a t h i s e s t a b l i s h e d ( s e e s e c t i o n 3 ) . T h e s e a r c h w a v e o f n e t 2 c a n

    o n l y p r o p a g a t e o v e r t h e e l d , a f t e r t h e w a v e m a r k s o f n e t 1 h a v e b e e n c l e a r e d .

    j j j j j j j j - - - - - - - - -

    -

    ----

    -

    -

    -

    -

    -

    -

    --

    6

    6

    ?

    ?

    -

    -

    6

    --

    S 1E 1

    S 2

    E 2

    C

    C

    C

    C

    F i g u r e 1 2 : S t a r t p o i n t 2 e m i t s a n e w s e a r c h w a v e

    T h e p r e s e n t e d a l g o r i t h m r e q u i r e s a c e l l s t a t e w i t h t h r e e c o m p o n e n t s . T h e

    r s t c o m p o n e n t d e s c r i b e s t h e s t a t e o f t h e c e l l . I n o u r i m p l e m e n t a t i o n 2 4 d i s -

    c r e t e s t a t e s a r e r e q u i r e d . T h e s e c o n d c o m p o n e n e n t s t o r e s t o w h i c h n e t t h i s c e l l

    b e l o n g s . I t s c o m p l e x i t y d e p e n d s o n t h e n u m b e r o f n e t s t h a t s h o u l d b e s i m u l -

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

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

    o f n e t s t o b e r o u t e d . A n e x a m p l e w i t h e i g h t n e t s b e i n g r o u t e d i n p a r a l l e l a n d

    4 p r i o r i t y l e v e l s w o u l d r e q u i r e 2 4 8 4 = 7 6 8 s t a t e s .

    T h i s a l g o r i t h m s t i l l i s n o t c a p a b l e o f s o l v i n g a l l p r o b l e m s . I f t h e r e a r e

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

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

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    9/10

    5 O p e n P r o b l e m s

    T h e t w o p r e s e n t e d a l g o r i t h m s o n l y d e a l w i t h t w o p o i n t n e t s . A m o r e r e a l i s t i c

    a p p r o a c h w o u l d r e q u i r e t h e p o s s i b i l i t y t o s o l v e m u l t i p o i n t p r o b l e m s . T h u s w e

    i n v e s t i g a t e d a l g o r i t h m s f o r t h e s e p r o b l e m s . U n f o r t u n a t e l y a n o p t i m a l s o l u t i o n

    w o u l d r e q u i r e t h e c o n s t r u c t i o n o f a S t e i n e r t r e e 6 ] 4 ] , w h i c h i s k n o w n a s a N P

    p r o b l e m . T h u s o u r a i m w a s t o e x p l o i t t h e i n h e r e n t p a r a l l e l i s m o f t h e c e l l u l a r

    a u t o m a t o n i n s t e a d o f o p t i m a l s o l u t i o n s .

    D i e r e n t a l g o r i t h m s w e r e i m p l e m e n t e d . T h e r s t o n e w a s e x p l o i t i n g t h e

    m a x i m u m p a r a l l e l i s m t r y i n g t o r o u t e a l l n o d e s o f a n e t s i m u l t a n e o u s l y e x c e p t

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

    t h e s e a r c h w a v e s o f t h e d i e r e n t n o d e s w e r e i n t e r f e r i n g w i t h e a c h o t h e r . T h i s

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

    c o n s i d e r a b l e t i m e w a s s p e n t t o r e u s e a l r e a d y r o u t e d p a t h s . T h e r e s u l t s w e r e

    g e n e r a l l y b e t t e r , b u t i t t o o k m u c h m o r e t i m e t h a n t h e r s t a l g o r i t h m .

    B o t h a l g o r i t h m s d o n o t p r o v i d e s a t i s f y i n g s o l u t i o n s u p t o n o w . T h u s w e a r e

    s t i l l t r y i n g t o i m p r o v e t h e a l g o r i t h m s .

    A n o t h e r p r o b l e m t h a t h a s n o t b e e n a d d r e s s e d s o f a r , a r e m u l t i l a y e r e d c o n -

    n e c t i o n s . M a y b e t h i s k i n d o f p r o b l e m c a n o n l y b e s o l v e d o n t h r e e d i m e n s i o n a l

    c e l l u l a r a u t o m a t a .

    6 C o n c l u s i o n

    B y m a p p i n g c l a s s i c a l a l g o r i t h m s o n t o t h e c e l l u l a r p r o c e s s i n g m o d e l , m o r e e -

    c i e n t a n d m o r e p a r a l l e l a l g o r i t h m s c a n b e f o u n d . I n t h i s e x a m p l e , a m o d i e d

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

    g r i d s i z e a n d n e e d s o n l y 1 4 s t a t e s ( 4 b i t s ) p e r c e l l . A l s o i n n o v a t i v e c e l l u l a r a l g o -

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

    e r a l l y s p e a k i n g , t h e a t t e m p t o f m a p p i n g c l a s s i c a l a l g o r i t h m i c p r o b l e m s o n t o

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

    m e n t a t i o n o f a l g o r i t h m s .

    R e f e r e n c e s

    1 ] C . H o c h b e r g e r a n d R . H o m a n n . C D L - a l a n g u a g e f o r c e l l u l a r p r o c e s s -

    i n g . I n G i a c o m o R . S e c h i , e d i t o r , P r o c e e d i n g s o f t h e S e c o n d I n t e r n a t i o n a l

    C o n f e r e n c e o n M a s s i v e l y P a r a l l e l C o m p u t i n g S y s t e m s , p a g e s 4 1 { 6 4 . I E E E ,

    1 9 9 6 .

    2 ] C . H o c h b e r g e r , R . H o m a n n , a n d S . W a l d s c h m i d t . C o m p i l a t i o n o f C D L f o r

    d i e r e n t t a r g e t a r c h i t e c u r e s . I n V i k t o r M a l y s h k i n , e d i t o r , P a r a l l e l C o m p u t -

    i n g T e c h n o l o g i e s , p a g e s 1 6 9 { 1 7 9 , B e r l i n , H e i d e l b e r g , 1 9 9 5 . S p r i n g e r .

    3 ] R . H o m a n n , K . - P . V o l k m a n n , a n d M . S o b o l e w s k i . T h e c e l l u l a r p r o c e s s i n g

    m a c h i n e C E P R A { 8 L . M a t h e m a t i c a l R e s e a r c h , 8 1 : 1 7 9 { 1 8 8 , 1 9 9 4 .

  • 8/3/2019 Solving Routing Problems With Cellular Automata (1996)

    10/10

    4 ] X . H o n g , T . X u e , E . S . K u h , C . - K . C h e n g , a n d J . H u a n g . P e r f o r m a n c e -

    d r i v e n s t e i n e r t r e e a l g o r i t h m s f o r g l o b a l r o u t i n g . I n A C M - S I G D A a n d I E E E ,

    e d i t o r s , P r o c e e d i n g s o f t h e 3 0 t h A C M / I E E E D e s i g n A u t o m a t i o n C o n f e r -

    e n c e , p a g e s 1 7 7 { 1 8 1 . A C M P r e s s , J u n e 1 9 9 3 .

    5 ] H u s c h a a m H u s s a i n . I n t e g r a t i o n e i n e s C o m p i l e r s f u r d i e Z e l l u l a r s p r a c h e C D L

    i n d a s X C e l l s i m { S y s t e m . M a s t e r ' s t h e s i s , T e c h n i s c h e H o c h s c h u l e D a r m -

    s t a d t , N o v e m b e r 1 9 9 4 .

    6 ] M . K a u f m a n n , S . G a o , a n d K . T h u l a s i r a m a n . O n S t e i n e r m i n i m a l t r e e s i n

    g r i d g r a p h s a n d i t s a p p l i c a t i o n t o V L S I r o u t i n g . L e c t u r e N o t e s i n C o m p u t e r

    S c i e n c e , 8 3 4 : 3 5 1 , 1 9 9 4 .

    7 ] C . Y . L e e . A n a l g o r i t h m f o r p a t h c o n n e c t i o n s a n d i t s a p p l i c a t i o n s . I R E

    T r a n s a c t i o n s o n E l e c t r o n i c C o m p u t e r s , p a g e s 3 4 6 { 3 6 5 , S e p t e m b e r 1 9 6 1 .