Largest Common Sub Tree
Transcript of Largest Common Sub Tree
-
8/10/2019 Largest Common Sub Tree
1/16
-
8/10/2019 Largest Common Sub Tree
2/16
1 I n t r o d u c t i o n
O r d e r e d , l a b e l e d t r e e s a r e t r e e s i n w h i c h e a c h n o d e h a s a l a b e l a n d t h e l e f t - t o - r i g h t o r d e r o f i t s c h i l d r e n ( i f
i t h a s a n y ) i s x e d .
1
S u c h t r e e s h a v e m a n y a p p l i c a t i o n s i n v i s i o n , p a t t e r n r e c o g n i t i o n , m o l e c u l a r b i o l o g y
a n d n a t u r a l l a n g u a g e p r o c e s s i n g , i n c l u d i n g t h e r e p r e s e n t a t i o n o f i m a g e s 1 2 ] , p a t t e r n s 2 , 1 0 ] a n d s e c o n d a r y
s t r u c t u r e s o f R N A 1 4 ] . T h e y a r e f r e q u e n t l y u s e d i n o t h e r d i s c i p l i n e s a s w e l l .
A l a r g e a m o u n t o f w o r k h a s b e e n p e r f o r m e d f o r c o m p a r i n g t w o t r e e s b a s e d o n v a r i o u s d i s t a n c e m e a s u r e s
4 , 9 , 1 1 , 2 1 , 2 5 ] . 1 6 , 1 9 , 2 7 ] r e c e n t l y g e n e r a l i z e d o n e o f t h e m o s t c o m m o n l y u s e d d i s t a n c e m e a s u r e s , n a m e l y
t h e e d i t d i s t a n c e , f o r b o t h r o o t e d a n d u n r o o t e d u n o r d e r e d t r e e s . T h e s e w o r k s l a i d o u t a f o u n d a t i o n t h a t
i s u s e f u l f o r c o m p a r i n g g r a p h s 1 5 , 2 4 ] .
I n t h i s p a p e r w e e x t e n d t h e p r e v i o u s w o r k b y c o n s i d e r i n g t h e l a r g e s t a p p r o x i m a t e l y c o m m o n s u b -
s t r u c t u r e p r o b l e m f o r o r d e r e d l a b e l e d t r e e s . V a r i o u s b i o l o g i s t s 5 , 1 4 ] r e p r e s e n t R N A s e c o n d a r y s t r u c t u r e s
a s t r e e s . F i n d i n g c o m m o n p a t t e r n s ( a l s o k n o w n a s m o t i f s ) i n t h e s e s e c o n d a r y s t r u c t u r e s h e l p s b o t h i n
p r e d i c t i n g R N A f o l d i n g 5 ] a n d i n f u n c t i o n a l s t u d i e s o f R N A p r o c e s s i n g m e c h a n i s m s 1 4 ] .
P r e v i o u s m e t h o d s f o r d e t e c t i n g m o t i f s i n t h e R N A m o l e c u l e s ( t r e e s ) a r e b a s e d o n o n e o f t h e f o l l o w i n g
t w o a p p r o a c h e s : ( 1 ) t r a n s f o r m i n g t h e t r e e s t o s e q u e n c e s a n d t h e n u s i n g s e q u e n c e a l g o r i t h m s 1 3 ] ( 2 )
r e p r e s e n t i n g t h e m o l e c u l e s u s i n g a h i g h l y s i m p l i e d t r e e s t r u c t u r e a n d t h e n s e a r c h i n g f o r c o m m o n n o d e s
i n t h e t r e e s 5 ] . N e i t h e r o f t h e t w o a p p r o a c h e s s a t i s f a c t o r i l y t a k e s t h e f u l l t r e e s t r u c t u r e i n t o a c c o u n t . B y
c o n t r a s t , u t i l i z i n g t h e p r o p o s e d a l g o r i t h m f o r p a i r s o f t r e e s e n a b l e s o n e t o l o c a t e t r e e - s t r u c t u r e d m o t i f s
o c c u r r i n g i n m u l t i p l e R N A s e c o n d a r y s t r u c t u r e s . O u r e x p e r i m e n t a l r e s u l t s c o n c e r n i n g R N A c l a s s i c a t i o n
s h o w t h e s i g n i c a n c e o f t h e s e m o t i f s 2 3 ] .
2 P r e l i m i n a r i e s
2 . 1 E d i t D i s t a n c e a n d M a p p i n g s
W e u s e t h e e d i t d i s t a n c e 1 7 ] t o m e a s u r e t h e d i s s i m i l a r i t y o f t w o t r e e s . T h e r e a r e t h r e e t y p e s o f e d i t
o p e r a t i o n s , i . e . , r e l a b e l i n g , d e l e t e , a n d i n s e r t a n o d e . R e l a b e l i n g n o d e n m e a n s c h a n g i n g t h e l a b e l o n n .
D e l e t i n g a n o d e n m e a n s m a k i n g t h e c h i l d r e n o f n b e c o m e t h e c h i l d r e n o f t h e p a r e n t o f n a n d r e m o v i n g n .
I n s e r t i s t h e i n v e r s e o f d e l e t e . I n s e r t i n g n o d e n a s t h e c h i l d o f n o d e n
0
m a k e s n t h e p a r e n t o f a c o n s e c u t i v e
s u b s e q u e n c e o f t h e c u r r e n t c h i l d r e n o f n
0
. F i g . 1 i l l u s t r a t e s t h e e d i t o p e r a t i o n s . F o r t h e p u r p o s e o f t h i s
w o r k , w e a s s u m e t h a t a l l e d i t o p e r a t i o n s h a v e a u n i t c o s t . T h e e d i t d i s t a n c e , o r s i m p l y t h e d i s t a n c e , f r o m
t r e e T
1
t o t r e e T
2
, d e n o t e d ( T
1
T
2
) , i s t h e c o s t o f a m i n i m u m c o s t s e q u e n c e o f e d i t o p e r a t i o n s t r a n s f o r m i n g
T
1
t o T
2
1 7 ] .
T h e n o t i o n o f e d i t d i s t a n c e i s b e s t i l l u s t r a t e d t h r o u g h t h e c o n c e p t o f m a p p i n g s . A m a p p i n g i s a
g r a p h i c a l s p e c i c a t i o n o f w h i c h e d i t o p e r a t i o n s a p p l y t o e a c h n o d e i n t h e t w o t r e e s . F o r e x a m p l e , t h e
m a p p i n g i n F i g . 2 s h o w s a w a y t o t r a n s f o r m T
1
t o T
2
. T h e t r a n s f o r m a t i o n i n c l u d e s d e l e t i n g t h e t w o n o d e s
l a b e l e d a a n d m i n T
1
a n d i n s e r t i n g t h e m i n t o T
2
.
1
T h r o u g h o u t t h e p a p e r , w e s h a l l r e f e r t o o r d e r e d l a b e l e d t r e e s s i m p l y a s t r e e s w h e n n o a m b i g u i t y o c c u r s .
2
-
8/10/2019 Largest Common Sub Tree
3/16
1T T2
a cb
r
a b
r
rr
a f c
rr
e f
(i)
(ii)
(iii)
f
be
g h g h
f g
h h
f
f
g gg
F i g . 1 . ( i ) R e l a b e l i n g : T o c h a n g e o n e n o d e l a b e l ( a ) t o a n o t h e r ( b ) . ( i i ) D e l e t e : T o d e l e t e a n o d e
a l l c h i l d r e n o f t h e d e l e t e d n o d e ( l a b e l e d b ) b e c o m e c h i l d r e n o f t h e p a r e n t ( l a b e l e d r ) . ( i i i ) I n s e r t :
T o i n s e r t a n o d e a c o n s e c u t i v e s e q u e n c e o f s i b l i n g s a m o n g t h e c h i l d r e n o f t h e n o d e l a b e l e d r ( h e r e ,
f a n d t h e l e f t g ) b e c o m e t h e c h i l d r e n o f t h e n e w l y i n s e r t e d n o d e l a b e l e d b
r
a m
b c d e p
2T
r
a m
b c d e p
1T
F i g . 2 . A m a p p i n g f r o m t r e e T
1
t o t r e e T
2
W e u s e a p o s t o r d e r n u m b e r i n g o f n o d e s i n t h e t r e e s . L e t t i ] r e p r e s e n t t h e n o d e o f T w h o s e p o s i t i o n i n
t h e l e f t - t o - r i g h t p o s t o r d e r t r a v e r s a l o f T i s i . W h e n t h e r e i s n o c o n f u s i o n , w e a l s o u s e t i ] t o r e p r e s e n t t h e
l a b e l o f n o d e t i ] . F o r m a l l y , a m a p p i n g f r o m T
1
t o T
2
i s a t r i p l e ( M T
1
T
2
) ( o r s i m p l y M i f t h e c o n t e x t i s
c l e a r ) , w h e r e M i s a n y s e t o f o r d e r e d p a i r s o f i n t e g e r s ( i j ) s a t i s f y i n g : ( i ) 1 i j T
1
j a n d 1 j j T
2
j
( i i ) F o r a n y p a i r o f ( i
1
j
1
) a n d ( i
2
j
2
) i n M , ( a ) i
1
= i
2
i j
1
= j
2
( o n e - t o - o n e c o n d i t i o n ) ( b ) t
1
i
1
] i s
t o t h e l e f t o f t
1
i
2
] i t
2
j
1
] i s t o t h e l e f t o f t
2
j
2
] ( s i b l i n g o r d e r p r e s e r v a t i o n c o n d i t i o n ) ( c ) t
1
i
1
] i s a n
3
-
8/10/2019 Largest Common Sub Tree
4/16
a n c e s t o r o f t
1
i
2
] i t
2
j
1
] i s a n a n c e s t o r o f t
2
j
2
] ( a n c e s t o r o r d e r p r e s e r v a t i o n c o n d i t i o n ) . T h e c o s t o f M i s
t h e c o s t o f d e l e t i n g n o d e s o f T
1
n o t t o u c h e d b y a m a p p i n g l i n e p l u s t h e c o s t o f i n s e r t i n g n o d e s o f T
2
n o t
t o u c h e d b y a m a p p i n g l i n e p l u s t h e c o s t o f r e l a b e l i n g n o d e s i n t h o s e p a i r s r e l a t e d b y m a p p i n g l i n e s w i t h
d i e r e n t l a b e l s . I t c a n b e p r o v e d 1 7 ] t h a t ( T
1
T
2
) e q u a l s t h e c o s t o f a m i n i m u m c o s t m a p p i n g f r o m t r e e
T
1
t o t r e e T
2
.
2 . 2 C u t O p e r a t i o n s
W e d e n e a s u b s t r u c t u r e U o f t r e e T t o b e a c o n n e c t e d s u b g r a p h o f T . T h a t i s , U i s r o o t e d a t a n o d e n
i n T a n d i s g e n e r a t e d b y c u t t i n g o s o m e s u b t r e e s i n t h e s u b t r e e r o o t e d a t n . F o r m a l l y , l e t T i ] r e p r e s e n t
t h e s u b t r e e r o o t e d a t t i ] . T h e o p e r a t i o n o f c u t t i n g a t n o d e t i ] m e a n s r e m o v i n g T i ] . A s e t S o f n o d e s o f
T k ] i s s a i d t o b e a s e t o f c o n s i s t e n t s u b t r e e c u t s i n T k ] i f ( i ) t i ] 2 S i m p l i e s t h a t t i ] i s a n o d e i n T k ] ,
a n d ( i i ) t i ] t j ] 2 S i m p l i e s t h a t n e i t h e r i s a n a n c e s t o r o f t h e o t h e r i n T k ] . I n t u i t i v e l y , S i s t h e s e t o f a l l
r o o t s o f t h e r e m o v e d s u b t r e e s i n T k ] .
W e u s e C u t ( T S ) t o r e p r e s e n t t h e t r e e T w i t h s u b t r e e r e m o v a l s a t a l l n o d e s i n S . L e t S u b t r e e s ( T )
b e t h e s e t o f a l l p o s s i b l e s e t s o f c o n s i s t e n t s u b t r e e c u t s i n T . G i v e n t w o t r e e s T
1
a n d T
2
a n d a n i n -
t e g e r d , t h e s i z e o f t h e l a r g e s t a p p r o x i m a t e l y c o m m o n r o o t - c o n t a i n i n g s u b s t r u c t u r e s w i t h i n d i s t a n c e
k , 0 k d , o f T
1
i ] a n d T
2
j ] , d e n o t e d ( T
1
i ] T
2
j ] k ) ( o r s i m p l y ( i j k ) w h e n t h e c o n t e x t i s
c l e a r ) , i s m a x f j C u t ( T
1
i ] S
1
) j + j C u t ( T
2
j ] S
2
) j g s u b j e c t t o ( C u t ( T
1
i ] S
1
) C u t ( T
2
j ] S
2
) ) k , S
1
2
S u b t r e e s ( T
1
i ] ) , S
2
2 S u b t r e e s ( T
2
j ] ) . F i n d i n g t h e l a r g e s t a p p r o x i m a t e l y c o m m o n s u b s t r u c t u r e ( L A C S ) ,
w i t h i n d i s t a n c e d , o f T
1
i ] a n d T
2
j ] a m o u n t s t o c a l c u l a t i n g m a x
1 u i 1 v j
f ( T
1
u ] T
2
v ] d ) g a n d l o c a t -
i n g t h e C u t ( T
1
u ] S
u
) a n d C u t ( T
2
v ] S
v
) , S
u
2 S u b t r e e s ( T
1
u ] ) , S
v
2 S u b t r e e s ( T
2
v ] ) t h a t a c h i e v e t h e
m a x i m u m s i z e . T h e s i z e o f L A C S , w i t h i n d i s t a n c e d , o f T
1
a n d T
2
i s m a x
1 i j T
1
j 1 j j T
2
j
f ( T
1
i ] T
2
j ] d ) g .
W e s h a l l f o c u s o n c o m p u t i n g t h e m a x i m u m s i z e . B y m e m o r i z i n g t h e s i z e i n f o r m a t i o n d u r i n g t h e c o m -
p u t a t i o n a n d b y a s i m p l e b a c k t r a c k i n g t e c h n i q u e , o n e c a n n d b o t h t h e m a x i m u m s i z e a n d o n e o f t h e
c o r r e s p o n d i n g s u b s t r u c t u r e p a i r s y i e l d i n g t h e s i z e i n t h e s a m e t i m e a n d s p a c e c o m p l e x i t y .
3 O u r A l g o r i t h m
3 . 1 N o t a t i o n
W e u s e d e s c ( i ) t o r e p r e s e n t t h e s e t o f p o s t o r d e r n u m b e r s o f t h e d e s c e n d a n t s o f t h e n o d e t i ] a n d l ( i )
d e n o t e s t h e p o s t o r d e r n u m b e r o f t h e l e f t m o s t l e a f o f t h e s u b t r e e T i ] . W h e n T i ] i s a l e a f , l ( i ) = i . T i : : j ]
i s a n o r d e r e d f o r e s t o f t r e e T i n d u c e d b y t h e n o d e s n u m b e r e d i t o j i n c l u s i v e ( s e e F i g . 3 ) . I f i > j , t h e n
T i : : j ] = . T h e d e n i t i o n o f m a p p i n g s f o r o r d e r e d f o r e s t s i s t h e s a m e a s f o r t r e e s . L e t F
1
a n d F
2
b e t w o
f o r e s t s . T h e d i s t a n c e f r o m F
1
t o F
2
, d e n o t e d ( F
1
F
2
) , e q u a l s t h e c o s t o f a m i n i m u m c o s t m a p p i n g f r o m
F
1
t o F
2
2 5 ] .
L e t F = T i : : j ] . A s e t S o f n o d e s o f F i s s a i d t o b e a s e t o f c o n s i s t e n t s u b t r e e c u t s i n F i f ( i ) t p ] 2 S
i m p l i e s t h a t i p j , a n d ( i i ) t p ] t q ] 2 S i m p l i e s t h a t n e i t h e r i s a n a n c e s t o r o f t h e o t h e r i n F . W e
u s e C u t ( F S ) t o r e p r e s e n t t h e s u b - f o r e s t F w i t h s u b t r e e r e m o v a l s a t a l l n o d e s i n S . L e t S u b t r e e s ( F )
4
-
8/10/2019 Largest Common Sub Tree
5/16
b e t h e s e t o f a l l p o s s i b l e s e t s o f c o n s i s t e n t s u b t r e e c u t s i n F . D e n e t h e s i z e o f t h e l a r g e s t a p p r o x i -
m a t e l y c o m m o n r o o t - c o n t a i n i n g s u b s t r u c t u r e s , w i t h i n d i s t a n c e k , o f F
1
a n d F
2
, d e n o t e d ( F
1
F
2
k ) , t o
b e m a x f j C u t ( F
1
S
1
) j + j C u t ( F
2
S
2
) j g s u b j e c t t o ( C u t ( F
1
S
1
) C u t ( F
2
S
2
) ) k , S
1
2 S u b t r e e s ( F
1
) ,
S
2
2 S u b t r e e s ( F
2
) . W h e n F
1
= T
1
l ( i ) : : s ] a n d F
2
= T
2
l ( j ) : : t ] , w e a l s o r e p r e s e n t ( F
1
F
2
k ) b y
( l ( i ) : : s l ( j ) : : t k ) i f t h e r e i s n o c o n f u s i o n .
T [2..8]T
[10]t
[4]t [9]t
[3][2][1]
[5] [6]
[8][7]t t t
t
t t
t
[4] [7] [8]
[6][5][3][2]
t t t
t t t t
F i g . 3 . A n i n d u c e d o r d e r e d f o r e s t .
3 . 2 B a s i c P r o p e r t i e s
L e m m a 3 . 1 . S u p p o s e s 2 d e s c ( i ) a n d t 2 d e s c ( j ) . T h e n
( i ) ( 0 ) = 0
( i i ) ( T
1
l ( i ) : : s ] 0 ) = 0
( i i i ) ( T
2
l ( j ) : : t ] 0 ) = 0 .
P r o o f . I m m e d i a t e f r o m d e n i t i o n s .
L e m m a 3 . 2 . S u p p o s e s 2 d e s c ( i ) a n d t 2 d e s c ( j ) . T h e n f o r a l l k , 1 k d ,
( i ) ( k ) = 0
( i i )
( T
1
l ( i ) : : s ] k ) = m a x
( T
1
l ( i ) : : s ; 1 ] k ; 1 ) + 1
( T
1
l ( i ) : : l ( s ) ; 1 ] k )
( i i i )
( T
2
l ( j ) : : t ] k ) = m a x
( T
2
l ( j ) : : t ; 1 ] k ; 1 ) + 1
( T
2
l ( j ) : : l ( t ) ; 1 ] k ) :
P r o o f . ( i ) f o l l o w s f r o m t h e d e n i t i o n . F o r ( i i ) , s u p p o s e S
1
2 S u b t r e e s ( T
1
l ( i ) : : s ] ) i s a s m a l l e s t s e t o f
c o n s i s t e n t s u b t r e e c u t s t h a t m a x i m i z e s j C u t ( T
1
l ( i ) : : s ] S
1
) j w h e r e ( C u t ( T
1
l ( i ) : : s ] S
1
) ) k . T h e n o n e
o f t h e f o l l o w i n g t w o c a s e s m u s t h o l d : ( 1 ) t
1
s ] 2 S
1
( 2 ) t
1
s ] 62 S
1
. I f ( 1 ) i s t r u e , t h e n ( T
1
l ( i ) : : s ] k )
= ( T
1
l ( i ) : : l ( s ) ; 1 ] k ) o t h e r w i s e , ( T
1
l ( i ) : : s ] , , k ) = ( T
1
l ( i ) : : s ; 1 ] , , k ; 1 ) + 1 . ( i i i ) i s p r o v e d
s i m i l a r l y a s f o r ( i i ) .
5
-
8/10/2019 Largest Common Sub Tree
6/16
L e m m a 3 . 3 . S u p p o s e s 2 d e s c ( i ) a n d t 2 d e s c ( j ) . I f ( l ( s ) 6= l ( i ) o r l ( t ) 6= l ( j ) ) , t h e n
( l ( i ) : : s l ( j ) : : t 0 ) = m a x
8
-
8/10/2019 Largest Common Sub Tree
7/16
-
8/10/2019 Largest Common Sub Tree
8/16
( i . e . , l ( s ) = l ( i ) a n d l ( t ) = l ( j ) ) . T h e n f o r a l l k , 1 k d ,
( l ( i ) : : s l ( j ) : : t k ) = m a x
8
k s u c h t h a t l ( k ) = l ( k
0
) g . F o r e a c h i 2 k e y n o d e s ( T
1
) a n d j 2
k e y n o d e s ( T
2
) , P r o c e d u r e F i n d - L a r g e s t - 1 i n F i g . 6 c o m p u t e s ( s t 0 ) f o r l ( i ) s i a n d l ( j ) t j a n d
8
-
8/10/2019 Largest Common Sub Tree
9/16
P r o c e d u r e F i n d - L a r g e s t - 2 i n F i g . 6 c o m p u t e s ( s t k ) f o r 1 k d . T h e m a i n a l g o r i t h m i s s u m m a r i z e d
i n F i g . 6 .
N o w , t o c a l c u l a t e t h e s i z e o f t h e l a r g e s t a p p r o x i m a t e l y c o m m o n s u b s t r u c t u r e s ( L A C S s ) , w i t h i n d i s t a n c e
d , o f T
1
i ] a n d T
2
j ] , w e b u i l d , i n a b o t t o m - u p f a s h i o n , a n o t h e r a r r a y ( i j d ) , 1 i j T
1
j , 1 j j T
2
j ,
u s i n g ( i j d ) a s f o l l o w s . L e t L = m a x
1 u s
( i
u
j d ) w h e r e i
1
: : : i
s
a r e t h e p o s t o r d e r n u m b e r s o f t h e
c h i l d r e n o f t
1
i ] o r L = 0 i f t
1
i ] i s a l e a f . L e t R = m a x
1 v t
( i j
v
d ) w h e r e j
1
: : : j
t
a r e t h e p o s t o r d e r
n u m b e r s o f t h e c h i l d r e n o f t
2
j ] o r R = 0 i f t
2
j ] i s a l e a f . C a l c u l a t e ( i j d ) = m a x f ( i j d ) L R g . T h e
s i z e o f L A C S s , w i t h i n d i s t a n c e d , o f T
1
i ] a n d T
2
j ] i s ( i j d ) . T h e s i z e o f L A C S s , w i t h i n d i s t a n c e d , o f
T
1
a n d T
2
i s ( j T
1
j j T
2
j d ) .
C o n s i d e r t h e c o m p l e x i t y o f t h e a l g o r i t h m . W e u s e a n a r r a y t o h o l d , a n d , r e s p e c t i v e l y . T h e s e
a r r a y s r e q u i r e O ( d j T
1
j j T
2
j ) s p a c e . R e g a r d i n g t h e t i m e c o m p l e x i t y , g i v e n ( i j d ) , 1 i j T
1
j ,
1 j j T
2
j , c a l c u l a t i n g ( i j d ) r e q u i r e s O ( j T
1
j j T
2
j ) t i m e . F o r a x e d i a n d j , P r o c e d u r e F i n d - L a r g e s t -
1 r e q u i r e s O ( j T
1
i ] j j T
2
j ] j ) t i m e a n d P r o c e d u r e F i n d - L a r g e s t - 2 r e q u i r e s O ( d
2
j T
1
i ] j j T
2
j ] j ) t i m e . S o
t h e t o t a l t i m e i s b o u n d e d b y
X
i 2 k e y n o d e s ( T
1
)
X
j 2 k e y n o d e s ( T
2
)
O ( j T
1
i ] j j T
2
j ] j ) + O ( d
2
j T
1
i ] j j T
2
j ] j )
O (
X
i 2 k e y n o d e s ( T
1
)
X
j 2 k e y n o d e s ( T
2
)
d
2
j T
1
i ] j j T
2
j ] j )
O ( d
2
X
i 2 k e y n o d e s ( T
1
)
j T
1
i ] j
X
j 2 k e y n o d e s ( T
2
)
j T
2
j ] j ) :
F r o m 2 5 , T h e o r e m 2 ] , t h e l a s t t e r m a b o v e i s b o u n d e d b y O ( d
2
j T
1
j j T
2
j m i n ( H
1
L
1
) m i n ( H
2
L
2
) )
w h e r e H
i
, i = 1 2 , i s t h e h e i g h t o f T
i
a n d L
i
i s t h e n u m b e r o f l e a v e s i n T
i
. W h e n d i s a c o n s t a n t , t h i s
i s t h e s a m e a s t h e c o m p l e x i t y o f t h e b e s t c u r r e n t a l g o r i t h m f o r t r e e m a t c h i n g b a s e d o n t h e e d i t d i s t a n c e
1 1 , 2 5 ] , e v e n t h o u g h t h e p r o b l e m a t h a n d a p p e a r s t o b e h a r d e r t h a n t r e e m a t c h i n g .
N o t e t h a t t o c a l c u l a t e m a x
1 i j T
1
j 1 j j T
2
j
f ( i j 0 ) g , o n e c o u l d u s e a f a s t e r a l g o r i t h m t h a t r u n s i n
t i m e O ( j T
1
j j T
2
j ) . H o w e v e r , t h e r e a s o n f o r c o n s i d e r i n g t h e k e y n o d e s a n d t h e f o r m u l a s a s s p e c i e d i n
L e m m a s 3 . 3 a n d 3 . 4 i s t o p r e p a r e t h e o p t i m a l s i z e s f r o m f o r e s t s t o f o r e s t s a n d s t o r e t h e s e s i z e v a l u e s i n t h e
a r r a y t o b e u s e d i n c a l c u l a t i n g ( s t k ) f o r k 6= 0 . E v e n i f o n e c o u l d i n c o r p o r a t e t h e f a s t e r a l g o r i t h m i n t o
t h e F i n d - L a r g e s t a l g o r i t h m , t h e o v e r a l l t i m e c o m p l e x i t y w o u l d n o t b e c h a n g e d , b e c a u s e t h e c a l c u l a t i o n o f
( s t k ) f o r k 6= 0 d o m i n a t e s t h e c o s t .
4 I m p l e m e n t a t i o n a n d D i s c u s s i o n
W e h a v e a p p l i e d o u r a l g o r i t h m t o n d m o t i f s i n m u l t i p l e R N A s e c o n d a r y s t r u c t u r e s . I n t h i s e x p e r i m e n t , w e
e x a m i n e d t h r e e p h y l o g e n e t i c a l l y r e l a t e d f a m i l i e s o f m R N A s e q u e n c e s c h o s e n f r o m G e n B a n k 1 ] p e r t a i n i n g
t o t h e p o l i o v i r u s , h u m a n r h i n o v i r u s a n d c o x s a c k i e v i r u s . E a c h f a m i l y c o n t a i n e d t w o s e q u e n c e s , a s s h o w n
i n T a b l e 1 .
9
-
8/10/2019 Largest Common Sub Tree
10/16
A l g o r i t h m F i n d - L a r g e s t
I n p u t : T r e e s T
1
, T
2
a n d a n i n t e g e r d .
O u t p u t : ( i j k ) w h e r e 1 i j T
1
j , 1 j j T
2
j a n d 0 k d .
f o r i
0
: = 1 t o j k e y n o d e s ( T
1
) j d o
f o r j
0
: = 1 t o j k e y n o d e s ( T
2
) j d o
b e g i n
i : = k e y n o d e s ( T
1
) i
0
]
j : = k e y n o d e s ( T
2
) j
0
]
r u n P r o c e d u r e F i n d - L a r g e s t - 1 o n i n p u t ( i j 0 )
r u n P r o c e d u r e F i n d - L a r g e s t - 2 o n i n p u t ( i j d )
e n d
P r o c e d u r e F i n d - L a r g e s t - 1
I n p u t : i j 0 .
O u t p u t : ( s t 0 ) w h e r e l ( i ) s i a n d l ( j ) t j .
( 0 ) : = 0
f o r s : = l ( i ) t o i d o
( T
1
l ( i ) s ] 0 ) : = 0
f o r t : = l ( j ) t o j d o
( T
2
l ( j ) t ] 0 ) : = 0
f o r s : = l ( i ) t o i d o
f o r t : = l ( j ) t o j d o
i f ( l ( s ) 6= l ( i ) o r l ( t ) 6= l ( j ) ) t h e n
c o m p u t e ( l ( i ) : : s l ( j ) : : t 0 ) a s i n L e m m a 3 . 3
e l s e b e g i n / * l ( s ) = l ( i ) a n d l ( t ) = l ( j ) * /
c o m p u t e ( l ( i ) : : s l ( j ) : : t 0 ) a s i n L e m m a 3 . 4
( s t 0 ) : = ( l ( i ) : : s l ( j ) : : t 0 )
e n d
P r o c e d u r e F i n d - L a r g e s t - 2
I n p u t : i j d .
O u t p u t : ( s t k ) w h e r e l ( i ) s i , l ( j ) t j a n d 1 k d .
f o r k : = 1 t o d d o
( k ) : = 0
f o r k : = 1 t o d d o
f o r s : = l ( i ) t o i d o
c o m p u t e ( T
1
l ( i ) s ] k ) a s i n L e m m a 3 . 2 ( i i )
f o r k : = 1 t o d d o
f o r t : = l ( j ) t o j d o
c o m p u t e ( T
2
l ( j ) t ] k ) a s i n L e m m a 3 . 2 ( i i i )
f o r k : = 1 t o d d o
f o r s : = l ( i ) t o i d o
f o r t : = l ( j ) t o j d o
i f ( l ( s ) 6= l ( i ) o r l ( t ) 6= l ( j ) ) t h e n
c o m p u t e ( l ( i ) : : s l ( j ) : : t k ) a s i n L e m m a 3 . 5
e l s e b e g i n / * l ( s ) = l ( i ) a n d l ( t ) = l ( j ) * /
c o m p u t e ( l ( i ) : : s l ( j ) : : t k ) a s i n L e m m a 3 . 6
( s t k ) : = ( l ( i ) : : s l ( j ) : : t k )
e n d
F i g . 6 . A l g o r i t h m f o r c o m p u t i n g ( i j k )
1 0
-
8/10/2019 Largest Common Sub Tree
11/16
F a m i l y S e q u e n c e # o f t r e e s F i l e #
p o l i o v i r u s p o l i o 3 s a b i n s t r a i n 3 , 0 2 6 l e 1
p o l 3 m u t 3 , 0 0 0 l e 2
h u m a n r h i n o v i r u s r h i n o 2 3 , 0 0 0 l e 3
r h i n o 1 4 3 , 0 0 0 l e 4
c o x s a c k i e v i r u s c o x 5 3 , 0 0 0 l e 5
c v b 3 0 5 p r 2 , 9 9 9 l e 6
T a b l e 1 . D a t a u s e d i n t h e e x p e r i m e n t .
U n d e r p h y s i o l o g i c a l c o n d i t i o n s , i . e . , a t o r a b o v e t h e r o o m t e m p e r a t u r e , t h e s e R N A m o l e c u l e s d o n o t
t a k e o n o n l y a s i n g l e s t r u c t u r e . T h e y m a y c h a n g e t h e i r c o n f o r m a t i o n b e t w e e n s t r u c t u r e s w i t h s i m i l a r f r e e
e n e r g i e s o r b e t r a p p e d i n l o c a l m i n i m a . T h u s , o n e h a s t o c o n s i d e r n o t o n l y t h e o p t i m a l s t r u c t u r e b u t a l l
s t r u c t u r e s w i t h i n a c e r t a i n r a n g e o f f r e e e n e r g i e s . O n t h e o t h e r h a n d , a l o o s e r u l e o f t h u m b i s t h a t t h e
\ r e a l " s t r u c t u r e o f a n R N A m o l e c u l e a p p e a r s i n t h e t o p 5 % - 1 0 % o f s u b o p t i m a l s t r u c t u r e s o f t h e s e q u e n c e
b a s e d o n t h e r a n k i n g o f t h e i r e n e r g i e s w i t h t h e m i n i m u m e n e r g y o n e ( i . e . t h e o p t i m a l o n e ) b e i n g a t t h e
t o p . T h e r e f o r e , w e f o l d e d t h e 5 ' n o n - c o d i n g r e g i o n o f t h e s e l e c t e d m R N A s e q u e n c e s a n d c o l l e c t e d ( r o u g h l y )
t h e t o p 3 , 0 0 0 s u b o p t i m a l s t r u c t u r e s f o r e a c h s e q u e n c e . W e t h e n t r a n s f o r m e d t h e s e s u b o p t i m a l s t r u c t u r e s
i n t o t r e e s u s i n g t h e a l g o r i t h m s d e s c r i b e d i n 1 3 , 1 4 ] . F i g . 7 i l l u s t r a t e s a n R N A s e c o n d a r y s t r u c t u r e a n d
i t s t r e e r e p r e s e n t a t i o n .
T h e s t r u c t u r e i s d e c o m p o s e d i n t o v e t e r m s : s t e m , h a i r p i n , b u l g e , i n t e r n a l l o o p a n d m u l t i - b r a n c h l o o p
1 4 ] . I n t h e t r e e , H r e p r e s e n t s h a i r p i n n o d e s , I r e p r e s e n t s i n t e r n a l l o o p s , B r e p r e s e n t s b u l g e l o o p s , M
r e p r e s e n t s m u l t i - b r a n c h l o o p s , R r e p r e s e n t s h e l i c a l s t e m r e g i o n s ( s h o w n a s c o n n e c t i n g a r c s ) a n d N i s a
s p e c i a l n o d e u s e d t o m a k e s u r e t h e t r e e i s c o n n e c t e d . T h e t r e e i s c o n s i d e r e d t o b e a n o r d e r e d o n e w h e r e
t h e o r d e r i n g i s i m p o s e d b a s e d u p o n t h e 5 ' t o 3 ' n a t u r e o f t h e m o l e c u l e . T h e r e s u l t i n g t r e e s f o r e a c h m R N A
s e q u e n c e s e l e c t e d f r o m G e n B a n k w e r e s t o r e d i n a s e p a r a t e l e , w h e r e t h e t r e e s h a d b e t w e e n 7 0 a n d 1 8 0
n o d e s ( c f . T a b l e 1 ) . E a c h t r e e i s r e p r e s e n t e d b y a f u l l y p a r e n t h e s i z e d n o t a t i o n w h e r e t h e r o o t o f e v e r y
s u b t r e e p r e c e d e s a l l t h e n o d e s c o n t a i n e d i n t h e s u b t r e e . T h u s , f o r e x a m p l e , t h e t r e e d e p i c t e d i n F i g . 7 ( i i )
i s r e p r e s e n t e d a s ( N ( R ( I ( R ( M ( R ( B ( R ( M ( R ( H ) ) ( R ( H ) ) ) ) ) ) ( R ( H ) ) ) ) ) ) ) .
F o r e a c h p a i r o f t r e e s T
1
, T
2
i n a l e , w e r a n t h e a l g o r i t h m F i n d - L a r g e s t o n T
1
, T
2
, n d i n g t h e s i z e o f
t h e l a r g e s t a p p r o x i m a t e l y c o m m o n s u b s t r u c t u r e s , w i t h i n d i s t a n c e 1 , f o r e a c h s u b t r e e p a i r T
1
i ] a n d T
2
j ] ,
1 i j T
1
j a n d 1 j j T
2
j , a n d l o c a t i n g o n e o f t h e c o r r e s p o n d i n g s u b s t r u c t u r e p a i r s y i e l d i n g t h e s i z e .
T h e s e s u b s t r u c t u r e s c o n s t i t u t e d c a n d i d a t e m o t i f s . T h e n w e c a l c u l a t e d t h e o c c u r r e n c e n u m b e r
2
o f e a c h
c a n d i d a t e m o t i f M b y a d d i n g v a r i a b l e l e n g t h d o n ' t c a r e s ( V L D C s ) t o M a s t h e n e w r o o t a n d l e a v e s t o
f o r m a V L D C p a t t e r n V a n d t h e n c o m p a r i n g V w i t h e a c h t r e e T i n t h e l e u s i n g t h e p a t t e r n m a t c h i n g
t e c h n i q u e d e v e l o p e d i n 2 6 ] . ( A V L D C ( c o n v e n t i o n a l l y d e n o t e d b y \ " ) c a n b e m a t c h e d , a t n o c o s t , w i t h
a p a t h o r p o r t i o n o f a p a t h i n T . T h e t e c h n i q u e c a l c u l a t e s t h e m i n i m u m d i s t a n c e b e t w e e n V a n d T a f t e r
i m p l i c i t l y c o m p u t i n g a n o p t i m a l s u b s t i t u t i o n f o r t h e V L D C s i n V , a l l o w i n g z e r o o r m o r e c u t t i n g s a t n o d e s
f r o m T ( s e e F i g . 8 ) . ) T h i s w a y w e c a n l o c a t e t h e m o t i f s a p p r o x i m a t e l y o c c u r r i n g i n a l l ( o r t h e m a j o r i t y
2
T h e o c c u r r e n c e n u m b e r o f a m o t i f M w i t h r e s p e c t t o d i s t a n c e k r e f e r s t o t h e n u m b e r o f t r e e s o f t h e l e i n w h i c h M
a p p r o x i m a t e l y o c c u r s ( i . e . t h e s e t r e e s a p p r o x i m a t e l y c o n t a i n M ) w i t h i n d i s t a n c e k
1 1
-
8/10/2019 Largest Common Sub Tree
12/16
o f ) t h e t r e e s i n t h e l e .
3
110
U AU
AA
A U
G C
C GC
A
U
UA
CAUA
UGUA
UAAAU
UA
GG
A
AG
CA
C
G
C
C
GG
GU
C
UGU
U
GC C
C
AC
C
UG
C
G
GG
U
AG
AU A
CC
U
G
51
U
U
CG
AA
C
C
U
U
H
M
B H
M
H
I
N
A
(i)
(ii)
A A G C A A G U U C A U U U C G C C A U U A A G
1
F i g . 7 . I l l u s t r a t i o n o f a t y p i c a l R N A s e c o n d a r y s t r u c t u r e a n d i t s t r e e r e p r e s e n t a t i o n . ( i )
N o r m a l p o l y g o n a l r e p r e s e n t a t i o n o f t h e s t r u c t u r e . ( i i ) T r e e r e p r e s e n t a t i o n o f t h e s t r u c t u r e .
T a b l e 2 s u m m a r i z e s t h e r e s u l t s w h e r e t h e m o t i f s o c c u r w i t h i n d i s t a n c e 0 i n a t l e a s t 3 5 0 t r e e s i n t h e
c o r r e s p o n d i n g l e . T h e t a b l e s h o w s t h e n u m b e r o f m o t i f s d i s c o v e r e d f o r e a c h s e q u e n c e , t h e n u m b e r o f
d i s t i n c t m o t i f s f o u n d i n c o m m o n b e t w e e n b o t h s e q u e n c e s o f e a c h f a m i l y , a n d t h e m i n i m u m a n d m a x i m u m
s i z e s o f t h e s e c o m m o n m o t i f s . T a b l e 3 s h o w s s o m e b i g m o t i f s f o u n d i n c o m m o n i n a l l t h e t h r e e f a m i l i e s
a n d t h e n u m b e r o f e a c h s e q u e n c e ' s s e c o n d a r y s t r u c t u r e s t h a t c o n t a i n t h e m o t i f s . T h e s e m o t i f s s e r v e a s a
s t a r t i n g p o i n t t o c o n d u c t f u r t h e r s t u d y o f c o m m o n m o t i f a n a l y s i s 3 , 2 2 ] .
3
O n e c a n s p e e d u p t h i s m e t h o d b y e n c o d i n g t h e c a n d i d a t e m o t i f s i n t o a s u x t r e e a n d t h e n u s i n g t h e s t a t i s t i c a l s a m p l i n g
a n d o p t i m i z a t i o n t e c h n i q u e s d e s c r i b e d i n 2 3 ] t o n d t h e m o t i f s .
1 2
-
8/10/2019 Largest Common Sub Tree
13/16
**
TV
a
b c
r
y x z
a
b d
h i m p
j n
*
F i g . 8 . M a t c h i n g a V L D C p a t t e r n V a n d a t r e e T ( b o t h t h e p a t t e r n a n d t r e e a r e h y -
p o t h e t i c a l o n e s s o l e l y u s e d f o r i l l u s t r a t i o n p u r p o s e s ) . T h e r o o t i n V w o u l d b e m a t c h e d
w i t h n o d e s r x i n T , a n d t h e t w o l e a v e s i n V w o u l d b e m a t c h e d w i t h n o d e s i j a n d m n
i n T , r e s p e c t i v e l y . N o d e s y z h p i n T w o u l d b e c u t . T h e d i s t a n c e o f V a n d T w o u l d b e
1 ( r e p r e s e n t i n g t h e c o s t o f c h a n g i n g c i n V t o d i n T )
F a m i l y S e q u e n c e # o f m o t i f s f o u n d # o f c o m m o n m o t i f s m i n s i z e m a x s i z e
p o l i o v i r u s p o l i o 3 s a b i n s t r a i n 8 3 6 3 4 7 3 1 0 1
p o l 3 m u t 7 9 3
r h i n o v i r u s r h i n o 2 2 8 7 7 0 3 1 0
r h i n o 1 4 2 8 3
c o x s a c k i e v i r u s c o x 5 3 0 6 1 3 6 3 2 0
c v b 3 0 5 p r 3 9 1
T a b l e 2 . S t a t i s t i c s c o n c e r n i n g m o t i f s d i s c o v e r e d f r o m t h e s e c o n d a r y s t r u c t u r e s o f t h e m R N A s e q u e n c e s u s e d i n
t h e e x p e r i m e n t .
M o t i f s f o u n d p o l i o 3 p o l 3 m u t r h i n o 2 r h i n o 1 4 c o x 5 c v b 3 0 5 p r
( R ( M ( R ( I ( R ( H ) ) ) ) ( R ( B ( R ) ) ) ) ) 2 , 4 9 6 1 , 8 2 9 7 9 1 3 5 7 8 1 5 2 , 4 7 8
( R ( M ( R ( H ) ) ( R ( I ( R ) ) ) ) ) 3 , 0 2 4 3 , 0 0 0 3 , 0 0 0 8 0 1 2 , 9 9 7 2 , 9 9 9
( R ( B ( R ( B ( R ( B ( R ) ) ) ) ) ) ) 2 , 2 7 2 1 , 8 2 2 3 , 0 0 0 2 , 2 5 2 2 , 9 9 7 2 , 9 7 9
( R ( M ( R ) ( R ( I ( R ( H ) ) ) ) ) ) 2 , 0 7 4 1 , 7 1 2 3 , 0 0 0 7 0 2 2 , 9 9 7 2 , 9 9 9
( R ( M ( R ( I ( R ) ) ) ( R ( H ) ) ) ) 7 5 4 1 , 4 9 8 2 , 4 6 3 2 , 7 9 4 2 , 7 4 4 2 , 1 9 7
T a b l e 3 . M o t i f s f o u n d i n c o m m o n i n t h e s e c o n d a r y s t r u c t u r e s o f t h e p o l i o v i r u s , h u m a n r h i n o v i r u s a n d c o x s a c k -
i e v i r u s s e q u e n c e s . T h e m o t i f s a r e r e p r e s e n t e d i n a f u l l y p a r e n t h e s i z e d n o t a t i o n w h e r e t h e r o o t o f e v e r y s u b t r e e
p r e c e d e s a l l t h e n o d e s c o n t a i n e d i n t h e s u b t r e e . F o r e a c h m o t i f , t h e t a b l e a l s o s h o w s t h e n u m b e r o f e a c h s e q u e n c e ' s
s u b o p t i m a l s t r u c t u r e s t h a t c o n t a i n t h e m o t i f .
1 3
-
8/10/2019 Largest Common Sub Tree
14/16
T h e p r o p o s e d a l g o r i t h m a n d t h e d i s c o v e r e d m o t i f s h a v e a l s o b e e n a p p l i e d t o R N A c l a s s i c a t i o n s u c c e s s -
f u l l y 2 3 ] . O u r e x p e r i m e n t a l r e s u l t s s h o w e d t h a t o n e c a n g e t m o r e i n t e r s e c t i o n s o f m o t i f s f r o m s e q u e n c e s
o f t h e s a m e f a m i l y . T h i s i n d i c a t e s t h a t c l o s e n e s s i n m o t i f c o r r e s p o n d s t o c l o s e n e s s i n f a m i l y . A n o t h e r
a p p l i c a t i o n o f o u r a l g o r i t h m i s t o a p p l y i t t o a t r e e T a n d i t s e l f a n d c a l c u l a t e ( i j 0 ) f o r 1 i j j T j .
T h i s a l l o w s o n e t o n d r e p e a t e d l y o c c u r r i n g s u b s t r u c t u r e s ( o r r e p e a t s f o r s h o r t ) i n T . F i n d i n g r e p e a t s i n
s e c o n d a r y s t r u c t u r e s a c r o s s d i e r e n t R N A s e q u e n c e s m a y h e l p u n d e r s t a n d t h e s t r u c t u r e s o f R N A . R e a d e r s
i n t e r e s t e d i n o b t a i n i n g t h e s e p r o g r a m s m a y s e n d a w r i t t e n r e q u e s t t o a n y o n e o f t h e a u t h o r s .
O u r w o r k i s b a s e d o n t h e e d i t d i s t a n c e o r i g i n a t e d i n 1 7 ] . T h i s m e t r i c i s m o r e p e r m i s s i v e t h a n o t h e r
w o r t h y m e t r i c s ( e . g . 1 8 , 1 9 , 2 0 ] ) a n d t h e r e f o r e h e l p s t o l o c a t e s u b t l e m o t i f s e x i s t i n g i n R N A s e c o n d a r y
s t r u c t u r e s . T h e a l g o r i t h m p r e s e n t e d h e r e a s s u m e s a u n i t c o s t f o r a l l e d i t o p e r a t i o n s . I n p r a c t i c e , a m o r e
r e n e d n o n - u n i t c o s t f u n c t i o n c a n r e e c t m o r e s u b t l e d i e r e n c e s i n t h e R N A s e c o n d a r y s t r u c t u r e s 1 4 ] . I t
w o u l d t h e n b e i n t e r e s t i n g t o s c o r e t h e m e a s u r e s i n d e t e c t i n g c o m m o n s u b s t r u c t u r e s o r r e p e a t s i n t r e e s .
A n o t h e r i n t e r e s t i n g p r o b l e m i s t o n d a l a r g e s t c o n s e n s u s m o t i f T
3
i n t w o i n p u t t r e e s T
1
a n d T
2
w h e r e T
3
i s a l a r g e s t t r e e s u c h t h a t e a c h o f T
1
a n d T
2
h a s a s u b s t r u c t u r e t h a t i s w i t h i n a g i v e n d i s t a n c e t o T
3
. A
c o m p a r i s o n o f t h e d i e r e n t t y p e s o f c o m m o n s u b s t r u c t u r e s ( s e e a l s o 6 , 7 , 8 ] ) , p r o b a b l y b a s e d o n d i e r e n t
m e t r i c s ( e . g . 1 8 , 1 9 , 2 0 ] ) , a s w e l l a s t h e i r a p p l i c a t i o n s r e m a i n s t o b e e x p l o r e d .
A c k n o w l e d g m e n t s
W e w i s h t o t h a n k t h e a n o n y m o u s r e v i e w e r s f o r t h e i r c o n s t r u c t i v e s u g g e s t i o n s a n d p o i n t e r s t o s o m e r e l e -
v a n t p a p e r s . W e a l s o t h a n k W o j c i e o k K a s p r z a k ( N a t i o n a l C a n c e r I n s t i t u t e ) , N a t G o o d m a n ( W h i t e h e a d
I n s t i t u t e o f M I T ) a n d C h i a - Y o C h a n g f o r t h e i r u s e f u l c o m m e n t s a n d i m p l e m e n t a t i o n e o r t s . T h i s w o r k
w a s s u p p o r t e d b y t h e N a t i o n a l S c i e n c e F o u n d a t i o n u n d e r G r a n t s I R I - 9 2 2 4 6 0 1 , I R I - 9 2 2 4 6 0 2 , I R I - 9 5 3 1 5 4 8 ,
I R I - 9 5 3 1 5 5 4 , a n d b y t h e N a t u r a l S c i e n c e s a n d E n g i n e e r i n g R e s e a r c h C o u n c i l o f C a n a d a u n d e r G r a n t
O G P 0 0 4 6 3 7 3 .
R e f e r e n c e s
1 ] C . B u r k s , M . C a s s i d y , M . J . C i n k o s k y , K . E . C u m e l l a , P . G i l n a , J . E . - D . H a y d e n , G . M . K e e n , T . A .
K e l l e y , M . K e l l y , D . K r i s t o e r s o n , a n d J . R y a l s . G e n B a n k . N u c l e i c A c i d s R e s e a r c h , 1 9 : 2 2 2 1 { 2 2 2 5 ,
1 9 9 1 .
2 ] Y . C . C h e n g a n d S . Y . L u . W a v e f o r m c o r r e l a t i o n b y t r e e m a t c h i n g . I E E E T r a n s . P a t t e r n A n a l .
M a c h i n e I n t e l l . , 7 : 2 9 9 { 3 0 5 , M a y 1 9 8 5 .
3 ] K . M . C u r r e y a n d B . A . S h a p i r o . S e c o n d a r y s t r u c t u r e c o m p u t e r p r e d i c t i o n o f t h e p o l i o v i r u s 5 '
n o n - c o d i n g r e g i o n i s i m p r o v e d w i t h a g e n e t i c a l g o r i t h m . C o m p u t . A p p l i c . B i o s c i . , 1 3 ( 1 ) : 1 - 1 2 , 1 9 9 7 .
4 ] T . J i a n g , L . W a n g , a n d K . Z h a n g . A l i g n m e n t o f t r e e s { A n a l t e r n a t i v e t o t r e e e d i t . I n M . C r o c h e m o r e
a n d D . G u s e l d , e d i t o r s , C o m b i n a t o r i a l P a t t e r n M a t c h 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 0 7 ,
p a g e s 7 5 { 8 6 . S p r i n g e r - V e r l a g , 1 9 9 4 .
1 4
-
8/10/2019 Largest Common Sub Tree
15/16
5 ] S . - Y . L e , J . O w e n s , R . N u s s i n o v , J . - H . C h e n , B . A . S h a p i r o , a n d J . V . M a i z e l . R N A s e c o n d a r y s t r u c -
t u r e s : C o m p a r i s o n a n d d e t e r m i n a t i o n o f f r e q u e n t l y r e c u r r i n g s u b s t r u c t u r e s b y c o n s e n s u s . C o m p u t .
A p p l i c . B i o s c i . , 5 ( 3 ) : 2 0 5 { 2 1 0 , 1 9 8 9 .
6 ] S . L i u a n d E . T a n a k a . A l a r g e s t c o m m o n s i m i l a r s u b s t r u c t u r e p r o b l e m f o r t r e e s e m b e d d e d i n a p l a n e .
T e c h n i c a l R e p o r t o f t h e I n s t i t u t e o f E l e c t r o n i c s , I n f o r m a t i o n a n d C o m m u n i c a t i o n E n g i n e e r s , C O M P
9 5 { 7 4 , J a n . 1 9 9 6 .
7 ] S . L i u a n d E . T a n a k a . L a r g e s t c o m m o n s i m i l a r s u b s t r u c t u r e s o f r o o t e d a n d u n o r d e r e d t r e e s . M e m .
G r a d . S c h o o l S c i . & T e c h n o l . , K o b e U n i v . , 1 4 - A : 1 0 7 { 1 1 9 , 1 9 9 6 .
8 ] S . L i u a n d E . T a n a k a . T h e l a r g e s t c o m m o n s i m i l a r s u b s t r u c t u r e p r o b l e m . I E I C E T r a n s . F u n d a m e n t a l s ,
E 8 0 - A : 6 4 3 { 6 5 0 , 1 9 9 7 .
9 ] S . Y . L u . A t r e e - m a t c h i n g a l g o r i t h m b a s e d o n n o d e s p l i t t i n g a n d m e r g i n g . I E E E T r a n s . P a t t e r n
A n a l . M a c h i n e I n t e l l . , 6 ( 2 ) : 2 4 9 { 2 5 6 , M a r . 1 9 8 4 .
1 0 ] B . M o a y e r a n d K . S . F u . A t r e e s y s t e m a p p r o a c h f o r n g e r p r i n t p a t t e r n r e c o g n i t i o n . I E E E T r a n s .
P a t t e r n A n a l . M a c h i n e I n t e l l . , 8 : 3 7 6 { 3 8 7 , M a y 1 9 8 6 .
1 1 ] K . O h m o r i a n d E . T a n a k a . A u n i e d v i e w o n t r e e m e t r i c s . I n P r e p r i n t o f t h e W o r k s h o p o n S y n t a c t i c
a n d S t r u c t u r a l P a t t e r n R e c o g n i t i o n ( B a r c e l o n a , 1 9 8 6 ) . S y n t a c t i c a n d S t r u c t u r a l P a t t e r n R e c o g n i t i o n ,
E d s . G . F e r r a t e e t a l . , S p r i n g e r , 1 9 8 8 .
1 2 ] H . S a m e t . D i s t a n c e t r a n s f o r m f o r i m a g e s r e p r e s e n t e d b y q u a d t r e e s . I E E E T r a n s . P a t t e r n A n a l .
M a c h i n e I n t e l l . , 4 ( 3 ) : 2 9 8 { 3 0 3 , M a y 1 9 8 2 .
1 3 ] B . A . S h a p i r o . A n a l g o r i t h m f o r c o m p a r i n g m u l t i p l e R N A s e c o n d a r y s t r u c t u r e s . C o m p u t . A p p l i c .
B i o s c i . , 4 ( 3 ) : 3 8 7 { 3 9 3 , 1 9 8 8 .
1 4 ] B . A . S h a p i r o a n d K . Z h a n g . C o m p a r i n g m u l t i p l e R N A s e c o n d a r y s t r u c t u r e s u s i n g t r e e c o m p a r i s o n s .
C o m p u t . A p p l i c . B i o s c i . , 6 ( 4 ) : 3 0 9 { 3 1 8 , 1 9 9 0 .
1 5 ] L . G . S h a p i r o a n d R . M . H a r a l i c k . S t r u c t u r a l d e s c r i p t i o n s a n d i n e x a c t m a t c h i n g . I E E E T r a n s . P a t t e r n
A n a l . M a c h i n e I n t e l l . , 3 ( 5 ) : 5 0 4 { 5 1 9 , S e p . 1 9 8 1 .
1 6 ] D . S h a s h a , J . T . L . W a n g , K . Z h a n g , a n d F . Y . S h i h . E x a c t a n d a p p r o x i m a t e a l g o r i t h m s f o r u n o r d e r e d
t r e e m a t c h i n g . I E E E T r a n s a c t i o n s o n S y s t e m s , M a n a n d C y b e r n e t i c s , 2 4 ( 4 ) : 6 6 8 { 6 7 8 , A p r i l 1 9 9 4 .
1 7 ] K . - C . T a i . T h e t r e e - t o - t r e e c o r r e c t i o n p r o b l e m . J . A C M , 2 6 ( 3 ) : 4 2 2 { 4 3 3 , 1 9 7 9 .
1 8 ] E . T a n a k a . T h e m e t r i c b e t w e e n r o o t e d a n d o r d e r e d t r e e s b a s e d o n s t r o n g l y s t r u c t u r e p r e s e r v i n g
m a p p i n g a n d i t s c o m p u t i n g m e t h o d . I E C E T r a n s . , J 6 7 - D ( 6 ) : 7 2 2 { 7 2 3 , 1 9 8 4 .
1 9 ] E . T a n a k a . A m e t r i c b e t w e e n u n r o o t e d a n d u n o r d e r e d t r e e s a n d i t s b o t t o m - u p c o m p u t i n g m e t h o d .
I E E E T r a n s . P a t t e r n A n a l . M a c h i n e I n t e l l . , 1 6 ( 1 2 ) : 1 2 3 3 { 1 2 3 8 , D e c . 1 9 9 4 .
1 5
-
8/10/2019 Largest Common Sub Tree
16/16
2 0 ] ( a ) E . T a n a k a a n d K . T a n a k a . A m e t r i c o n t r e e s a n d i t s c o m p u t i n g m e t h o d . I E C E T r a n s . , J 6 5 - D ( 5 ) :
5 1 1 { 5 1 8 , 1 9 8 2 . ( b ) C o r r e c t i o n t o \ A m e t r i c o n t r e e s a n d i t s c o m p u t i n g m e t h o d . " I E I C E T r a n s . ,
J 7 6 - D - I ( 1 1 ) : 6 3 5 , 1 9 9 3 .
2 1 ] E . T a n a k a a n d K . T a n a k a . T h e t r e e - t o - t r e e e d i t i n g p r o b l e m . I n t e r n a t i o n a l J o u r n a l o f P a t t e r n R e c o g -
n i t i o n a n d A r t i c i a l I n t e l l i g e n c e , 2 ( 2 ) : 2 2 1 { 2 4 0 , 1 9 8 8 .
2 2 ] Z . T u , N . M . C h a p m a n , G . H u f n a g e l , S . T r a c y , B . A . S h a p i r o , J . R . R o m e r o , W . H . B a r r y , L . Z h a o ,
a n d K . M . C u r r e y . T h e c a r d i o v i r u l e n t p h e n o t y p e o f c o x s a c k i e v i r u s B 3 i s d e t e r m i n e d a t a s i n g l e s i t e
i n t h e g e n o m i c 5 ' n o n - t r a n s l a t e d r e g i o n . J . V i r o l o g y , 6 9 : 4 6 0 7 { 4 6 1 8 , 1 9 9 5 .
2 3 ] J . T . L . W a n g , B . A . S h a p i r o , D . S h a s h a , K . Z h a n g , a n d C . - Y . C h a n g . A u t o m a t e d d i s c o v e r y o f a c t i v e
m o t i f s i n m u l t i p l e R N A s e c o n d a r y s t r u c t u r e s . I n P r o c e e d i n g s o f t h e 2 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
K n o w l e d g e D i s c o v e r y a n d D a t a M i n i n g , p a g e s 7 0 { 7 5 , P o r t l a n d , O r e g o n , A u g u s t 1 9 9 6 .
2 4 ] A . K . W o n g , M . Y o u , a n d S . C . C h a n g . A n a l g o r i t h m f o r g r a p h o p t i m a l m o n o m o r p h i s m . I E E E
T r a n s a c t i o n s o n S y s t e m s , M a n a n d C y b e r n e t i c s , 2 0 : 6 2 8 { 6 3 9 , 1 9 9 0 .
2 5 ] K . Z h a n g a n d D . S h a s h a . S i m p l e f a s t a l g o r i t h m s f o r t h e e d i t i n g d i s t a n c e b e t w e e n t r e e s a n d r e l a t e d
p r o b l e m s . S I A M J o u r n a l o n C o m p u t i n g , 1 8 ( 6 ) : 1 2 4 5 { 1 2 6 2 , D e c . 1 9 8 9 .
2 6 ] K . Z h a n g , D . S h a s h a , a n d J . T . L . W a n g . A p p r o x i m a t e t r e e m a t c h i n g i n t h e p r e s e n c e o f v a r i a b l e
l e n g t h d o n ' t c a r e s . J o u r n a l o f A l g o r i t h m s , 1 6 ( 1 ) : 3 3 { 6 6 , J a n . 1 9 9 4 .
2 7 ] K . Z h a n g , J . T . L . W a n g , a n d D . S h a s h a . O n t h e e d i t i n g d i s t a n c e b e t w e e n u n d i r e c t e d a c y c l i c g r a p h s .
I n t e r n a t i o n a l J o u r n a l o f F o u n d a t i o n s o f C o m p u t e r S c i e n c e , 7 ( 1 ) : 4 3 { 5 7 , M a r c h 1 9 9 6 .
1 6