Assoc Parallel Journal

Embed Size (px)

Citation preview

  • 8/19/2019 Assoc Parallel Journal

    1/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 1  

    S c a l a b l e P a r a l l e l D a t a M i n i n g f o r A s s o c i a t i o n R u l e s    

    E u i - H o n g ( S a m ) H a n , G e o r g e K a r y p i s , a n d V i p i n K u m a r  

    A b s t r a c t  | I n t h i s p a p e r w e p r o p o s e t w o n e w p a r a l l e l f o r -  

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

    a s s o c i a t i o n r u l e s . T h e s e n e w f o r m u l a t i o n s , I D D  a n d  H D  , a d -  

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

    f o r m u l a t i o n s   C D  a n d  D D  . U n l i k e t h e   C D  a l g o r i t h m , t h e   I D D 

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

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

    h a s h t r e e . T h e   I D D  a l g o r i t h m a l s o e l i m i n a t e s t h e r e d u n -  

    d a n t w o r k i n h e r e n t i n   D D  , a n d r e q u i r e s s u b s t a n t i a l l y s m a l l e r  

    c o m m u n i c a t i o n o v e r h e a d t h a n   D D  . B u t   I D D  s u e r s f r o m t h e  

    a d d e d c o s t d u e t o c o m m u n i c a t i o n o f t r a n s a c t i o n s a m o n g p r o -  

    c e s s o r s . H D  i s a h y b r i d a l g o r i t h m t h a t c o m b i n e s t h e a d v a n -  

    t a g e s o f   C D  a n d  D D  . E x p e r i m e n t a l r e s u l t s o n a 1 2 8 - p r o c e s s o r  

    C r a y T 3 E s h o w t h a t   H D  s c a l e s j u s t a s w e l l a s t h e   C D  a l g o -  

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

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

    K e y w o r d s  | D a t a m i n i n g , p a r a l l e l p r o c e s s i n g , a s s o c i a t i o n  

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

    I . I n t r o d u c t i o n  

    O n e o f t h e i m p o r t a n t p r o b l e m s i n d a t a m i n i n g 1 ] i s d i s -  

    c o v e r i n g a s s o c i a t i o n r u l e s f r o m d a t a b a s e s o f t r a n s a c t i o n s ,

    w h e r e e a c h t r a n s a c t i o n c o n t a i n s a s e t o f i t e m s . T h e m o s t  

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

    c o m p u t a t i o n o f t h e f r e q u e n c i e s o f t h e o c c u r r e n c e o f s u b s e t s  

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

    a c t i o n s . S i n c e u s u a l l y s u c h t r a n s a c t i o n - b a s e d d a t a b a s e s  

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

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

    a s s o c i a t i o n r u l e d i s c o v e r y t e c h n i q u e s 2 ] , 3 ] , 4 ] , 5 ] t r y t o  

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

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

    m e a s u r e o f t h e n u m b e r o f o c c u r r e n c e s o f t h e c a n d i d a t e s i n  

    d a t a b a s e t r a n s a c t i o n s . A p r i o r i   2 ] i s a r e c e n t s t a t e - o f - t h e -  

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

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

    c a n d i d a t e o f s i z e   k  c a n m e e t t h e m i n i m u m l e v e l o f s u p -  

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

    o f s u p p o r t . I n t h e   k 

    t h 

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

    t h e o c c u r r e n c e s o f p o t e n t i a l c a n d i d a t e s o f s i z e   k  i n e a c h  

    o f t h e t r a n s a c t i o n s . T o d o t h i s t a s k e c i e n t l y , t h e a l g o -  

    r i t h m m a i n t a i n s a l l p o t e n t i a l c a n d i d a t e s o f s i z e   k  i n a h a s h  

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

    s t a y i n m a i n m e m o r y , b u t r e q u i r e s t h e h a s h t r e e s t o s t a y i n  

    m a i n m e m o r y . I f t h e e n t i r e h a s h t r e e c a n n o t t i n t h e m a i n  

    m e m o r y , t h e n t h e h a s h t r e e n e e d s t o b e p a r t i t i o n e d , a n d  

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

    p e r f o r m e d ( o n e f o r e a c h p a r t i t i o n o f t h e h a s h t r e e ) . E v e n  

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

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

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

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

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

    p r o p o s e d i n 6 ] , C o u n t D i s t r i b u t i o n   (  C D  ) a n d   D a t a D i s -  

    t r i b u t i o n   (  D D  ) . T h e   C D  a l g o r i t h m s c a l e s l i n e a r l y a n d h a s  

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

    n u m b e r o f t r a n s a c t i o n s 6 ] . H o w e v e r , t h e r e a r e t w o p r o b -  

    l e m s w i t h t h i s a l g o r i t h m . F i r s t , i t d o e s n o t p a r a l l e l i z e t h e  

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

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

    B u t o n p a r a l l e l c o m p u t a t i o n s , i t c a n b e c o m e a m a j o r b o t -  

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

    m e m o r y , t h e n t h e e x t r a d i s k I / O f o r t h e m u l t i p l e p a s s e s  

    o v e r t h e t r a n s a c t i o n d a t a b a s e c a n b e e x p e n s i v e o n m a c h i n e s  

    w i t h s l o w I / O s y s t e m s . H e n c e , t h e   C D  a l g o r i t h m , l i k e i t s  

    s e q u e n t i a l c o u n t e r p a r t   A p r i o r i  , i s u n s c a l a b l e w i t h r e s p e c t  

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

    a d d r e s s e s t h e s e p r o b l e m s o f t h e   C D  a l g o r i t h m b y p a r t i t i o n -  

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

    c e s s o r i n t h e s y s t e m . H o w e v e r , t h i s a l g o r i t h m s u e r s f r o m  

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

    h i g h c o m m u n i c a t i o n o v e r h e a d d u e t o a n i n e c i e n t s c h e m e  

    u s e d f o r d a t a m o v e m e n t . S e c o n d , t h e s c h e d u l e f o r i n t e r a c -  

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

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

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

    I n t h i s p a p e r , w e p r e s e n t t w o n e w p a r a l l e l f o r m u l a t i o n s o f  

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

    p r e s e n t   I n t e l l i g e n t D a t a D i s t r i b u t i o n   (  I D D  ) a l g o r i t h m t h a t  

    i m p r o v e s u p o n t h e   D D  a l g o r i t h m b y m i n i m i z i n g c o m m u n i -  

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

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

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

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

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

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

    t r a n s a c t i o n s . O u r s e c o n d f o r m u l a t i o n , t h e   H y b r i d D i s t r i -  

    b u t i o n   (  H D  ) a l g o r i t h m , c o m b i n e s t h e a d v a n t a g e s o f b o t h  

    t h e  C D  a l g o r i t h m a n d t h e   I D D  a l g o r i t h m b y d y n a m i c a l l y  

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

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

    t a l r e s u l t s o n a C r a y T 3 E p a r a l l e l c o m p u t e r s h o w t h a t t h e  

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

    m e m o r y e c i e n t l y .

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

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

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

    p a r a l l e l a l g o r i t h m s . S e c t i o n I V p r e s e n t s t h e p e r f o r m a n c e  

    a n a l y s i s o f t h e a l g o r i t h m s . E x p e r i m e n t a l r e s u l t s a r e s h o w n  

    i n S e c t i o n V . S e c t i o n V I c o n t a i n s c o n c l u s i o n s . A p r e l i m i -  

    n a r y v e r s i o n o f t h i s p a p e r a p p e a r e d i n 7 ] .

    I I . B a s i c C o n c e p t s  

    L e t  T  b e t h e s e t o f t r a n s a c t i o n s w h e r e e a c h t r a n s a c t i o n  

    i s a s u b s e t o f t h e i t e m - s e t   I  . L e t   C  b e a s u b s e t o f   I  , t h e n  

  • 8/19/2019 Assoc Parallel Journal

    2/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 2  

    T A B L E I  

    T r a n s a c t i o n s f r o m s u p e r m a r k e t .

    T I D I t e m s  

    1 B r e a d , C o k e , M i l k  

    2 B e e r , B r e a d  

    3 B e e r , C o k e , D i a p e r , M i l k  

    4 B e e r , B r e a d , D i a p e r , M i l k  

    5 C o k e , D i a p e r , M i l k  

    w e d e n e t h e   s u p p o r t c o u n t   o f  C  w i t h r e s p e c t t o   T  t o b e :

      (  C  ) =  j f  t  j t  2  T ; C    t  g j :

    T h u s     (  C  ) i s t h e n u m b e r o f t r a n s a c t i o n s t h a t c o n t a i n   C  .

    F o r e x a m p l e , c o n s i d e r a s e t o f t r a n s a c t i o n s f r o m s u p e r m a r -  

    k e t a s s h o w n i n T a b l e I . T h e i t e m s s e t   I  f o r t h e s e t r a n s a c -  

    t i o n s i s   f  B r e a d , B e e r , C o k e , D i a p e r , M i l k  g  . T h e s u p p o r t  

    c o u n t o f   f  D i a p e r , M i l k   g  i s    (  D i a p e r ; M i l k   ) = 3 , w h e r e a s  

      (  D i a p e r ; M i l k ; B e e r  ) = 2 .

    A n  a s s o c i a t i o n r u l e   i s a n e x p r e s s i o n o f t h e f o r m   X 

    s ;  

    =  )  Y  ,

    w h e r e   X    I  a n d  Y    I  . T h e   s u p p o r t   s  o f t h e r u l e  

    s ;  

    =  )  Y  i s d e n e d a s     (  X    Y  )  =  j T  j , a n d t h e c o n d e n c e  

      i s d e n e d a s     (  X    Y  )  =   (  X  ) . F o r e x a m p l e , c o n s i d e r a  

    r u l e   f  D i a p e r , M i l k   g  =  ) f  B e e r  g  , i . e . p r e s e n c e o f d i a p e r  

    a n d m i l k i n a t r a n s a c t i o n t e n d s t o i n d i c a t e t h e p r e s e n c e  

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

      (  D i a p e r ; M i l k ; B e e r  )  =  5 = 4 0 % . T h e c o n d e n c e o f t h i s  

    r u l e i s     (  D i a p e r ; M i l k ; B e e r  )  =   (  D i a p e r ; M i l k   ) = 6 6 % . A  

    r u l e t h a t h a s a v e r y h i g h c o n d e n c e ( i . e . , c l o s e t o 1 . 0 ) i s  

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

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

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

    f r e q u e n t t h e r u l e i s i n t h e t r a n s a c t i o n s . R u l e s t h a t h a v e  

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

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

    t h e r e a s o n s w h y m o s t a l g o r i t h m s 2 ] , 3 ] , 4 ] d i s r e g a r d a n y  

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

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

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

    d e r i v e d a s s o c i a t i o n r u l e s t o a m a n a g e a b l e s i z e . N o t e t h a t  

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

    n u m b e r o f s u b s e t s o f t h e i t e m - s e t   I  , w h i c h i s 2  

    j I  j

    . H e n c e  

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

    t i n g s .

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

    r u l e s   X 

    s ;  

    =  )  Y  , s u c h t h a t   s  i s g r e a t e r t h a n o r e q u a l t o a  

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

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

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

    s t e p i s t o d i s c o v e r a l l t h e f r e q u e n t i t e m - s e t s ( c a n d i d a t e s e t s  

    t h a t h a v e m o r e s u p p o r t t h a n t h e m i n i m u m s u p p o r t t h r e s h -  

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

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

    n d i n g t h e f r e q u e n t i t e m - s e t s i s m u c h m o r e e x p e n s i v e t h a n  

    n d i n g t h e r u l e s f r o m t h e s e f r e q u e n t i t e m - s e t s . H e n c e i n  

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

    1 . F 

    =  f  f r e q u e n t 1 - i t e m - s e t s  g  ;

    2 . f o r  ( k = 2 ; F 

    k    1 

    6=    ; k + + )  f 

    3 . C 

    = a p r i o r i g e n (  F 

    k    1 

    4 . f o r  a l l t r a n s a c t i o n s   t  2  T  f 

    5 . s u b s e t (  C 

    , t ) 

    6 . g 

    7 . F 

    =  f  c  2  C 

    j c . c o u n t     m i n s u p   g 

    8 . g 

    9 . A n s w e r =  

    S  

    F i g . 1 . A p r i o r i A l g o r i t h m  

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

    i s d i s c u s s e d i n 6 ] .

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

    f o r d i s c o v e r i n g f r e q u e n t i t e m - s e t s 8 ] , 2 ] , 3 ] . O u r p a r a l -  

    l e l a l g o r i t h m s a r e b a s e d o n t h e   A p r i o r i   a l g o r i t h m 2 ] t h a t  

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

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

    t h e  A p r i o r i   a l g o r i t h m . T h e r e a d e r s h o u l d r e f e r t o 2 ] f o r  

    f u r t h e r d e t a i l s .

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

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

    o f p a s s e s . I n i t i a l l y   F 

    c o n t a i n s a l l t h e i t e m s ( i . e . , i t e m s e t  

    o f s i z e o n e ) t h a t s a t i s f y t h e m i n i m u m s u p p o r t r e q u i r e m e n t .

    D u r i n g p a s s   k  , t h e a l g o r i t h m n d s t h e s e t o f f r e q u e n t i t e m -  

    s e t s   F 

    o f s i z e   k  t h a t s a t i s f y t h e m i n i m u m s u p p o r t r e q u i r e -  

    m e n 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   F 

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

    p a s s , t h e a l g o r i t h m r s t g e n e r a t e s   C 

    , t h e c a n d i d a t e i t e m -  

    s e t s o f s i z e   k  . F u n c t i o n   a p r i o r i g e n   (  F 

    k    1 

    ) c o n s t r u c t s   C 

    b y 

    e x t e n d i n g f r e q u e n t i t e m - s e t s o f s i z e   k    1 . T h i s e n s u r e s t h a t  

    a l l t h e s u b s e t s o f s i z e   k    1 o f a n e w c a n d i d a t e i t e m - s e t a r e  

    i n  F 

    k    1 

    . O n c e t h e c a n d i d a t e i t e m - s e t s a r e f o u n d , t h e i r f r e -  

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

    c o n t a i n t h e s e c a n d i d a t e i t e m - s e t s . F i n a l l y , F 

    i s g e n e r -  

    a t e d b y p r u n i n g   C 

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

    s m a l l e r t h a n t h e m i n i m u m s u p p o r t . T h e u n i o n o f t h e f r e -  

    q u e n t i t e m - s e t s ,

    S  

    , i s t h e f r e q u e n t i t e m - s e t s f r o m w h i c h  

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

    C o m p u t i n g t h e c o u n t s o f t h e c a n d i d a t e i t e m - s e t s i s t h e  

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

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

    m a t c h i n g o f e a c h t r a n s a c t i o n a g a i n s t e a c h c a n d i d a t e i t e m -  

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

    a c a n d i d a t e h a s h t r e e i n w h i c h t h e c a n d i d a t e i t e m - s e t s a r e  

    h a s h e d 2 ] . H e r e w e e x p l a i n t h i s v i a a n e x a m p l e t o f a c i l i t a t e  

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

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

    w i t h c a n d i d a t e s o f s i z e 3 . T h e i n t e r n a l n o d e s o f t h e h a s h  

    t r e e h a v e h a s h t a b l e s t h a t c o n t a i n l i n k s t o c h i l d n o d e s . T h e  

    l e a f n o d e s c o n t a i n t h e c a n d i d a t e i t e m - s e t s . A h a s h t r e e o f  

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

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

    c o n t a i n i n g n o c a n d i d a t e i t e m - s e t . W h e n e a c h c a n d i d a t e  

    i t e m - s e t i s g e n e r a t e d , t h e i t e m s i n t h e s e t a r e s t o r e d i n  

    s o r t e d o r d e r . N o t e t h a t s i n c e   C 

    a n d  F 

    a r e c r e a t e d i n  

  • 8/19/2019 Assoc Parallel Journal

    3/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 3  

    2,5,8

    1,4,7 3,6,9

    Hash Function

    1 2 3 5 6

    3 4 5 3 5 6

    2 3 5 6

    3 5 6

    5 6

    1 +

    2 +

    3 +

    2 3 4

    Transaction

    Candidate Hash Tree

    3 6 71 3 61 4 5

    1 2 4 1 2 5 1 5 9

    6 8 9

    3 5 7

    4 5 7 4 5 8

    3 6 8

    5 6 7

    F i g . 2 . S u b s e t o p e r a t i o n o n t h e r o o t o f a c a n d i d a t e h a s h t r e e .

    s o r t e d o r d e r , e a c h c a n d i d a t e s e t i s g e n e r a t e d i n s o r t e d o r -  

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

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

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

    l i n k s i n t h e h a s h t a b l e . O n c e a l e a f i s r e a c h e d , t h e c a n d i -  

    d a t e i t e m - s e t i s i n s e r t e d a t t h e l e a f i f t h e t o t a l n u m b e r o f  

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

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

    t h e m a x i m u m a l l o w e d a n d t h e d e p t h o f t h e l e a f i s l e s s t h a n  

    k  , t h e l e a f n o d e i s c o n v e r t e d i n t o a n i n t e r n a l n o d e a n d c h i l d  

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

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

    h a s h v a l u e s o f t h e i t e m s . F o r e x a m p l e , t h e c a n d i d a t e i t e m  

    s e t  f  1 2 4  g  i s i n s e r t e d b y h a s h i n g i t e m 1 a t t h e r o o t t o r e a c h  

    t h e l e f t c h i l d n o d e o f t h e r o o t , h a s h i n g i t e m 2 a t t h a t n o d e  

    t o r e a c h t h e m i d d l e c h i l d n o d e , h a s h i n g i t e m 3 t o r e a c h t h e  

    l e f t c h i l d n o d e w h i c h i s a l e a f n o d e .

    T h e  s u b s e t   f u n c t i o n t r a v e r s e s t h e h a s h t r e e f r o m t h e r o o t  

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

    o f a c a n d i d a t e . I n t h e n e x t l e v e l o f t h e t r e e , a l l t h e i t e m s  

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

    T h i s i s d o n e r e c u r s i v e l y u n t i l a l e a f i s r e a c h e d . A t t h i s  

    1 2 3 5 6

    3 4 5 3 5 6

    3 5 61 2 +

    1 3 + 5 6

    1 5 + 6

    2 3 5 6

    3 5 6

    5 6

    1 +

    2 +

    3 +

    2 3 4

    Transaction

    3 6 71 3 61 4 5

    1 2 4 1 2 5 1 5 9

    6 8 9

    3 5 7

    4 5 7 4 5 8

    3 6 8

    5 6 7

    Candidate Hash Tree

    F i g . 3 . S u b s e t o p e r a t i o n o n t h e l e f t m o s t s u b t r e e o f t h e r o o t o f a  

    c a n d i d a t e h a s h t r e e .

    t i m e , a l l t h e c a n d i d a t e s a t t h e l e a f a r e c h e c k e d a g a i n s t t h e  

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

    u r e 2 s h o w s t h e s u b s e t o p e r a t i o n a t t h e r s t l e v e l o f t h e  

    t r e e w i t h t r a n s a c t i o n   f  1 2 3 5 6  g  . T h e i t e m 1 i s h a s h e d t o  

    t h e l e f t c h i l d n o d e o f t h e r o o t a n d t h e f o l l o w i n g t r a n s a c -  

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

    T h e i t e m 2 i s h a s h e d t o t h e m i d d l e c h i l d n o d e o f t h e r o o t  

    a n d t h e w h o l e t r a n s a c t i o n i s c h e c k e d a g a i n s t t w o c a n d i d a t e  

    i t e m - s e t s i n t h e m i d d l e c h i l d n o d e . T h e n i t e m 3 i s h a s h e d  

    t o t h e r i g h t c h i l d n o d e o f t h e r o o t a n d t h e f o l l o w i n g t r a n s -  

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

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

    o f t h e r o o t . H e r e t h e i t e m s 2 a n d 5 a r e h a s h e d t o t h e m i d -  

    d l e c h i l d n o d e a n d t h e f o l l o w i n g t r a n s a c t i o n s   f  3 5 6  g  a n d 

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

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

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

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

    I I I . P a r a l l e l A l g o r i t h m s  

    I n t h i s s e c t i o n , w e w i l l f o c u s o n t h e p a r a l l e l i z a t i o n o f t h e  

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

    p a r a l l e l a l g o r i t h m s p r o p o s e d i n 6 ] t o h e l p m o t i v a t e o u r  

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

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

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

    A . C o u n t D i s t r i b u t i o n A l g o r i t h m  

    I n t h e   C o u n t D i s t r i b u t i o n   (  C D  ) a l g o r i t h m p r o p o s e d  

    i n 6 ] , e a c h p r o c e s s o r c o m p u t e s h o w m a n y t i m e s a l l t h e c a n -  

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

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

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

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

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

  • 8/19/2019 Assoc Parallel Journal

    4/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 4  

    i n d i v i d u a l c o u n t s u s i n g a g l o b a l r e d u c t i o n o p e r a t i o n 9 ] .

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

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

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

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

    C D  a l g o r i t h m e x e c u t e s t h e s e r i a l   A p r i o r i   a l g o r i t h m o n t h e  

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

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

    n u m b e r o f t r a n s a c t i o n s 6 ] . T h i s i s b e c a u s e e a c h p r o c e s s o r  

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

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

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

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

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

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

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

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

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

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

    t h e h a s h t r e e . T h e c o s t o f e x t r a d a t a b a s e s c a n n i n g c a n b e  

    e x p e n s i v e i n t h e m a c h i n e s w i t h s l o w I / O s y s t e m . N o t e t h a t  

    t h e n u m b e r o f c a n d i d a t e s i n c r e a s e s i f e i t h e r t h e n u m b e r o f  

    d i s t i n c t i t e m s i n t h e d a t a b a s e i n c r e a s e s o r i f t h e m i n i m u m  

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

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

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

    B . D a t a D i s t r i b u t i o n A l g o r i t h m  

    T h e  D a t a D i s t r i b u t i o n   (  D D  ) a l g o r i t h m 6 ] a d d r e s s e s t h e  

    m e m o r y p r o b l e m o f t h e   C D  a l g o r i t h m b y p a r t i t i o n i n g t h e  

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

    i n g i s d o n e i n a r o u n d r o b i n f a s h i o n . E a c h p r o c e s s o r i s  

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

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

    t h e d a t a b a s e . I n o r d e r t o d o t h a t , e a c h p r o c e s s o r n e e d s t o  

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

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

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

    p r o c e s s o r r e c e i v e t h e p o r t i o n s o f t h e t r a n s a c t i o n s s t o r e d i n  

    t h e o t h e r p r o c e s s o r s a s f o l l o w s . E a c h p r o c e s s o r a l l o c a t e s  

    P  b u e r s ( e a c h o n e p a g e l o n g a n d o n e f o r e a c h p r o c e s s o r ) .

    A t p r o c e s s o r   P 

    , t h e   i 

    t h 

    b u e r i s u s e d t o s t o r e t r a n s a c t i o n s  

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

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

    N o w e a c h p r o c e s s o r   P 

    c h e c k s t h e   P  b u e r s t o s e e w h i c h  

    o n e c o n t a i n s d a t a . L e t   l  b e t h i s b u e r ( t i e s a r e b r o k e n i n  

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

    o f o t h e r p r o c e s s o r s a r e b r o k e n a r b i t r a r i l y ) . T h e p r o c e s -  

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

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

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

    l  =  i  ) , t h e n i t i s s e n t t o a l l t h e o t h e r p r o c e s s o r s ( v i a a s y n -  

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

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

    t r a n s a c t i o n s f r o m a n o t h e r p r o c e s s o r ( i . e . , l  6=  i  ) , t h e n i t i s  

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

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

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

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

    e a c h p r o c e s s o r n d s t h e f r e q u e n t i t e m - s e t s f r o m i t s c a n d i -  

    d a t e i t e m - s e t a n d t h e s e f r e q u e n t i t e m - s e t s a r e s e n t t o e v e r y  

    o t h e r p r o c e s s o r u s i n g a n a l l - t o - a l l b r o a d c a s t o p e r a t i o n 9 ] .

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

    N o t e t h a t e a c h p r o c e s s o r h a s a d i e r e n t s e t o f c a n d i d a t e s  

    i n t h e c a n d i d a t e h a s h t r e e .

    T h i s a l g o r i t h m e x p l o i t s t h e t o t a l a v a i l a b l e m e m o r y b e t -  

    t e r t h a n   C D  , a s i t p a r t i t i o n s t h e c a n d i d a t e s e t a m o n g p r o -  

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

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

    H o w e v e r , a s r e p o r t e d i n 6 ] , t h e p e r f o r m a n c e o f t h i s a l g o -  

    r i t h m i s s i g n i c a n t l y w o r s e t h a n t h e   C D  a l g o r i t h m . T h e  

    r u n t i m e o f t h i s a l g o r i t h m i s 1 0 t o 2 0 t i m e s m o r e t h a n t h a t  

    o f t h e   C D  a l g o r i t h m o n 1 6 p r o c e s s o r s 6 ] . T h e p r o b l e m  

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

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

    t r a n s a c t i o n s .

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

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

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

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

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

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

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

    i s s u e s a r e c e i v e o p e r a t i o n f r o m e a c h o t h e r p r o c e s s o r i n o r -  

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

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

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

    e a c h p r o c e s s o r c a n r e c e i v e d a t a o n a l l i n c o m i n g l i n k s s i -  

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

    t o a v e r y g o o d p e r f o r m a n c e . I n p a r t i c u l a r , i f   O  (  N = P  ) i s 

    t h e s i z e o f t h e d a t a b a s e a s s i g n e d l o c a l l y t o e a c h p r o c e s -  

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

    b e  O  (  N = P  ) . H o w e v e r , e v e n o n t h e p a r a l l e l c o m p u t e r w i t h  

    f u l l y c o n n e c t e d n e t w o r k , i f e a c h p r o c e s s o r c a n r e c e i v e d a t a  

    f r o m ( o r s e n d d a t a t o ) o n l y o n e o t h e r p r o c e s s o r a t a t i m e ,

    t h e n t h e c o m m u n i c a t i o n w i l l b e   O  (  N  ) . O n a l l r e a l i s t i c p a r -  

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

    n e t w o r k s ( s u c h a s 2 D , 3 D o r h y p e r c u b e ) a n d a p r o c e s s o r  

    c a n r e c e i v e d a t a f r o m ( o r s e n d d a t a t o ) o n l y o n e o t h e r  

    p r o c e s s o r a t a t i m e . O n s u c h m a c h i n e s , t h i s c o m m u n i c a -  

    t i o n p a t t e r n w i l l t a k e s i g n i c a n t l y m o r e t h a n   O  (  N  ) t i m e  

    b e c a u s e o f c o n t e n t i o n w i t h i n t h e n e t w o r k .

    S e c o n d , i n a r c h i t e c t u r e s w i t h o u t a s y n c h r o n o u s c o m m u -  

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

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

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

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

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

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

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

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

    T h i r d , i f w e l o o k a t t h e s i z e o f t h e c a n d i d a t e s e t s a s a  

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

    t h a t i n t h e r s t f e w p a s s e s , t h e s i z e o f t h e c a n d i d a t e s e t s  

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

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

  • 8/19/2019 Assoc Parallel Journal

    5/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 5  

     2{1, 2}

    {1, 3}

    {2, 3}

    {2, 4}

    {3, 4}

    {4, 5}

     5

     3

     2

    Proc 0 Proc 1 Proc 2 Proc 3

    N/P

    Data

    Count

    N/P

    Data

    Count

    N/P

    Data

    Count

    N/P

    Data

    Count

    N: number of data items

    M: size of candidate set

    P: number of processors

    Global Reduction

    Candidate Hash Tree Candidate Hash Tree Candidate Hash Tree Candidate Hash Tree

    7 {1, 2}

    {1, 3}

    {2, 3}

    {2, 4}

    {3, 4}

    {4, 5}

     3

    1

    1

     3

     9

    0{1, 2}

    {1, 3}

    {2, 3}

    {2, 4}

    {3, 4}

    {4, 5}

     2

    8

     2

     3{1, 2}

    {1, 3}

    {2, 3}

    {2, 4}

    {3, 4}

    {4, 5}

     4

     2

    0

    M M M M

    F i g . 4 . C o u n t D i s t r i b u t i o n ( C D ) A l g o r i t h m  

    Proc 0 Proc 1 Proc 2 Proc 3

    N/P N/P N/P

    M/P M/P M/P M/P

    Local Data Remote Data

    CountCount

    Local Data Remote Data

    CountCount

    Local Data Remote Data

    CountCount

    Local Data Remote Data

    CountCount

    N/PData

    N: number of data items

    M: size of candidate set

    P: number of processors

    Data Data

    Broadcast Broadcast Broadcast

    All-to-all Broadcast

    Data

    Broadcast Broadca

    Data

    Candidate Hash Tree Candidate Hash Tree Candidate Hash Tree Candidate Hash Tree

    {1, 3}

    {3, 4}

    {4, 7}

     9

     2

     3

    {1, 4}

    {3, 5}

    {5, 6}

     5

    1

     2

    {2, 3}

    {4, 5}

    {5, 7}

     4

    {1, 2}

    {2, 5}

    {4, 6}

     3

     5

    F i g . 5 . D a t a D i s t r i b u t i o n ( D D ) A l g o r i t h m  

  • 8/19/2019 Assoc Parallel Journal

    6/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 6  

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

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

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

    T h u s , e v e n t h o u g h t h e c o m p u t a t i o n d e c r e a s e s , t h e a m o u n t  

    o f c o m m u n i c a t i o n r e m a i n s t h e s a m e .

    T h e r e d u n d a n t w o r k i s i n t r o d u c e d d u e t o t h e f a c t t h a t  

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

    t h e d a t a b a s e . I n   C D  ( s e e F i g u r e 4 ) , o n l y   N = P  t r a n s a c t i o n s  

    g o t h r o u g h e a c h h a s h t r e e o f  M  c a n d i d a t e s , w h e r e a s i n   D D 

    ( s e e F i g u r e 5 ) , a l l   N  t r a n s a c t i o n s h a v e t o g o t h r o u g h e a c h  

    h a s h t r e e o f   M = P  c a n d i d a t e s . A l t h o u g h , t h e n u m b e r o f  

    c a n d i d a t e s s t o r e d a t e a c h p r o c e s s o r h a s b e e n r e d u c e d b y  

    a f a c t o r o f   P  , t h e a m o u n t o f c o m p u t a t i o n p e r f o r m e d f o r  

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

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

    c h e c k e d a g a i n s t t h e h a s h t r e e o f   M = P  c a n d i d a t e s i s 1  = P 

    o f t h a t o f t h e h a s h t r e e o f   M  c a n d i d a t e s , t h e n t h e r e i s n o  

    e x t r a w o r k . A s d i s c u s s e d i n S e c t i o n I V , i n g e n e r a l , t h e  

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

    m u c h s m a l l e r t h a n   P  .

    C . I n t e l l i g e n t D a t a D i s t r i b u t i o n A l g o r i t h m  

    W e d e v e l o p e d t h e   I n t e l l i g e n t D a t a D i s t r i b u t i o n   (  I D D  ) a l -  

    g o r i t h m t h a t s o l v e s t h e p r o b l e m s o f t h e   D D  a l g o r i t h m d i s -  

    c u s s e d i n S e c t i o n I I I - B . I n   I D D  , t h e l o c a l l y s t o r e d p o r t i o n s  

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

    a r i n g - b a s e d a l l - t o - a l l b r o a d c a s t d e s c r i b e d i n 9 ] . T h i s o p -  

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

    D D  a l g o r i t h m a n d i t t a k e s   O  (  N  ) t i m e o n a n y p a r a l l e l a r c h i -  

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

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

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

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

    p r o c e s s o r h a s o n e s e n d b u e r ( S B u f ) a n d o n e r e c e i v e b u e r  

    ( R B u f ) . I n i t i a l l y , t h e S B u f i s l l e d w i t h o n e b l o c k o f l o c a l  

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

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

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

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

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

    S B u f a n d c o l l e c t s t h e c o u n t s o f t h e c a n d i d a t e s a s s i g n e d t o  

    t h e p r o c e s s o r . A f t e r t h i s o p e r a t i o n , e a c h p r o c e s s o r w a i t s  

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

    r o l e s o f S B u f a n d R B u f a r e s w i t c h e d a n d t h e a b o v e o p e r a -  

    t i o n s c o n t i n u e f o r   P    1 t i m e s . C o m p a r e d t o   D D  , w h e r e a l l  

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

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

    t h u s e l i m i n a t i n g a n y c o m m u n i c a t i o n c o n t e n t i o n . F u r t h e r -  

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

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

    I n o r d e r t o e l i m i n a t e t h e r e d u n d a n t w o r k d u e t o t h e p a r -  

    t i t i o n i n g o f t h e c a n d i d a t e i t e m - s e t s , w e m u s t n d a f a s t w a y  

    t o c h e c k w h e t h e r a g i v e n t r a n s a c t i o n c a n p o t e n t i a l l y c o n -  

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

    c a n n o t b e d o n e b y p a r t i t i o n i n g   C 

    i n a r o u n d - r o b i n f a s h i o n .

    H o w e v e r , i f w e p a r t i t i o n   C 

    a m o n g p r o c e s s o r s i n s u c h a w a y  

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

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

    w h i l e ( ! d o n e )   f 

    F i l l B u e r ( f d , S B u f ) ;

    f o r ( k = 0 ; k  

  • 8/19/2019 Assoc Parallel Journal

    7/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 7  

    Proc 0 Proc 1 Proc 2 Proc 3

    N/P N/P N/P

    Local Data Remote Data Local Data Remote Data Local Data Remote Data Local Data Remote Data

    N/PData DataData

    N: number of data items

    M: size of candidate set

    P: number of processors

    Shift Shift Shift

    Data

    Shift

    Data

    Shift

    M/P M/P M/P M/P

    2, 5 3, 64

    All-to-all Broadcast

    Count Count

    1, 7

    Count Count Count Count Count Count

    Candidate Hash Tree Candidate Hash TreeCandidate Hash Tree Candidate Hash Tree

    Bit Map Bit Map Bit Map Bit Map

    {2, 3}

    {2, 5}

    {5, 6}

     2

     9

    {4, 5}

    {4, 6}

    {4, 7}

     2

     9

    {3, 4}

    {3, 5}

    {6, 7}

     2

     9

    {1, 2}

    {1, 3}

    {7, 8}

     2

     9

    F i g . 7 . I n t e l l i g e n t D a t a D i s t r i b u t i o n ( I D D ) A l g o r i t h m  

    3 4 5

    1 2 3 5 6

    2 3 5 6

    3 5 6

    5 6

    1 +

    2 +

    3 +

    Candidate Hash Tree

    3 6 71 3 61 4 5

    1 2 4 1 2 5 1 5 9

    Transaction

    5 6 7

    Skipped!! bitmap

    1, 3, 5

    3 6 83 5 7

    3 5 6

    F i g . 8 . S u b s e t o p e r a t i o n o n t h e r o o t o f a c a n d i d a t e h a s h t r e e i n I D D .

    O n e o f t h e c r i t e r i a o f a g o o d p a r t i t i o n i n g i n v o l v e d h e r e i s  

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

    s o r s . T h i s g i v e s a b o u t t h e s a m e s i z e h a s h t r e e i n a l l t h e  

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

    p r o c e s s o r s . N o t e t h a t i n t h e   D D  a l g o r i t h m , t h i s w a s a c c o m -  

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

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

    l e a d t o a s i g n i c a n t l o a d i m b a l a n c e . F o r i n s t a n c e , c o n s i d e r  

    a d a t a b a s e w i t h 1 0 0 d i s t i n c t i t e m s n u m b e r e d f r o m 1 t o 1 0 0  

    a n d t h a t t h e d a t a b a s e t r a n s a c t i o n s h a v e m o r e d a t a i t e m s  

    n u m b e r e d w i t h 1 t o 5 0 . I f w e p a r t i t i o n t h e c a n d i d a t e s b e -  

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

    w i t h i t e m s 1 t o 5 0 t o p r o c e s s o r   P 

    a n d c a n d i d a t e s s t a r t i n g  

    w i t h i t e m s 5 1 t o 1 0 0 t o p r o c e s s o r   P 

    , t h e n t h e r e w o u l d b e  

    m o r e w o r k f o r p r o c e s s o r   P 

    .

    T o a c h i e v e a n e q u a l d i s t r i b u t i o n o f t h e c a n d i d a t e i t e m -  

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

    p a c k i n g 1 0 ] . F o r e a c h i t e m , w e r s t c o m p u t e t h e n u m b e r o f  

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

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

    i t e m - s e t s , b u t j u s t s t o r e t h e n u m b e r o f c a n d i d a t e i t e m - s e t s  

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

    r i t h m t o p a r t i t i o n t h e s e i t e m s i n   P  b u c k e t s s u c h t h a t t h e  

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

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

    c a t i o n o f e a c h c a n d i d a t e i t e m - s e t i s d e t e r m i n e d , t h e n e a c h  

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

    t h a t a r e a s s i g n e d t o t h i s p r o c e s s o r . N o t e t h a t b i n - p a c k i n g  

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

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

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

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

    N o t e t h a t t h i s s c h e m e w i l l n o t b e a b l e t o a c h i e v e a n  

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

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

    i f t h e r e a r e m o r e t h a n   M = P  c a n d i d a t e s s t a r t i n g w i t h t h e  

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

    i n g w i t h t h i s i t e m w i l l h a v e m o r e t h a n   M = P  c a n d i d a t e s  

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

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

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

  • 8/19/2019 Assoc Parallel Journal

    8/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 8  

    m o r e t h a n t h e r s t i t e m s o f t h e c a n d i d a t e i t e m s e t s . I n  

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

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

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

    c a n d i d a t e i t e m s e t s .

    N o t e t h a t t h e e q u a l a s s i g n m e n t o f c a n d i d a t e s t o t h e p r o -  

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

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

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

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

    i t e m s i n t h e t r a n s a c t i o n s . H o w e v e r , i n o u r e x p e r i m e n t s ,

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

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

    e a c h p r o c e s s o r . F o r e x a m p l e , w i t h 4 p r o c e s s o r s , w e w e r e  

    a b l e t o o b t a i n t h e t h e l o a d i m b a l a n c e o f 1 . 3 % i n t e r m s  

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

    5 . 4 % l o a d i m b a l a n c e i n t h e a c t u a l c o m p u t a t i o n t i m e . W i t h  

    8 p r o c e s s o r s , w e h a d 2 . 3 % l o a d i m b a l a n c e i n t h e n u m b e r o f  

    c a n d i d a t e s e t s , a n d t h i s r e s u l t e d i n 9 . 4 % l o a d i m b a l a n c e i n  

    t h e c o m p u t a t i o n t i m e . S i n c e t h e e e c t o f t r a n s a c t i o n s o n  

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

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

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

    D . H y b r i d A l g o r i t h m  

    T h e  I D D  a l g o r i t h m e x p l o i t s t h e t o t a l s y s t e m m e m o r y b y  

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

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

    M = P  , w h e r e   M  i s t h e n u m b e r o f t o t a l c a n d i d a t e s . A s m o r e  

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

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

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

    m o r e d i c u l t t o b a l a n c e t h e w o r k . S e c o n d , t h e s m a l l e r  

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

    c o m p u t a t i o n w o r k p e r t r a n s a c t i o n . E v e n t u a l l y t h e a m o u n t  

    o f c o m p u t a t i o n m a y b e c o m e l e s s t h a n t h e c o m m u n i c a t i o n  

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

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

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

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

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

    T h e  H y b r i d D i s t r i b u t i o n   (  H D  ) a l g o r i t h m a d d r e s s e s t h e  

    a b o v e p r o b l e m b y c o m b i n i n g t h e   C D  a n d t h e   I D D  a l g o -  

    r i t h m s i n t h e f o l l o w i n g w a y . C o n s i d e r a   P  - p r o c e s s o r s y s t e m  

    i n w h i c h t h e p r o c e s s o r s a r e s p l i t i n t o   G  e q u a l s i z e g r o u p s ,

    e a c h c o n t a i n i n g   P = G  p r o c e s s o r s . I n t h e   H D  a l g o r i t h m , w e  

    e x e c u t e t h e   C D  a l g o r i t h m a s i f t h e r e w e r e o n l y   P = G  p r o c e s -  

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

    i n t o   P = G  p a r t s e a c h o f s i z e   N =  (  P = G  ) , a n d a s s i g n t h e t a s k  

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

    f o r e a c h  

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

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

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

    c a n d i d a t e s e t   C 

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

    e a c h g r o u p , s o t h a t e a c h p r o c e s s o r g e t s r o u g h l y   j C 

    j = G  c a n -  

    d i d a t e i t e m - s e t s a n d   N = P  t r a n s a c t i o n s . N o w , e a c h g r o u p o f  

    p r o c e s s o r s c o m p u t e s t h e c o u n t s u s i n g t h e   I D D  a l g o r i t h m ,

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

    d u c t i o n o p e r a t i o n a m o n g t h e   P = G  g r o u p s o f p r o c e s s o r s .

    T h e  H D  a l g o r i t h m c a n b e b e t t e r v i s u a l i z e d i f w e t h i n k o f  

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

    o f  G  r o w s a n d   P = G  c o l u m n s . T h e t r a n s a c t i o n s a r e p a r t i -  

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

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

    t h i s g r i d . T h i s p a r t i t i o n i n g o f   C 

    i s i d e n t i c a l f o r e a c h c o l -  

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

    g r i d g e t t h e s a m e s u b s e t o f  C 

    . F i g u r e 9 i l l u s t r a t e s t h e   H D 

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

    H D  a l g o r i t h m e x e c u t e s t h e   C D  a l g o r i t h m a s i f t h e r e w e r e  

    o n l y 4 p r o c e s s o r s , w h e r e t h e 4 p r o c e s s o r s c o r r e s p o n d t o t h e  

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

    p a r t i t i o n e d i n 4 p a r t s , a n d e a c h o n e o f t h e s e 4 h y p o t h e t i -  

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

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

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

    S e c t i o n I I I - A . H o w e v e r , s i n c e e a c h o n e o f t h e s e h y p o t h e t i -  

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

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

    c a l p r o c e s s o r r e q u i r e s t h e c o m p u t a t i o n o f t h e c o u n t s o f t h e  

    c a n d i d a t e i t e m - s e t s o n t h e d a t a b a s e t r a n s a c t i o n s s i t t i n g o n  

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

    t h e  I D D  a l g o r i t h m w i t h i n e a c h o f 4 h y p o t h e t i c a l p r o c e s s o r s .

    T h i s i s s h o w n i n t h e s t e p 1 o f F i g u r e 9 . N o t e t h a t p r o c e s -  

    s o r s i n t h e s a m e r o w h a v e e x a c t l y t h e s a m e c a n d i d a t e s , a n d  

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

    c a n d i d a t e s e t . A t t h e e n d o f t h i s o p e r a t i o n , e a c h p r o c e s s o r  

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

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

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

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

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

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

    c a n d i d a t e i t e m - s e t c o r r e s p o n d s t o t h e e n t i r e d a t a b a s e o f  

    t r a n s a c t i o n s . N o w e a c h p r o c e s s o r n d s f r e q u e n t i t e m - s e t s  

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

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

    c a n d i d a t e i t e m - s e t s a r e s h o w n a s s h a d e d i n F i g u r e 9 ( b ) . I n  

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

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

    t h i s p o i n t , a l l t h e p r o c e s s o r s h a v e t h e f r e q u e n t s e t s a n d a r e  

    r e a d y t o p r o c e e d t o t h e n e x t p a s s .

    T h e  H D  a l g o r i t h m d e t e r m i n e s t h e c o n g u r a t i o n o f t h e  

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

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

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

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

    d a t e s   M  i s l e s s t h a n   m  , t h e n t h e   H D  a l g o r i t h m m a k e s   G 

    e q u a l t o 1 , w h i c h m e a n s t h a t t h e   C D  a l g o r i t h m i s r u n o n  

    a l l t h e p r o c e s s o r s . O t h e r w i s e   G  i s s e t t o   d  M = m  e  . T a b l e I I  

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

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

    6 4 p r o c e s s o r s a n d   m  = 5 0  K  .

    T h e  H D  a l g o r i t h m i n h e r i t s a l l t h e g o o d f e a t u r e s o f t h e  

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

    e n o u g h c o m p u t a t i o n w o r k b y m a i n t a i n i n g m i n i m u m n u m -  

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

  • 8/19/2019 Assoc Parallel Journal

    9/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 9  

    1, 2

    4, 5

    7, 8

    1

    0

     3

    2, 3

    8, 9

    5, 6

     3

    1

     2

    6, 8

    6, 7

    3, 4   0

     2

     3

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    8, 9

    7, 8   9

    8

    Frequent Item Set

    All-to-allBroadcast

    All-to-allBroadcast

    All-to-allBroadcast

    All-to-allBroadcast

    Step 2: Reduction Operation Along the Rows

    Step 3: All-to-all Broadcast Operation Along the Columns

    Step 1: Partitioning of Candidate Sets and Data Movement Along the Columns

    Data Shift

    Data Shift

    Data Shift

    Data Shift

    Data Shift

    Data Shift

    Candidate Hash Tree

    Candidate Hash Tree

    Candidate Hash Tree

    Data Shift

    Data Shift

    Candidate Hash Tree

    Candidate Hash Tree

    Candidate Hash Tree

    Candidate Hash Tree

    Candidate Hash Tree

    Candidate Hash Tree

    Candidate Hash Tree

    Candidate Hash Tree

    Candidate Hash Tree

    Data Shift Data Shift Data Shift Data Shift

    1, 2

    4, 5

    7, 8

    0

    1

     2

    2, 3

    8, 9

    5, 6

    0

    1

     2

    6, 8

    6, 7

    3, 4   1

     4

    0

    1, 2

    4, 5

    7, 8

     2

     3

    1

    2, 3

    8, 9

    5, 6

    0

    0

     2

    6, 8

    6, 7

    3, 4   0

    1

    1 6, 8

    6, 7

    3, 4   1

    0

    1

    2, 3

    8, 9

    5, 6

    1

    1

     2

    1, 2

    4, 5

    7, 8

    0

     2

     3

    Candidate Hash Tree Candidate Hash TreeCandidate Hash TreeCandidate Hash Tree

    Candidate Hash Tree Candidate Hash TreeCandidate Hash TreeCandidate Hash Tree

    Candidate Hash Tree Candidate Hash TreeCandidate Hash TreeCandidate Hash Tree

    6, 8

    6, 7

    3, 4   2

     5 6, 8

    6, 7

    3, 4   2

     5 6, 8

    6, 7

    3, 4   2

     5 6, 8

    6, 7

    3, 4   2

     5

    1, 2

    4, 5

    7, 8

     3

     9

    1, 2

    4, 5

    7, 8

     3

     9

    1, 2

    4, 5

    7, 8

     3

     9

    1, 2

    4, 5

    7, 8

     3

     9

    2, 3

    8, 9

    5, 6

     4

     3

    8

    2, 3

    8, 9

    5, 6

     4

     3

    8

    2, 3

    8, 9

    5, 6

     4

     3

    8

    2, 3

    8, 9

    5, 6

     4

     3

    8

    F i g . 9 . H y b r i d D i s t r i b u t i o n ( H D ) A l g o r i t h m i n 3     4 P r o c e s s o r M e s h (  G  = 3  ; P  = 1 2 )  

  • 8/19/2019 Assoc Parallel Journal

    10/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 1 0  

    T A B L E I I  

    P r o c e s s o r c o n f i g u r a t i o n a n d n u m b e r o f c a n d i d a t e s o f t h e   H D  a l g o r i t h m w i t h 6 4 p r o c e s s o r s a n d w i t h   m  = 5 0  K  a t e a c h p a s s .

    N o t e t h a t   6 4    1  c o n f i g u r a t i o n i s t h e s a m e a s t h e   I D D  a l g o r i t h m a n d   1    6 4  i s t h e s a m e a s t h e   C D  a l g o r i t h m . T h e t o t a l  

    n u m b e r o f p a s s w a s 1 3 a n d a l l p a s s e s a f t e r 6 h a d   1    6 4  c o n f i g u r a t i o n .

    P a s s 2 3 4 5 6 7  

    C o n g u r a t i o n 8     8 6 4    1 4    1 6 2    3 2 2    3 2 1    6 4 

    N o o f C a n d . 3 5 1 K 4 3 4 8 K 1 1 5 K 7 6 K 5 6 K 3 4 K  

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

    d o w n t o 1  = G  o f t h e   I D D  .

    E . O t h e r P a r a l l e l A l g o r i t h m s  

    I n a d d i t i o n t o   C D  a n d  D D  , f o u r p a r a l l e l a l g o r i t h m s  

    (  N P A  , S P A  , H P A  a n d  H P A - E L D   ) f o r m i n i n g a s s o c i a t i o n  

    r u l e s w e r e p r o p o s e d i n 1 1 ] . N P A  i s v e r y s i m i l a r t o   C D 

    a n d  S P A  i s v e r y s i m i l a r t o   D D  . H P A  a n d  H P A - E L D   b o t h  

    h a v e s o m e s i m i l a r i t i e s w i t h   I D D  , a s a l l 3 a l g o r i t h m s e s -  

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

    D D  . H o w e v e r , t h e a p p r o a c h t a k e n i n   H P A  ( a n d   H P A - E L D   ) 

    i s q u i t e d i e r e n t t h a n t h a t t a k e n i n   I D D  . I n p a s s   k  o f  H P A  ,

    f o r e a c h t r a n s a c t i o n c o n t a i n i n g   I  i t e m s , C  = 

      

     

    p o - 

    t e n t i a l c a n d i d a t e s o f s i z e   k  a r e g e n e r a t e d . E a c h o f t h e s e  

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

    s o r m i g h t c o n t a i n t h e c a n d i d a t e i t e m s e t m a t c h i n g t h e s e  

    p o t e n t i a l c a n d i d a t e . T h e s e   C  p o t e n t i a l c a n d i d a t e s a r e s e n t  

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

    c h e c k s t h e s e p o t e n t i a l c a n d i d a t e s c o l l e c t e d f r o m a l l t h e p r o -  

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

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

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

    i t d i c u l t t o e n s u r e t h a t e a c h p r o c e s s o r r e c e i v e s e q u a l n u m -  

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

    c a n d i d a t e s o f s i z e   k  g e n e r a t e d f o r a t r a n s a c t i o n c o n t a i n i n g  

    I  i t e m s i s   O  ( 

      

     

    ) . H e n c e , f o r v a l u e s o f   k  g r e a t e r t h a n  

    2 , H P A  c a n h a v e m u c h l a r g e r c o m m u n i c a t i o n v o l u m e t h a n  

    t h a t f o r   D D  a n d  I D D  . F o r s m a l l v a l u e s o f   k  ( e . g . , k  = 2 ) , i t  

    i s p o s s i b l e f o r   H P A  t o i n c u r s m a l l e r c o m m u n i c a t i o n o v e r -  

    h e a d t h a n   I D D  .

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

    o f a s s o c i a t i o n r u l e a l g o r i t h m s 1 2 ] , 1 3 ] , 1 4 ] . P a r k , C h e n ,

    a n d Y u p r o p o s e d   P D M  1 2 ] , a p a r a l l e l f o r m u l a t i o n o f t h e s e -  

    r i a l a s s o c i a t i o n r u l e a l g o r i t h m   D H P  1 5 ] . P D M  i s s i m i l a r i n  

    n a t u r e t o t h e   C D  a l g o r i t h m . I n 1 4 ] , Z a k i e t . a l . p r e s e n t e d  

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

    i n 1 6 ] . T h i s s e r i a l a l g o r i t h m i s o f e n t i r e l y d i e r e n t n a -  

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

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

    I V . P e r f o r m a n c e A n a l y s i s  

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

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

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

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

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

    a l s o i n c r e a s e d 9 ] . L e t   T 

    s e r i a l

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

    a l g o r i t h m a n d   T 

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

    E c i e n c y 9 ] (  E  ) o f a p a r a l l e l a l g o r i t h m i s  

    E  = 

    s e r i a l

    P    T 

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

    a n d  T 

    s e r i a l

    r e - 

    m a i n o f t h e s a m e o r d e r 9 ] . T h e p r o b l e m s i z e ( i . e . , t h e  

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

    b y i n c r e a s i n g   N  o r b y i n c r e a s i n g   M  ( a s a r e s u l t o f l o w e r -  

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

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

    s e c t i o n .

    A s d i s c u s s e d i n S e c t i o n I I , e a c h i t e r a t i o n o f t h e a l g o -  

    r i t h m c o n s i s t s o f t w o s t e p s : ( i ) c a n d i d a t e g e n e r a t i o n a n d  

    h a s h t r e e c o n s t r u c t i o n ( i i ) c o m p u t a t i o n o f   s u b s e t   f u n c t i o n  

    f o r e a c h t r a n s a c t i o n . T h e d e r i v a t i o n o f t h e r u n t i m e o f t h e  

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

    t i o n t h a t h a s   I  i t e m s . D u r i n g t h e   k 

    t h 

    p a s s o f t h e a l g o r i t h m ,

    t h i s t r a n s a c t i o n h a s   C  = 

      

     

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

    n e e d t o b e c h e c k e d a g a i n s t t h e c a n d i d a t e h a s h t r e e . N o t e  

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

    c a n d i d a t e l e a d s t o a v i s i t t o a l e a f n o d e , t h e n a l l t h e c a n d i -  

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

    A s a r e s u l t , i f t h i s n o d e i s r e v i s i t e d d u e t o a d i e r e n t c a n -  

    d i d a t e f r o m t h e s a m e t r a n s a c t i o n , n o c h e c k i n g n e e d s t o  

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

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

    n o d e s v i s i t e d w i t h t h e t r a n s a c t i o n . W e a s s u m e t h a t t h e a v -  

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

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

    L  =  M = S  . I n t h e i m p l e m e n t a t i o n o f t h e a l g o r i t h m , t h e d e -  

    s i r e d v a l u e o f   S  c a n b e o b t a i n e d b y a d j u s t i n g t h e b r a n c h i n g  

    f a c t o r o f t h e h a s h t r e e . I n g e n e r a l , t h e c o s t o f t r a v e r s a l f o r  

    e a c h p o t e n t i a l c a n d i d a t e w i l l d e p e n d o n t h e d e p t h o f t h e  

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

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

    i s t h e s a m e . H e n c e , t h e t o t a l t r a v e r s a l c o s t i s d i r e c t l y p r o -  

    p o r t i o n a l t o   C  . F o r e a c h p o t e n t i a l c a n d i d a t e , w e d e n e  

    t r a v e r s  

    t o b e t h e c o s t a s s o c i a t e d w i t h t h e t r a v e r s a l o f t h e  

    h a s h t r e e a n d   t 

    c h e c k  

    t o b e t h e c o s t a s s o c i a t e d w i t h c h e c k i n g  

    t h e c a n d i d a t e i t e m - s e t s o f t h e r e a c h e d l e a f n o d e .

    N o t e t h a t t h e n u m b e r o f d i s t i n c t l e a v e s c h e c k e d b y a  

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

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

    c a n d i d a t e s m a y l e a d t o t h e s a m e l e a f n o d e . I n g e n e r a l , i f   C 

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

  • 8/19/2019 Assoc Parallel Journal

    11/16

  • 8/19/2019 Assoc Parallel Journal

    12/16

    I E E E T R A N S A C T I O N S O N K N O W L E D G E A N D D A T A E N G I N E E R I N G , V O L . X X , N O . Y , M O N T H 1 9 9 9 1 2  

    r e d u c t i o n . H e n c e , P    T 

    C D 

    c o m p  

    w i l l g r o w a s   O  (  P M  ) w i t h  

    r e s p e c t t o   O  (  M  ) , w h e r e a s   T 

    s e r i a l

    c o m p  

    g r o w s o n l y a s   O  (  M  ) .

    T h i s s h o w s t h a t   C D  d o e s n o t s c a l e w i t h r e s p e c t t o t h e  

    i n c r e a s i n g   M  . I f  M  i s t o o l a r g e t o t i n t h e m a i n m e m o r y ,

    t h e n t h e s e t o f t r a n s a c t i o n n e e d s t o b e r e a d f r o m t h e d i s k  

    c a p a c i t y  

    t i m e s , a d d i n g a n o t h e r   O  ( 

     

    c a p a c i t y  

    ) t e r m t o  

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

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

    t h i s t e r m .

    T h e  D D  a l g o r i t h m . I n t h e   D D  a l g o r i t h m , t h e n u m b e r o f  

    c a n d i d a t e s p e r p r o c e s s o r i s   M = P  , a s t h e c a n d i d a t e s e t i s  

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

    t h e l o c a l h a s h t r e e o f e a c h p r o c e s s o r i s   L = P  . T h e r e f o r e ,

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

    C ;

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

    D D 

    t r a n s  

    =  C    t 

    t r a v e r s  

    +  V 

    C ;

      t 

    c h e c k  

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

    N  , a s t h e t r a n s a c t i o n s a r e s h i f t e d a r o u n d t h e p r o c e s s o r s .

    H e n c e , t h e c o m p u t a t i o n p e r p r o c e s s o r o f t h e   D D  a l g o r i t h m  

    i s :

    D D 

    c o m p  

    =  N    T 

    D D 

    t r a n s  

    O  ( 

     | { z } 

    h a s h t r e e c o n s t r u c t i o n  

    +  O  (  N  ) 

     | { z } 

    d a t a m o v e m e n t  

    =  N    C    t 

    t r a v e r s  

    +  N    V 

    C ;

      t 

    c h e c k  

    O  ( 

    ) +  O  (  N  ) ( 5 )  

    C o m p a r i n g E q u a t i o n 5 w i t h t h e s e r i a l c o m p l e x i t y ( E q u a -  

    t i o n 3 ) , w e s e e t h a t t h e   D D  a l g o r i t h m d o e s n o t r e d u c e  

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

    F o r b o t h t h e s e r i a l   A p r i o r i   a n d t h e   D D  a l g o r i t h m , t h i s  

    c o s t i s   N    C    t 

    t r a v e r s  

    . H o w e v e r , t h e   D D  a l g o r i t h m i s  

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

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

    N    V 

    C ; L 

      t 

    c h e c k  

    d o w n t o   N    V 

    C ;

      t 

    c h e c k  

    . H o w e v e r , b e -  

    c a u s e   V 

    C ;

    > V 

    C ; L 

    = P  , t h e r e d u c t i o n a c h i e v e d i n t h i s p a r t  

    i s l e s s t h a n a f a c t o r o f   P  . W e c a n e a s i l y s e e t h i s i f w e c o n -  

    s i d e r t h e c a s e w h e n   L  i s v e r y l a r g e . I n t h i s c a s e , V 

    C ;

    '  C 

    a n d  V 

    C ; L 

    = P  '  C = P  b y E q u a t i o n 2 . T h u s , t h e n u m b e r o f  

    l e a f n o d e s c h e c k e d o v e r a l l t h e p r o c e s s o r s b y t h e   D D  a l g o -  

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

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

    F u r t h e r m o r e , D D  h a s a n e x t r a c o s t o f d a t a m o v e m e n t .

    D u e t o t h e s e t w o f a c t o r s , D D  d o e s n o t s c a l e w i t h r e s p e c t  

    t o i n c r e a s i n g   N  . H o w e v e r , t h e c o s t o f b u i l d i n g h a s h t r e e  

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

    r e s p e c t t o i n c r e a s i n g   M  .

    T h e  I D D  a l g o r i t h m . I n t h e   I D D  a l g o r i t h m , j u s t l i k e t h e   D D 

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

    h a s h t r e e o f e a c h p r o c e s s o r i s   L = P  . H o w e v e r , t h e a v e r a g e  

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

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

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

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

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

    t h a t n e e d t o b e c h e c k e d f o r a t r a n s a c t i o n i s r o u g h l y   C = P 

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

    c o m p u t a t i o n p e r t r a n s a c t i o n i s :

    I D D 

    t r a n s  

      t 

    t r a v e r s  

    +  V  C 

    ;

      t 

    c h e c k  

    T h u s t h e c o m p u t a t i o n p e r p r o c e s s o r i s :

    I D D 

    c o m p  

    =  N    T 

    I D D 

    t r a n s  

    O  ( 

     | { z } 

    h a s h t r e e c o n s t r u c t i o n  

    +  O  (  N  ) 

     | { z } 

    d a t a m o v e m e n t  

    =  N   

      t 

    t r a v e r s  

    +  N    V  C 

    ;

      t 

    c h e c k  

    O  ( 

    ) +  O  (  N  ) ( 6 )

    C o m p a r i n g E q u a t i o n 6 t o E q u a t i o n 3 , w e s e e t h a t t h e   I D D 

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

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

    c o s t f r o m   N    V 

    C ; L 

      t 

    c h e c k  

    d o w n t o   N    V  C 

    ;

      t 

    c h e c k  

    . N o t e  

    t h a t f o r s u c i e n t l y l a r g e   L  , V 

    C ; L 

    '  C  a n d  V  C 

    ;

    '  C = P  .

    T h i s s h o w s t h a t   I D D  i s a l s o a b l e t o l i n e a r l y r e d u c e t h e  

    c o s t o f c h e c k i n g a t t h e l e a f n o d e s , a n d t h u s u n l i k e   D D  , i t 

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

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

    v i s i t e d p e r t r a n s a c t i o n i s r e p o r t e d i n o u r e x p e r i m e n t ( s e e  

    F i g u r e 1 1 a n d d i s c u s s i o n s i n S e c t i o n V ) . H o w e v e r , P  m u s t  

    b e r e l a t i v e l y s m