p282-boyce

  • Upload
    mgnt

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

  • 8/7/2019 p282-boyce

    1/8

    Finding Extrem al PolygonsJames E . Boyce 1, David P . Dobkin 2,

    Robert L . (Sco t ) Drysdale . 1H a, and L eo i Guibas 4

    1 .

    A b s t r a c tGi ve n n po i nt s i n the p l ane , we pr e se nt a l gor i thms for f i ndi ng maxi mumpe r i me te r or ar ea conv e x k -gons w i th ve r t i c e s k o f the g i ve n n po i nt s .O u r a l g o r i t h m s w o r k i n l i n e a r s p a c e a n d t i m e O ( k n l g n - I - n l g 2 n ).F o r th e s p e c ia l c a s e k : 3 w e g i v e O ( n l g n ) a l gor i thms for the sep r o b l e m s . S e v e r a l r e l a t e d i s s u e s a r e d i s c u s s e d .

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

    I n t h i s p a p e r w e p r e s e n t e f f i c i e n t a l g o r i t h m s f o r c e r t a i n g e o m e t r i co p t i m i z a t io n p r o b l e m s i n t h e p la n e . T y p i c a l o f t h e s e p r o b l e m s i st h e f o l l o w i n g . W e a r e g i v e n n p o i n t s i n t h e p l a n e a n d w i s h toc h o o s e a c o n v e x k - g o n w i t h v e r t i c e s k o f th e g i v e n p o i n t s a n d w h o s ep e r i m e t e r i s m a x i m a l . T h e s p e c i a l c a s e k = 2 i s th e c la s s i ca l p r o b l e mo f f i n d i n g t h e diameter o f a p o i n t s e t i n t h e p l a n e . A n a l g o r i t h mp r e s e n t e d i n t h i s p a p e r w il l f i nd t h e m a x i m u m p e r i m e t e r / c - g o n i nt i m e O ( k n l g n -~- l g 2 n ) , a n d l i n e ar s p a c e . T h e c o r r e c tn e s s o f o u ra l g o r i t h m i s b a s e d o n c e r t a i n i n t e r e s t i n g c o m b i n a t o r i a l p r o p e r t i e s o fe x t r e m a l p e r im e t e r p o l y g o n s . S u p r i s in g l y , t h e s a m e c o m b i n a t o r ia lp r o p e r t i es h o l d f o r p o l y g o n s e x t r em a l u n d e r o t h e r m e a s u r e s a s w e ll ,s u c h a s a re a . T h u s a n i s o m o r p h i c a l g o r i t h m c a n b e u s e d t o f i n d t h el a r g e s t a re a c o n v e x k - g o n w i t h v e r t ic e s k o f t h e n g i v e n p o i n t s ( w i t h i nt h e s a m e t i m e b o u n d ) . F o r t h e c a s e k = 3 , a s p e c i a l t r i ck a l l o w s u st o s o l v e t h e se p r o b l e m s i n t i m e O ( n l g n ) .W e b e g i n o u r p r e s e n t a t i o n b y s t u d y i n g , i n s e c t io n 2 , s o m e o f t h ec o m b i n a t o r i a l p r o p e r t i e s o f e x t r e m a l p o l y g o n s . I n s e c t i o n 3 w e u s et h e s e p r o p e r t i es a n d a d y n a m i c p r o g r a m m i n g a p p r o a c h t o d e v e l o pa n a l g o r i t h m f o r f i n d i n g a m a x i m a l rooted k - g o n i n t i m e O ( k n l g n ) .T h e n i n s e c t i o n 4 w e u s e t h e r o o t e d p o l y g o n a l g o r i t h m t o o b t a i n t h er e s u l t s s t a t e d a b o v e .

    l Stanford University, upported by NSF grant MCS 77-237382 Princeton University,visitingat Xerox PARC3 Dartmo uth College, visitingat Xerox PARC and suppo rted by NSF grant MCS 77-053134 Xerox PARC

    P e r mi ss i on to c o p y w i t h o u t f e e a l l o r p a r t o f this material i s grantedpr ov i de d that the copi e s ar e n o t m a d e o r d i s t r i b u t e d f o r d i r e c tc o m m e r c i a l a d v a n t a g e , t h e A C M c o p y r i g h t n o t i c e a n d the t i t le o f t h epubl i ca t i on and i t s date a p p e a r , a n d n o t i c e i s g i v e n t h a t c o p y i n g i s b yp e r m i s s i o n o f t h e A s s o c i a t i o n f o r C o m p u t i n g M a c h i n e r y . T o c o p yothe r wi se , or to r e publ i sh , r e qui r e s a fe e and/or spe c i f i c pe r mi ss i on . 1 9 8 2 A C M O - 8 9 7 9 1 - 0 6 7 - 2 / 8 2 / O 0 5 / 0 2 8 2 $ 0 0 . 7 5

    T h e d i a m e t e r , a s w e ll a s s o m e o t h e r v a r i a n t s o f t h e s e p ro b l e m s , ar eq u i t e o l d , b u t f a s t a l g o r i t h m s fo r t h e m a r e r e l a ti v e l y n e w . S e v e r a la u t h o r s h a v e g i v e n a l g o r i t h m s f o r p a r t i c u l a r c a s e s , w h i c h r e q u i r e t h a tt h e c o n v e x h u l l o f o u r g i v e n c o l l e ct i o n o f p o i n t s b e f o u n d f i rs t. S h a m o s[ S h ] w a s t h e f i r s t t o p r e s e n t a n a l g o r i t h m f o r t h e d i a m e t e r p r o b l e mw h i c h w o r k s i n l i n e a r t i m e ( o n c e t h e c o n v e x h u l l i s g i v e n ) . H e a l s og a v e a l i n e a r a l g o r i th m f o r f in d i n g t h e m a x i m u m a r e a q u a d r i l a t er a lw i t h v e rt i c es f o u r o f t h e g i v e n p o i n t s . D o b k i n a n d S n y d e r [D S ]g a v e a l i n e a r ti m e a l g o r i t h m f o r t h e m a x i m u m a r e a t r ia n g l e. O u rd y n a m i c p r o g r a m m i n g i d e a s i n s e c t i o n 3 a r e s i m i la r t o t h o s e d i s c u s s e db y F . Y a o i n [ YF F ]. T h e q u a d r a n g l e i n e q u a l i t y o f t h a t p a p e r c a n b eu s e d t o g i v e u s a n O ( n z l g n ) a l g o r i t h m f o r t h e m a x i m u m p e r i m e t e rt r i an g l e p r o b l e m . " Pa e p r o b l e m o f f i n d i n g t h e m i n i m u m a r e a e l l ip s ec o n t a i n i n g a c o l l e c t i o n o f p o i n t s w a s t h e s u b j e c t o f r e c e n t w o r k b yP o s t [ P ] . T h e r o u t i n g p a p e r o f D o l e v a n d S i e g e l [ D O S] u s e s a d i v i d ea n d c o n q u e r a p p r o a c h s i m i l a r to o u r s . F i n a l l y , A . Y a o [ YA ] g a v e t h ef i r s t s u b q u a d r a t i c a l g o r i t h m f o r f i n d i n g t h e d i a m e t e r o f a s e t o f p o i n t si n 3 - s p a c e .A s i s o f t e n t h e c a s e i n g e o m e t r i c a r g u m e n t s , t h e r e i s i s c o n s i d e r a b l es u b t l e ty i n s o m e o f t h e c o r re c t n e s s p r o o f s r eq u i r e d . W e e x h i b i te x a m p l e s w h i c h s h o w t h a t o t h e r p l a u s i b l e a l g o ri t h m s m a y f ai l to f i n dt h e t ru l y m a x i m u m k - g o n s . A n d o u r t e c h n i q u e s d o n o t o b v i o u sl yg e n e r a li z e to d i m e n s i o n s h i g h e r t h a n 2 , w h e r e e v e n t h e d i a m e t e rp r o b l e m i s n o t k n o w n t o b e s o l v a b l e i n n e a r ly l i n e a r t i m e . A g a i n w eg i v e e x a m p l e s t h a t s h o w h o w p l a u s i b l e g e n e r a l i z a t i o n s c a n f a il . T h e s er e m a r k s a r e a m p l i f i e d i n s e c t i o n 5 .S o m e o f o u r r e s u l t s d u a l i z e i n a n a t u r a l f a s h i o n . W e c a n f i n d , u n d e rc e r ta i n c o n d i t i o n s , m i n i m u m a r e a o r p e ri m e t e r k - g o n s s u r r o u n d i n g( c i r c u m s c r i b i n g ) o u r c o l l e c t i o n o f p o i n t s , b y e x a c t l y a n a l o g o u s te c h -n i q u e s . A b r i e f d e s c r i p t i o n o f th e s e r e s u l t s a p p e a r s i n s e c t i o n 6, a l o n gw i t h a m e n t i o n o f s o m e a p p l ic a t i o ns .W e h a v e a l s o c o n s i d e r e d t h e p r o b l e m o f o b t a in i n g m i n i m u m p e r i m e t e rk - g o n s w i t h v e r ti c e s a m o n g o u r n p o i n t s . W e h a v e a n O ( k 4 n l g n " l -( ~ k k / a ) k ! k n ) a l g o r i t h m f o r t h i s p r o b l e m b a s e d o n f i n d i n g a n e x t e n d e dV o r o n o i d i a g r a m o f o u r p o i n ts . W e p l a n t o r e p o r t o n t hi s r e s u l te l s e w h e re . T h e c a s e o f m i n i m u m a r e a s e e m s t o b e s i g n i f i ca n t ly h a r d e r( p o s s i b l y b e c a u s e s m a l l p e r i m e t e r i m p l i e s t h a t t h e v e r t i c e s a r e w e l ll o c a l i z e d i n s p a c e , b u t s m a l l a re a d o e s n o t ) . T h e b e s t b o u n d f o rt h e m i n i m u m a r e a t ri a n g l e h a s b e e n o b t a i n e d b y D o b k i n a n d M u n r o[ D M ] a n d i s O ( n z l g n ) .

    2 . T h e s t r u c t u re o f e x t r e m a l p o l y g o n sI n t h i s s e c t i o n w e i n v e s t i g a te a n u m b e r o f p r o p e r t i e s p o s s e s s e d b ym a x i m a l p o l y g o n s i n e i t h e r t h e a re a o r t h e p e r i m e t e r s e n s e , T h e n e x ttw o s e c t i o n s u s e t h e s e p r o p e r t i e s i n o r d e r t o d e v i s e e f fi c i e n t a l g o r i t h m sf o r f i n d i n g s u c h p o l y g o n s .

    2 8 2

  • 8/7/2019 p282-boyce

    2/8

    tF igu re 1 . Max ima l k -gons use ve r ti ces o f t he con vex hu l l

    I n f o r m a l l y s p e a k i n g , i t i s v e r y p l a u s i b l e t h a t t h e v e r t i c e s o f m a x i m a lp o l y g o n s s h o u l d b e s o u g h t a m o n g t h e e x t r e m a l p o i n t s i n o u r c o l le c t io n .T h i s i n t u i t i o n i s b r o u g h t o u t b y t h e f o l l o w i n g t h e o r e m . S e e a ls o f ig .1 . N o t e t h a t w e a l lo w o u r p o l y g o n s to c o n t a i n d u p l i c a t e d v e r t i c e s .Theorem 1 . l . T h e v e r ti c es o f co n v e x k - g o n s m a x i m a l i n a r e a o rp e r i m e t e r a r e p o i n t s o n t h e c o n v e x h u l l o f o u r c o l l e c t i o n o f p o i n t s .F o r p e r i m e t e r a s l i g h t l y s t r o n g e r a s s e r t i o n i s a c t u a l ly t r u e . T h e v e r t i c e so f m a x i m a l k - g o n s m u s t b e e s s en t i al v e r ti c es ( c o m e r s ) o f t h e p o l y g o nw h i c h i s t h e c o n v e x c l o s u r e o f o u r p o i n t c o l l e c t i o n .Proof." L e t A b e a v e r t e x o f a m a x i m a l k - g o n a n d a s s u m e t h a t A i si n t e r i o r t o t h e c o n v e x h u l l . L e t B a n d C d e n o t e t h e n e i g h b o r v e r t i c e so f A o n t h e k - g o n .I f o u r k - g o n i s m a x i m a l i n a r e a , t h e n c o n s i d e r a l i n e p a r a l l e l t o l i n eB C s w e e p i n g t h e p l a n e f r o m B C t o w a r d s v e r t e x A . S i n c e A i s n o to n t h e c o n v e x h u l l , s o m e p o i n t A ' o t h e r t h a n A , w i ll b e t h e l a s t p o i n to f o u r s e t e n c o u n t e r e d i n t h e s w e e p o f t h i s l i n e . C l e a r l y t h e t r i a n g l eA ' B C h a s l a rg e r a re a t h a n A B C , a n d t h u s A ' c a n b e s u b s t i t u t e d f o rA t o g i v e u s a l a rg e r a r e a k - g o n , a c o n t r a d i c t i o n . ( I f A t m a k e s t h ep o l y g o n n o n - c o n v e x , t h e n j u s t r e p l a c e i t b y i t s c o n v e x h u l l, w h i c h h a sstill larger area.)S i m i l a rl y , i f o u r k - g o n i s m a x i m a l i n per ime te r , t h e n c o n s i d e r t h ee l l i p se p a s s i n g t h r o u g h A . w i t h B a n d C a s f o ci , a n d i t s t a n g e n t a t t h ep o i n t A . I f A i s i n t e r i o r t o t h e c o n v e x h u l l , t h e n t h e r e i s a p o i n t o fo u r s e t o n t h e o t h e r s i d e o f t h e t a n g e n t f r o m t h e e l l i p se , a n d t h a t p o i n tc a n f u n c t i o n a s t h e p o i n t A ' a b o v e , s in c e A ' B + A ' C > A B - 1- A C .( A g% i n , c o n v e x i f i c a t i o n m a y b e n e c e s s a r y . B u t i t i s w e l l - k n o w n t h a n ac o n v e x p o l y g o n e n c l o s in g a n o t h e r h a s l a r g e r p e r i m e t e r. )I n t h e p e r i m e t e r c a s e , A m u s t i n f a ct b e a c o r n e r o f t h e c o n v e xh u l l , s i n c e i f a p o i n t i s c o n s t r a i n e d t o l i e o n a l i n e s e g m e n t , i t ss u m o f d i s t a n c e s t o . tw o o t h e r p o i n t s i s m a x i m i z e d a t a n e n d p o i n to f t h e s e g m e n t . T h i s i s a s i m p l e c o n s e q u e n c e o f t h e c o n v e x i ty o fe l l ip s e s . C o n s i d e r t h e s m a l l e s t e l li p s e w i t h f o c i t h e t w o o t h e r p o i n t sa n d c o n t a i n i n g b o t h e n d p o i n t s o f o u r s e g m e n t . T h a t e l l i p se c o n t a i n si n f a c t t h e w h o l e s e g m e n t .A l t h o u g h v e r t i c es o f m a x i m a l a r e a k - g o n s n e e d n o t b e c o m e r s o f t h ec o n v e x h u l l , m a x i m a l a r e a k - g o n s a l w a y s e x i s t w h i c h d o h a v e v e r ti c e sc o r n e r s o f t h e c o n v e x h u l l . |

    I n m a n y s i t u a t i o n s t h e a b o v e t h e o r e m i s a p o w e r f u l t o o l, a s t h e n u m b e ro f p o i n t s o n t h e c o n v e x h u l l o f a c o l le c t io n o f p o i n t s i s t y p ic a l ly m u c hl e s s t h a n t h e n u m b e r o f p o i n t s in t h e c o l l e c t io n . S e v e r a l r e s u l t s a r ek n o w n i n t h i s d i r e c t i o n w h i c h a r e s u m m a r i z e d i n S a n t a l o [ S ] . S i n c ew e a r e i n t e r e s t e d i n w o r s t - c a s e b e h a v i o r , h o w e v e r , i t m a y a p p e a r t h a tt h i s t h e o r e m d o e s n o t h e l p u s a t a l l , a s i n t h e w o r s t c a s e e a c h o f t h ep o i n t s i n o u r c o l l e c ti o n c o u l d b e a v e r t e x o f t h e c o n v e x h u l l . T h u sf i n d in g t h e co n v e x h u l l n e e d n o t r e d u c e t h e n u m b e r o f p o i n t s w e m u s tc o n s i d e r .T h e r e i s , h o w e v e r , a n o t h e r s i g n i f i c a n t a d v a n t a g e t o t a k i n g t h e c o n v e xh u l l , o t h e r t h a n t h r o w i n g a w a y a l l p o i n t s t h a t a r e n o t v e r t i c e s o fi t. T h i s i s t h a t t h e r e i s a w e ll d e f i n e d c y c li c o r d e r a m o n g t h er e m a i n i n g p o i n t s . T h e e x p l o i t a t i o n o f t h i s c y c l ic o r d e r i s t h e k e yt o t h e s u b s e q u e n t l e m m a s o n w h i c h t h e a l g o ri t h m s a re b a s e d . F r o mn o w o n w e w i l l a lw a y s a s s u m e t h a t t h e p o i n t s i n o u r c o l l e c t i o n l i eo n a c o n v e x p e r i m e t e r a n d t h u s c a n b e cy c l ic a l ly o r d e r e d . I t i s w e l lk n o w n t h a t t h e c o n v e x h u l l o f a s e t o f p o i n t s c a n b e c o m p u t e d i nt i m e O ( n l g n ) . ( s e e , fo r e x a m p l e , G r a h a m [ G ] ) a n d s i n c e a ll o f o u rt i m e b o u n d s a r e l a r g e r t h a n o r e q u a l t o t h i s , t h e y w i l l n o t b e a f f e c t e db y a s s u m i n g t h a t t h is p r e p r o c es s i n g s t ep h a s b e e n d o n e . I f f e w er t h a nk p o i n t s a r e l e f t a s v e r t i ce s o f t h e c o n v e x h u l l , t h e n w e c a n s t o p . O u rm a x i m a l p o l y g o n i s t h e c o n v e x h u l l w i t h s o m e v e r t i c e s t a k e n w i t hm u l t i p l i c i t y g r e a t e r t h a t 1 .I n t h e l e m m a s b e l o w w e w il l b e c o n s i d e ri n g s i m p l e c o n v e x p o l y g o n sw i t h v e r t ic e s s o m e s u b s e t o f o u r p o i n t s . T h e o r d e r i n g o f t h e v e r t i c esa l o n g t h e p o l y g o n w i ll a g r e e w i t h t h e c y c l ic o r d e r i n g o f t h e p o i n t sd i s c u s s e d a b o v e . W e w i ll b e i n t e r e s t e d in m a x i m a l p o l y g o n s t h a t a rec o n s t r a i n e d i n v a r i o u s w a y s . A rooted p o l y g o n w i l l b e a p o l y g o n w i t ho n e o f i t s v e r ti c e s f ix e d a t a g i v e n p o i n t . A n in te rva l i~ a co l lec t iono f p o i n t s c o n s e c u t i v e i n t h e c y c li c o r d e r i n g . T w o i n t e r v a l s w i ll b eca l led non-over lapp ing i f t h e y i n t er s e c t a t m o s t i n a c o m m o n e n d p o i n t .A res tr ic ted p o l y g o n i s o n e w h o s e v e r t i c e s a r e c o n s t r a i n e d t o l i e i ns u c c e s s i v e n o n - o v e r l a p p i n g i n t e r v a ls . A rooted re s tr ic ted p o l y g o n i s ar e s t r i c t e d p o l y g o n w i t h o n e v e r t e x c o n s t r a i n e d t o b e i n a d e g e n e r a t ei n t e r v a l c o n s i s t i n g o f a s i n g l e p o i n t. T w o p o l y g o n s w i t h v e r t i c e s p o i n t si n o u r c o l l e c t i o n a r e s a i d t o in te r leave , i f b e t w e e n e v e r y t w o s u c c e s s i v ev e r t i ce s o f o n e , t h e r e i s a v e r t e x o f t h e o t h e r ( p o s s i b l y c o i n c i d i n g w i t ho n e o f t h e m ) . I t i s c l e a r h o w t w o k - g o n s m a y i n t e r l e a v e . S e e f ig . 2 .B u t a k - g o n m a y a l s o i n t e r l e a v e a n l - g o n , f o r k ~ ;~ l , i f t h e y h a v es o m e c o i n c i d e n t v e r t i c e s .T h e f o l lo w i n g l e m m a s a p p l y t o m a x i m a l k - g o n s i n e i t h e r t h e p e r i m e t e ro r a r e a s e n s e w i th v e r t i c e s i n o u r c o l l ec t i o n o f p o i n t s . ( B u t b o t hm u s t b e m a x i m a l i n t h e s a m e s e n s e . ) T h e y p r o v i d e t h e b a s i s f o r o u ra l g o r i t h m s .L e m m a 2 1 . A m a x i m a l r o o t e d k - g o n a n d a m a x i m a l r o o t e d ( k + 1 ) -g o n s h a r i n g t h e s a m e r o o t i n t e r l e a v e .

    Figure 2 . Two in ter leav ing k-gons.

    2 8 3

  • 8/7/2019 p282-boyce

    3/8

    L e m m a Z 2 . A ( g l o ba l l y) m a x i m a l k - g u n a n d a m a x i m a l r o o t e dk - g u n i n t e r l e a v e .W e w i ll s a y t h a t k c o n s e c u t i v e n o n - o v e r l a p p i n g i n t e r v a l s / 1 , I 2 , , I ka re spanning , i f w h e n e v e r a m a x i m a l k - g o n h a s a v e r te x i n o n e o ft h e m , i t h a s e x a c t l y o n e v e r t e x i n e a c h o f t h e m .L e m m a 2 . 3 . L e t I I , I 2 , . . . , I k b e k s p a n n i n g i n t e r v a l s , a n d l e t xb e a p o i n t i n / 1 . C o n s i d e r t h e m a x i m a l r es t r ic t e d k - g o n r o o t e d a tz , w i t h i t s r e m a i n i n g v e r t i c e s c o n s t r a i n e d t o l i e o n e i n e a c h o f t h ei n t e r v a l s I s , . . . , I k r e s p e c t i v e l y . T h e v e r t i c e s o f t h i s k - g o n s u b d i v i d ee a c h o f o u r i n t e rv a l s i n to t w o n o n - o v e r l a p p i n g p a r ts ( b o t h c o n t a i n i n gt h e s u b d i v i d i n g v e rt e x ). L e t t h e s e p a r t s b e c a l le d L j a n d R j f o r t h ei n t e r v a l I j , i n t h e o r d e r i n w h i c h t h e y o c c u r a l o n g t h e c y c l ic o r d e r .T h e n b o t h L 1 , L 2 , . . . , I L k , a n d F l l , R 2 , . . . , R k a r e s p a n n i n g s e t s o fk in te rva ls .T h e b a s i c t o o l i n t h e p r o o f s o f t h e s e l e m m a s i s i s w h a t w e c a l l t h ecross ing t rans form a p p l i e d t o t w o p o l y g o n s , a t r a n s f o r m a t i o n t h a t i sa l w a y s m e a s u r e ( p e r i m e t e r o r a r e a ) i n c re a s i n g . T h e i d e a o f t h e c r o s s i n gt r a n s f o r m i s i l l u s t r a t e d i n fi g . 3 . I t is a p p l i c a b l e w h e n e v e r w e h a v et w o a d j a c e n t v e r t i c e s o f o n e p o l y g o n t h a t a r e n o t s e p a r a t e d b y a v e r t e xo f t h e o t h e r. T h e t r a n s f o r m s i m p l y i n t e r c h a n g e s t h e t w o n o n - c r o s s i n ge d g e s s h o w n w i t h t h e t w o c r o s s i n g d ia g o n a l e d g e s . O f c o u r s e t h i sn o w h a s m e r g e d o u r t w o p o l y g o n s i n to a s i n g l e ( n o n - s im p l e ) p o l y g o n .A s i t t u r n s o u t , h o w e v e r , i n o u r c o n t e x t t h e r e w i l l a l w a y s b e a n o t h e rp l a c e w h e r e t h e c r o s s i n g t r a n s f o r m c a n b e a p p l i e d a s w e l l , a n d t h i ss e c o n d a p p l i c a t i o n w i l l b r e a k u p t h i s p o l y g o n i n t o t w o s i m p l e p o l y g o n sa g a i n. T h e t w o r e s u l t in g p o l y g o n s w il l b e s h o w n t o h a v e a c o m b i n e dm e a s u r e t h a t e x c e e d s t h e m e a s u r e o f t h e t w o o r i g i n al p o l y g o n s . T h i ss t a t e m e n t i s in f a c t t r u e e v e n a f t e r t h e a p p l i c a t i o n o f a s i n g l e c r o s s i n gt r a n s f o r m , i f w e t a k e c a r e t o d e f i n e t h e p e r i m e t e r a n d a r e a o f a n o n -s i m p l e p o l y g o n a p p r o p r i a t e l y . I t a l s o i m p l i e s t h e f o l l o w i n g i n t e r e s t i n gcombina tor ia l r e su l t . .L e m m a 2 . 4 . I f w e a r e g i v e n 2 k p o i n t s f o r m i n g t h e v e r t i ce s o f ac o n v e x 2 k - g o n , t h e n t h e w a y t o b r e a k t h e m t h e m u p i n t o t w o g r o u p so f k e a c h s o a s to m a x i m i z e t h e s u m o f t h e p e r i m e t e r s o f t h e t h et w o c o n v e x k - g o n s t h u s f o r m e d , i s to u s e a l l t h e o d d v e r t i c e s f o r o n ek - g o n a n d a l l e v e n o n e s f o r t h e o t h e r .W e n o w p r o c e e d t o m a k e p r e c i s e t h e a b o v e i n f o r m a l r e m a r k s , a n dp r o v e t h e s e l e m m a s . W e i n t e n d t o a p p l y t h e n o t i o n s o f p e r i m e t e r a n da r e a t o n o n - s i m p l e p o l y g o n s , a s w e ll a s p o l y g o n s c o n s i s t i n g o f d i s jo i n tc o l l e c t i o n s o f v e r t e x c y c l e s . I t i s c l e a r h o w t o d e f i n e t h e p e r i m e t e r o fa n y s u c h p o l y g o n . F o r a r e a , w e n e e d t o b e m o r e c a r ef u l . T h e a r e a o f

    F igu re 3 . The Cross ing T rans fo rm.

    a s i m p l e p o l y g o n c a n b e t h o u g h t o f a s t h e i n t e g r al o v e r t h e p l a n e o fa f u n c t i o n w h i c h i s 1 f o r p o i n t s i n s i d e t h e p o l y g o n , a n d 0 f o r p o i n t so u t s i d e . W e w i l l u s e a n a n a l o g o u s d e f i n i t i o n f o r a r b i t r a r y p o l y g o n s :w e j u s t i n t e g r a t e t h e winding number , w h i c h c o u n ts h o w m a n y t i m e st h e p o l y g o n w r a p s a r o u n d e a c h p o i n t ( i t c a n b e a n e g a t i v e q u a n t i t y ).T h u s f o r a r e a s c o v e re d t w i c e w e m u l t i p l e t h e o r d i n a r y a r e a b y t w o ,a n d s o o n.W e n o w c o n s i d e r t h e e f f e c t o f t h e c r o s s i n g t r a n s f o r m t o a g e n e r a l -i z e d p o l y g o n , w h i c h i n o u r c a s e c o n s i s t s o f t w o n o r m a l c o n v e xp o l y g o n s . T h e c r o s s i n g tr a n s f o r m a p p li e s w h e n e v e r w e h a v e f o u rv e r t i c e s A , B , C , D o c c u r i n g i n t h i s o r d e r i n t h e c y c l i c o r d e r i n g , b u ts u c h t h a t A a n d D a r e c o n s e c u t i v e v e r t ic e s o f t h e ( a ) p o l y g o n , a n d s oa r e B a n d C . T h e t r a n s f o r m b re a k s th e e d g e s A D a n d B e , a n d a d d st h e e d g e s A C a n d B D . N o t e t h a t e a c h v e r t e x s t i l l h a s d e g r e e t w o , s ot h e o u t c o m e i s a p o l y g o n . I t i s c l e a r t h a t t h i s t r a n s f o r m w i l l a l w a y si n c r e a s e t h e p e r i m e t e r o f t h e re s u l t i n g p o l y g o n , f o r w e a r e r e p l a c i n ga p a i r o f o p p o s i t e s i d e s o f a c o n v e x q u a d r i l a t e r a l w i t h i t s d i a g o n a l s .( I t i s a s i m p l e a p p l i c a t i o n o f t h e t r i a n g l e i n e q u a l i t y t o s h o w t h a t t h ed i a g o n a l s o f a c o n v e x q u a d r i l a t e r a l a l w a y s h a v e l o n g e r t o t a l l e n g t ht h a n e i t h e r p a i r o f o p p o s i t e s i d e s . )W h e n i t c o m e s t o a r e a i t i s n o t t r u e t h a t t h e c r o s s i n g t r a n s f o r m a l w a y sh e l p s . F o r t h i s c o n c l u s i o n w e n e e d s o m e a d d i t i o n al a s s u m p t i o n s ,w h i c h f o l l o w f r o m t h e m a x i m a l i t y o f t h e t w o i n i t ia l p o l y g o n s . F i r s tw e n e e d a n e l e m e n t a r y g e o m e t r i c f ac t . C o n s i d e r o u r s t a n d a r d c o n v e xq u a d r i l a t e r a l A B C D , a n d l e t t h e si d e s A B a n d C D i n t e r s e c t a t ap o i n t X o n t h e o p p o s i t e s i d e o f s i de B C f r o m A a n d D , a n d l e t t h ed i a g o n a l s . in t e r se c t a t t h e p o i n t Y , a s i n f i g . 4 . W e c l a i m t h a t t h e a r e ao f B O Y i s l e s s t h a n t h e a r e a o f A D Y . T h i s i s ea s i ly s e e n b y a d d i n gt o b o t h t ri a n g l e s t h e t r ia n g l e A B Y . W e m u s t c o m p a r e n o w t h e a r e a so f tr i an g le s A B C a n d A B D . T h e s e t ri a n gl e s h a v e a c o m m o n b a se ,A B , a n d t h e h e i g h t o f A . B C f r o m C i s c e r ta i n l y s m a l l er t h a t t h a t o fA B D f r o m D , a s fo l l ow s f r o m t h e a s s u m p t i o n t h a t X a n d D l i e o no p p o s i t e h a l f - p l a n e s w i t h r e s p e c t t o B C .

    X

    C

    A D

    Fig. 4. A geometr ic inequal i tyI t i s e a s y t o v e r if y t h a t t h e c h a n g e i n t h e a r e a o f o u r p o l y g o n w h e nt h e c r o s s i n g t r a n s f o r m i s a p p l i e d t o t h e c o n v e x q u a d r i l a t e r a l A B e Dis a ( A _ D Y ) - - a ( B C Y ) , w h e r e a d e n o t e s t h e a r e a f u n c t i o n . T h u s t h ec o s s i n g t r a n s f o r m w i l l i n c r e a s e t h e a r e a , a s l o n g a s w e c a n g u a r a n t e et h a t si d es A B a n d C D i n t e rs e c t o n t h e o p p o s i t e h a l f p l a n e o f B Cf r o m A a n d D . T h i s w i ll b e so , b e c a u s e o f t h e a s s u m p t i o n t h a t th e( s i m p l e ) p o l y g o n c o n t a i n i n g e d g e A_ D i s m a x i m a l . F o r s u p p o s e i n s t e a d

    2 8 4

  • 8/7/2019 p282-boyce

    4/8

    t h a t A B a n d C D i n t e r s e c t e d o n t h e s a m e s i d e o f B C a s A a n d D .C o n s i d e r E , t h e o t h e r n e i g h b o r o f D i n th e p o l y g o n c o n t a i n i n g A D ,a s in f ig . 5 . B y a s s u m p t i o n A B i n t e rs e c t s C D o n t h e o p p o s i t e s i deo f A D f r o m / 3 a n d C . S i n ce E l i es b e t w e e n D a n d A i n t h e c y c li co r d e r in g , i t m u s t a f o r t i o r i b e t h e c a s e t h at A E i n t e rs e c t s C D o n t h eo t h e r s i d e o f D E f r o m A a n d C . B y th e s a m e a r g u m e n t w e g a v ea b o v e , t r i a n g l e A C E h a s l a r g er a r e a t h a n t r i an g l e A D E , c o n t r a d ic t i n gt h e a r e a m a x i m a l i t y o f t h e p o l y g o n c o n t a i n i n g A D .

    C

    D

    B

    Fig . 5 . AB and CD m ust i n t e r sec t on t he o ther s i de o f BCF r o m w h a t w e s a i d s o f a r i t fo l l o w s t h a t , g i v e n t h e a s s u m p t i o n s o fl e m m a s 2 .1 a n d 2 .2 , w h e n e v e r t h e c r o s s i n g t r a n s f o r m c a n b e a p p l ie d ,i t w il l i n c r e as e b o t h p e r i m e t e r a n d a r e a . L e t u s t h i n k o f t h e i n t e r v a l sd e f i n e d b y s u c c e ss i v e ve r ti c es o f o n e o f o u r p o l y g o n s a s b u c k e t s i n t ow h i c h t h e v e r t i c e s o f t h e o t h e r p o l y g o n m a y f a ll . I f a b u c k e t g e t s n ov e r t i ce s , t h e n t h e s e v e r t i c e s c a n f u n c t i o n a s v e r t i c es B a n d C f o r a na p p l i ca t i o n o f t h e c r o s s i n g t r an s f o r m . F r o m t h e p i g e o n - h o l e p r i n c i p l ew e k n o w t h a t i f t h a t h a p p e n s , t h e n a n o t h e r b u c k e t w i l l g e t a t l e a s t t w ov e r ti c es . T w o c o n s e c u t i v e o f t h e s e c a n n o w f u n c t i o n a s / 3 a n d ( 7 f o ra n o t h e r a p p l i c a t i o n o f t h e c r o s s i n g t r a n s fo r m , t h i s t i m e w i t h t h e r o leo f t h e p o l y g o n s r e v e r s e d . I t is e a s y to c h e c k t h a t t h e f i rs t a p p l i c a t i o no f t h e c r o s s i n g t r a n s f o r m d o e s n o t i n v a l i d a t e t h e s e c o n d . S o i f t h ec r o s s i n g t r a n s f o r m c a n b e a p p l i e d o n c e , i t c a n b e a p p l i e d t w i c e , a n di n f a c t t h e s e c o n d a p p l i c a t i o n w i l l g i v e u s b a c k t w o s i m p l e p o l y g o n sw i t h t h e s a m e n u m b e r s o f v e rt i c e s ( a n d r o o t s ) a s th e o r i g i n a ls . B yt h e a s s u m p t i o n s o f m a x i m a l it y , t h e c r o s s in g t r a n s fo r m m u s t n o t b ea p p l i c a b l e , a n d t h e r e f o r e o u r p o l y g o n s in t e r l e a v e . T h i s c o m p l e t e s t h ep r o o f s o f l e m m a s 2 .1 a n d 2 .2 .G i v e n t h e m a c h i n e r y w e h a v e d e v e l o p e d s o f a r , w e l e av e l e m m a s 2. 3.a n d 2 .4 . a s s i m p l e e x e r c i s e s f o r t h e r e a d e r .

    3 . F i n d i n g m a x i m a l r o o t e d p o l y g o n sI n t h i s s e c t i o n w e d e v e l o p a n a l g o r i t h m f o r f i n d i n g a m a x i m a l r o o t e dk - g o n i n t i m e O ( k n l g n ) . T h e a l g o r i t h m p r o c e e d s i n s t a g e s , b yf i n d i n g s u c c es s i v el y m a x i m a l r o o t e d j - g o n s , f o r j = 3 , 4 , . . . , k . W ew i ll p o s t p o n e d i s c u s s i o n o f t h e i n i t i a l c a s e j - -- - 3 a n d f i r s t ta l k a b o u th o w w e g o f r o m a m a x i m a l j - g o n t o a m a x i m a l (3 ' - -k 1 )- g o n w i t h t h es a m e r o o t.

    L e m m a 2 .1 t e l l s u s t h a t e x a c t l y o n e v e r t e x o f t h e (3 " " q- 1 ) - g o n , o t h e rt h a n t h e r o o t . m u s t l ie i n e a c h o f t h e j i n t e r v a l s d e f i n e d b y t h e v e r t i c e so f t he m a x i m a l j- g o n . W e w il l u s e a d y n a m i c p ro g r a m m i n g m e t h o df o r f i n d i n g t h e ( 3 q - 1 ) - g o n , e x a m i n i n g e a c h o f t h e j i n t e r v a l s i n t o r n .N o t e t h a t i f l i d e n o t e s t h e l e n g t h o f t h e i - t h i n t e r v a l , t h e n

    E l i - . ~ n q - j .i =l

    T h e s u c c e s s i v e e x a m i n a t i o n o f i n t e r v a l s g i v e s r is e t o t h e f o r m a t i o no f p a rt i a l ( or i n c o m p l e t e ) p o l y g o n s a n d w e m u s t t a k e a m o m e n tt o p r o p e r ly d e f i n e o u r m e a s u r e s o f a r e a a n d p e r i m e t e r f o r s u c hp o l y g o n s . W e i n t r o d u c e th e n o t i o n o f a path, w h i c h i s j u s t as e q u e n c e o f v e rt i c e s . W e w i ll u s e g r e e k le t t e r s to d e n o t e p a t h s , r o m a nl e t t e r s t o d e n o t e p o i n t s , a n d s e m i c o l o n t o si g n i f y c o n c a t e n a t i o n . O u rp o l y g o n s c o r r e s p o n d t o c l o s e d p a t h s , t h a t i s s e q u e n c e s o f t h e f o r mP 0 ; P , ; P a ; . . - ; P ~; P 0 . W e d e f i n e o u r m e a s u r e s o f a r e a a n d p e r i m e t e rf o r p a t h s a s f o l l o w s :

    A ( a ; p k - - 1 ; p k ) - ~ A ( a ; p k - - 1 ) q - a ( po ; Pk - - *; pk ) ,an d

    P( a ; Pk - - -1 ;Pk) - -- - P( a; P k- -1) q - l ( p k - - 1 ; p~) ,w h e r e a ( p o ; p k - - 1 ; p k ) d e n o t e s t h e a r e a o f t r i a n g l e POPk- - a Pk , a n d/ ( P k - - l ; P k ) d e n o t e s t h e l e n g t h o f t h e e d g e Pk--*Pk.F o r o u r d y n a m i c p r o g r a m m i n g a l g o r i t h m w e w i ll u s e a m u l t i - s t a g eg r a p h t e c h n i q u e , a s d i s c u s s e d , f o r e x a m p l e , i n H o r o w i t z a n d S a h n i[ H S] . W e m a i n t a i n f o r e a c h p o i n t z i n t h e i - t h i n t e r v a l t h e b e s t (i .e .m a x i m a l i n m e a s u r e ) p a t h w i t h o n e p o i n t i n e a c h o f t h e p r e v i o u si n t e rv a l s a n d t e r m i n a t i n g a t t h e r o o t x . L e t u s d e n o t e s u c h a n o p t i m a lp a t h b y ~ r z . G i v e n t h e s e o p t i m a l p a t h s f o r t h e i - t h i n t e r v a l , w e n o ww a n t t o c o m p u t e t h e o p t i m a l p a t h s f o r th e ( i q - 1 ) - i n t e r v a l. T h i s c a nc l e a r l y b e d o n e i n t i m e l i l i + l , b y c o n s i d e r i n g f o r e a c h p o i n t w i nt h e ( i - a - 1 ) -s t i n t e r v a l e a c h p o s s i b l e p r e d e c e s s o r z i n t h e i - t h i n t e r v a l.H o w e v e r , o n c e a g a i n t h e i d e a o f th e c r o s s i n g t r a n s f o r m a t i o n w i l l a l l o wu s t o d o b e t t e r . T h i s i s c a p t u r e d i n t h e f o l lo w i n g l e m m a .Lemma 3 . 1 . I f y a n d z a r e t w o p o i n t s o n t h e ( i + 1 ) - s t a r c d e f i n e db y t h e v e r t i c e s o f a m a x i m a l r o o t e d i - g o n , B y ; Y ' ; Y a n d , g , ; z ' ; za r e r e s p e c t iv e l y tw o o p t i m a l i s t e p p a t h s l e a d i n g t o y a n d z , a n d i fy p r e c e d e s z i n t h e c y c li c o r d e r w i t h i n t h e ( i + 1 ) - s t a r c , t h e n y 'p r e c e d e s z ' i n t h e c y c l i c o r d e r w i t h i n t h e i - t h a r c .A g a i n , t h e i d e a o f t h e p r o o f i s t h a t i f t h i s w a s n o t s o t h e n t h e l a s t e d g e so f t h e t w o p a t h s d o n ' t c r o s s , a n d t h e r e f o r e b y a p p l y i n g t h e c r o s s i n gt r a n s f o r m o n e c a n g e t t w o o t h e r p a t h s w h o s e s u m o f m e a s u r e s e x c e ed st h e s u m o f m e a s u r e s o f t h e o l d p a t h s , a c o n t r a d ic t i o n . T h e d e t a i l s a reo m i t t e d , a s t h e y a r e i d e n t i c a l t o t h o s e d i s c u s s e d i n s e c t i o n 2 .L e m m a 3 .1 i m p l i e s t h a t . g i v e n t h e i - t h i n t e r v a l o p t i m a l p a t h s , w e c a nc o m p u t e t h o s e f o r t h e ( i - 1 - 1 ) - s t i n t e r v a l i n t i m e O ( l i l g l , + 1 - { - l i + , ) .T h i s i s s o b e c a u s e w e c a n c h o o s e z f o r t h e f i r s t t i m e t o b e t h e m e d i a np o i n t o f t h e ( i _4_ 1 ) - s t i n t e r v a l a n d f i n d t h e b e s t p a t h t o i t i n li s t e p s .N o w t h e p r e d e c e s s o r z ' o f z i n t h e b e s t p a t h d i v i d e s t h e i - t h i n t e r v a li n t o t w o s u b i n t e r v a l s o f t o t a l l e n g t h l i --1 - 1 . W e c a n n o w c o n s i d e rt h e 1 / 4 a n d 3 / 4 q u a r t i l e p o i n t s i n t h e ( i - 1- 1 ) - s t i n t e r v a l a n d f o r e a c ho f t h e m s e a r c h t h e a p p r o p r i a t e s u b i n t e r v a l o f t h e i - t h i n t e r va l . T h u st o g e t h e r t h e c o s t o f t h e s e s e a r c h e s w il l b e l , - -1 -1 . A t t h e n e x t s t e p w ew i ll b e a b l e t o d o f o u r p o i n t s o f t h e ( i - -I - 1 ) - s t i n t e rv a l i n t o t a l c o s tl i q- - 3 , a n d s o o n . T h u s t h e t o t al c o s t f o r a l l t h e s e a r c h e s i s

    lg 1~+,E l , + 2 - - 1 = O ( l i l g / , + x + l i + x ) -

    2 8 5

  • 8/7/2019 p282-boyce

    5/8

    S i n c e e ac h l i i s b o u n d e d b y n , w e c a n b o u n d l g l i b y l g n . I f w e n o ws u m a l l t h e c o n t r i b u t i o n s f o r t h e s u c c e s s i v e s t a g e s , t h e t o t a l s u m i sc l ea r ly b o u n d e d b y O ( n l g n ) . ( N o t e t h a t t h e l as t st a g e is a b it f u n n y ,a s t h e l a s t i n t e r v a l c o n t a i n s e x a c t ly o n e v e r t e x , n a m e l y t h e r o o t . ) W ec o n c l u d e t h a t o n c e w e h a v e a m a x i m a l r o o t e d j - g u n , w e c a n c o m p u t ea m a x i m a l r o o t e d ( j - q - 1 ) - g o n w i t h t h e s a m e r o o t i n l i n e a r s p a c e a n dt i m e O (n l g n ) .Theorem 3 .1 . A r o o t e d c o n s t r a i n e d k - g o n w h o s e v e r t i c e s a r ec o n s t r a i n e d t o l ie i n i n t e r v a l s o f to t a l l e n g t h n c a n b e c o m p u t e d i nt i m e O (n l g n ) .T o g e t s t a r t e d w e n o t e t h a t , f o r t h e p e r i m e t e r c a s e , L e m m a 2 . 1 h o l d se v e n f o r j - -- - 2 , s o w e c a n b e g i n b y f i n d i n g t h e m a x i m a l c h o r d o u t o ft h e r o o t z , w h i c h i s a l i n e a r t i m e o p e r a t i o n . F o r t h e m a x i m u m a r e ac a s e w e n e e d t h e f o l l o w i n g L e m m a .Lem ma 3.2. The m a x i m u m a r e a r o o t ed t r i a n g l e c a n b e f o u n d i nt i m e O ( n ) .Proof." A m e t h o d f o r d o i n g t h i s w o r k s l ik e S h a m o s ' s d i am e t e ra l g o r i t h m . L e t A b e t h e r o o t, a n d c o n s i d e r i t s n e i g h b o r v e r te x Bi n t h e cy c l i c o r d e r . W e c a n f i n d v e r t e x C , s o a s to m a x i m i z e t h ea r e a o f t ri a n g le A B C b y j u s t e x a m i n g f u r t h e r v e r ti c e s al o n g t h e c y c li co r d e r i n g a s l o n g a s t h e a r e a k e e p s i n c r e as i n g . T h e d i s t a n c e s o f p o i n t so n a c o n v e x f i g u r e t o a c h o r d f o r m a u n i m o d a l d i s t r i b u t i o n , s o a s s o o na s w e p a s s t h e m a x i m u m , w e k n o w t h a t w e h a v e f o u n d i t . I t i s c l e arf r o m c o n v e x i t y t h a t i f p o i n t B n o w a d v a n c e s a l o n g t h e c y c li c o r d e ri n g ,t h e n t h e b e s t c o r r e s p o n d i n g C a l so h a s t o m o v e i n t h e s a m e d i r e c t io n .T h u s a s B a d v a n c e s , C n e v e r h a s to b a c k u p , a n d t h i s g u a r a n t e e s t h el i n e a ri t y o f t h e m e t h o d . IIT h i s a l s o f o l lo w s , o f c o u r s e , f r o m t h e r e s u l t s o f [D S ]. C o m b i n i n g t h ea b o v e o b s e r v a t i o n s w e g e t t h e f o l l o w i n g r e s u l t .Theorem 3 .2 . A m a x i m a l r o o t e d k - g o n c a n b e c o m p u t e d in t i m eO ( k n l g n ) a n d l i n e a r s p a ce .

    4 . F l o a t i n g t h e r o o tI n t h i s s e c ti o n w e s h o w h o w t o o b t a i n a ( g l o b al l y ) m a x i m u m ( p e r i m e t e ro r a r e a ) k - g o n . T h e w o r d m a x i m u m , w h e n u s e d w i t h o u t o t h e rq u a l i f i e rs , w il l a l w a y s re f e r to a g l o b a l m a x i m u m . T o s t a r t w i t h ,w e f in d a m a x i m u m r o o t e d k - g u n , w i t h r o o t s o m e a rb i t ra r y p o i n tz . T h i s r o o t e d k - g o n p a r t it i o n s o u r p o i n t s i nt o k n o n - o v e r l a p p i n gi n t e r v a l s I I , I 2 , . . . , I k SO t h a t t h e m a x i m u m k - g o n h a s e x a c t ly o n ev e r t e x i n e a c h o f t h e m ( b y L e m r n a 2 .2 ). W e w i ll s h o w h o w , g i v e n t h i sp a r t it i o n i n g , w e c a n f i n d a m a x i m u m k - g o n i n a n a d d i t i o n a l O (n l g 2 n )t h n e .W e a c c o m p l i s h t h i s b y c h o o s i n g o n e o f t h e s e i n t er v a ls , s a y ./ , , a n dt h e n f i n d i n g th e m a x i m u m r o o t e d k - g o n s w i t h r o o ts e a c h o f t h e p o i n t si n I1 . F r o m s e c t i o n 3 w e k n o w t h a t w e c a n f i n d a r o o t e d r e s t r i c t e dk - g o n w h o s e v e r t i c e s a r e c o n s t r a i n e d t o l i e i n i n t e r v a l s o f t o t a l l e n g t hl i n t i m e O (l l g l ) . N a i v e l y a p p l i e d , t h i s w o u l d g i v e u s a n O ( n 2 g n )a l g o r i th m f o r c o m p u t i n g a l l t h e s e ro o t e d k - g u n s . H o w e v e r , w e c a n d ob e t t e r b y p r o c e e d i n g e x a c t l y a s i n t h e p r e v i o u s s e c t i o n .L e m m a 2 . 3 i m p l ie s t h a t o n c e w e c h o o s e a p o i n t z i n I , a n d f i n dt h e m a x i m u m k - g o n r o o t e d t h e r e , t h e n t h i s k - g u n w i ll p a r t i t io n t h eo r i g i n a l i n t e r v a l s i n t o t w o c o l l e c t i o n s , e a c h o f w h i c h i s s p a n n i n g . T h u sa g a i n w e c a n u s e a b i n a r y s u b d i v i s i o n t e c h n i q u e o n I1 , s o t h a t t h ec o st o f c o m p u t i n g a m a x i m u m k - g o n r o o te d a t t h e m e d i a n p o i n t o fI , wi l l be O (n l g n ), t h e n c o s t o f c o m p u t i n g m a x i m u m k - g o n s r oo t e da t t h e 1 / 4 a n d 3 / 4 p o i n t s o f I t w i ll j o i n t ly b e b o u n d e d b y O ( n l g n ) ,

    .

    a n d s o o n , f o r l g n i t e r a t io n s . T h e r e f o r e a l l t h e o p t i m a l k - g o n s w i t hr o o t s i n I , c a n b e f o u n d i n t im e O (n l g 2 n ) . T h e m a x i m u m k - g o n i st h e b e s t o f t h e m .Theorem 4.1. T h e m a x i m u m a r e a o r p e r i m e t e r k - g u n c a n b ec o m p u t e d i n t i m e O ( k n l g n - 5 n l g 2 n ) , a n d l i n e a r s p a c e .

    C o m m e n t s a n d c o u n t e r e x a m p l e sO u r p e r i m e t e r a l g o r i t h m f o r k - -- - 2 i s , o f c o u r s e , f i n d i n g t h e d i a m e t e ro f o u r p o i n t se t . N o t e t h a t o u r m e t h o d u s e s t i m e O ( n l g n ) t o f i n dt h e d i a m e t e r, e v e n a f t e r t h e c o n v e x h u l l h a s b e e n f o u n d . S h a m o s ' sm e t h o d , o n t h e o t h e r h a n d , r e q u i r e s o n l y t i m e O ( n ) f o r t h a t s t e p .H i s m e t h o d i s b a s e d o n s u p p o r t i n g l i n e s a n d u s e s t h e l e m m a t h a t t h ed i a m e t e r i s a l w a y s a n e d g e b e t w e e n t w o p o i n t s t h a t a r e e x t r e m a l a l o n gt w o d i r e c t i o n s i n t h e p l a n e , 1 8 0 a p a r t . O n e c a n s t a r t t w o p o i n t e r s a t ,s a y , t h e p o i n t s o f s m a l l e s t a n d l a r g e s t x v a l u e , a n d t h e n r o t a t e t h e ma r o u n d t h e c o n v e x h u l l s o a s t o f i n d a ll t h e s e e x t r e m a l p a i rs . N e i t h e rp o i n t e r e v e r b a c k s u p , s o t h e t o ta l c o s t f or t h i s m e t h o d i n O ( n ) .U n f o r t u n a t e l y t h e s u p p o r t i n g l i n e t e c h n i q u e d o e s n o t g e n e r a l i z e t ok > 2 . F o r e x a m p l e , t o f i n d a m a x i m u m p e r i m e t e r t ri a n g le , w e m i g h tc o n s i d e r a l l t r i p l e t s o f p o i n t s w h i c h a r e e x t r e m a l i n t h r e e d i r e c t i o n s ,1 2 0 a p a r t . A s b e f o r e , a l l t h e s e t r i p l e t s c a n b e f o u n d i n l i n e a r t i m eo n c e t h e c o n v e x h u l l i s g i v e n , b u t t h e e x a m p l e b e l o w s h o w s t h a t t h em a x i m u m p e r i m e te r t r i an g l e n e ed n o t b e a m o n g t h e m .C o n s i d e r t h e s i x p o i n t s A , B , C , D , E , F F w i t h c o o r d i n a t e s r e s p e c ti v e l y( 0 , 1 ) , ( 0 , - - 1 ) , ( 1 0 0 , 0 ) , ( . 3 , 1 . 2 ) , ( . 3 , - - 1 . 2 ) , a n d ( 9 9 . 9 , . 1 ) . S e ef ig . 6 . I t i s e a s y t o c h e c k t h a t .. 4_ B C i s t h e m a x i m u m p e r i m e t e rt r i a n g l e , b u t D a n d E a l w a y s s h e l t e r e i t h e r A o r B f r o m t o u c h i n g t h ec i r c u m s c r i b i n g t ri a n g le , e x c e p t w h e n A a n d B a r e o n t h e s a m e l in e .I n t h i s c a s e F s h e l t e r s C .

    A ,D

    E

    Fig. 6 . The sup por t ing l ine techn ique fa i lsW e h a v e , h o w e v e r , a c o n s t r u c t io n t h a t r e d u c e s t h e p r o b l e m o f f i n d i n gt h e m a x i m u m p e r i m e t e r r o o t e d t r i a n g le t o t h a t o f f i n d i n g t h e d i a m e t e ro f a c e r t a i n s e t_ a p r o b l e m t h a t w e c a n s o l v e w i t h a s u p p o r t i n g l i n e i d e ai n l i n e ar t im e . T h i s i m p l i e s t h a t w e c a n f i nd a m a x i m u m p e r i m e t e rt r i a n g l e i n t i m e O (n l g n ) .F o r o u r c o n s t r u c t i o n w e c o n s i d e r t h e f i g u r e o b t a i n e d b y d r a w i n g ac i r cl e w i t h c e n t e r e a c h o f o u r p o i n t s a n d r a d i u s i t s d i s t a n c e t o t o t h er o o t ( t o b e c a l l e d t h e f lower) . S e e f ig . 7 . C o n s i d e r t h e r o o t R , a n dt h e l i n e s e g m e n t j o i n i n g i t t o s o m e p o i n t X o n a c ir c le w i t h c e n t e rt h e p o i n t P , a s in fi g. 8 . T h e p o i n t X w i l l n o t b e c o n t a i n e d i n a n yo t h e r c i r c le , i f a n d o n l y i f p o i n t P i s a n e x t r e m a l p o i n t o f o u r o r i g i n a ls e t i n t h e d i r e c t i o n R X . T h u s t h e c o n v e x h u l l o f t h e f l o w e r c o n s i s t so f a l t e r n a t i n g c i r c u l a r a r c s a n d ( p o s s i b l y t r i v i a l ) s t r a i g h t l i n e s e g m e n t s .F u r t h e r m o r e t h e r e i s a t m o s t o n e a r c f r o m e a c h c i r cl e o n t h e h u l l ,a n d t h e y o c c u r i n t h e s a m e o r d e r a s t h e o r i g i n a l p o i n t s . W e l l - k n o w np r o p e r t i e s o f c o n v e x s e t s [I B] h n p l y t h a t t h e d i a m e t e r o f t h e c o n v e x

    2 8 6

  • 8/7/2019 p282-boyce

    6/8

    F ig . 7. Re duc i ng a roo ted t r i ang l e to a d i ame te r p rob l em

    X

    F i g. 8 . A cond i t i on fo r po i n t X to be on the bound a ry

    h u l l o f t h e f l o w e r c o n n e c t s t w o p o i n t s l y i n g o n c i r c u l a r a r c s a n d , s i n c et h e d i a m e t e r h a s t o b e n o r m a l t o t h e b o u n d a r y , i t p a ss e s t h r o u g h t h ec e n t e r s o f t h e c o r r e s p o n d i n g c i r cl e s . T h e t r i a n g l e w i t h v e r t i c e s R a n dt h o s e c e n t e r s h a s p e r i m e t e r e q u a l i n l e n g t h t o t h i s d i a m e t e r.C o n v e r s e l y , i t i s c l e a r t h a t a n y t r i a n g l e u n d e r c o n s i d e r a t i o n c o r r e s p o n d st o a l i n e s e g m e n t w i t h e n d p o i n t s o n o r i n t e r io r t o t h e c o n v e x h u l la n d l e n g t h e q u a l t o t h e p e r i m e t e r o f t h e t r ia n g l e. T h u s i f w e c a nf i n d t h e d i a m e t e r o f t h e c o n v e x h u l l o f t h e f l ow e r , w e h a v e f o u n dt h e m a x i m u m p e r i m e t e r t r i a n g le r o o t e d a t R . I t is e a s y t o c h e c k t h a t

    S h a m o s ' s d i a m e t e r a l g o ri t h m c a n b e a d a p t e d t o f i n d t h e d i a m e t e r o ft h i s c o n t i n u o u s f i g u r e i n l i n e a r t i m e . T h i s , c o u p l e d w i t h t h e f l o a t i n gt h e r o o t t e c h n i q u e o f s e c t io n 4 s h o w s t h e f o l l o w i n g t h e o r e m .Theorem 5.1. The m a x i m u m p e r i m e t e r t r i an g l e c an b e f o u n d i nt i m e O(n l g n ) .I t m a y b e o f i n t e r es t t o n o t e t h a t t h e s u p p o r t i n g l i n e i d e a d o e s n o te a s i l y g e n e r a l i z e t o t h r e e d i m e n s i o n s , e v e n f o r t h e d i a m e t e r c a s e , a s t h es u p p o r t i n g h y p e r p l a n e s a t a v e r t e x d o n o t h a v e a l i n e a r o r de r i n g . W em i g h t c o n s i d e r t h e f o ll o w i n g v a r ia n t : l e t s o m e f a ce o f t h e p o l y h e d r o na c t a s a b a s e , a n d l o o k a t t h e v e r t e x f u r t h e s t a w a y f r o m i t. L e t a l le d g e s f r o m t h a t v e r t e x t o s o m e v e r t ex o f t h e b a s e b e c a n d i d a t e s f o r t h ed i a m e t e r . N e x t w e r o l l t h e p o l y h e d r o n o n t o a n e w b a s e , a n d r e p e a tt h i s c o m p u t a t i o n . A f t e r a H a m i l t o n i a n r o l l t h r o u g h a l l t h e fa c e s , w em a y t h i n k t h a t w e h a v e f o u n d t h e d i a m e t e r . U n f o r t u n a t e l y w e h a v ea s i m p l e e x a m p l e t h a t s h o w s t h a t t h i s m e t h o d c a n m i s s .C o n s i d e r a r i g h t t r i a n g u l a r p r i s m w i t h c r o s s - s e c t i o n a n e q u i l a t e r a lt r i a n g l e , a n d a h e i g h t m u c h l a r g e r t h a n t h e s i d e o f t h e t ri a n g l e . A te a c h e n d o f t h e p r i s m c o n s t r u c t a r e g u l a r t e t r ah e d r o n , u s i n g t h e e n do f t h e p r i s m a s a b a s e . T h e p r i s m i s l o n g e n o u g h t h a t d i a g o n a l li n e sf r o m o n e e n d o f t h e p r i s m t o t h e o t h e r a r e o n l y s l i g h t ly l o n g e r t h a ni t s h e i g h t , s o t h e d i a m e t e r o f t h e o v e r a l l s o li d c o n n e c t s t h e a p e x o fo n e t e t r a h e d r o n t o t h e a p e x o f t h e o t h e r. H o w e v e r , t h e a p e x o f at e t r a h e d r o n i s n o t t h e f u r t h e s t p o i n t f r o m a n y f a c e. T h e s a m e s i t u a t i o no c c u r s a l s o i n t w o d i m e n s i o n s i f w e a r e n o t c a r e f u l a b o u t r e s o l v i n gt i e s , a s w e s e e i f w e a p p e n d t w o s l i g h t l y o b t u s e i s o s c e l e s t r i a n g l e s t o ar e c t a n g l e , b y g l u e i n g t h e i r l o n g s i d e s t o t h e r e c t a n g l e ' s s h o r t s i d e s , a si n f i g . 9 .

    F ig . 9 . A c o u n t e r e x a m p l eW h i l e w e a r e o n t h e s u b j e c t o f c o u n t e r e x a m p l e s , i t is w o r t h m e n t i o n i n gt h a t t w o m a x i m a l r o o t ed k - g o n s d o n o t n e c e ss a r il y in t e rl e a v e. T h ec r o s s in g a r g u m e n t b r e a k s d o w n w h e n i t f o r c es b o t h r o o t s o n t h es a m e p o l y g o n , a n d g i v e n b e lo w i s an a c t u a l e x a m p l e f o r k = 3 t h a ts h o w s t h e e x i s t en c e o f m a x i m a l n o n - i n t e r l e a v e d r o o t e d t r i a n g le s i n t h ep e r i m e t e r c a s e . B e g i n w i t h a n e q u i l a t e r a l t r i a n g l e i n s c r i b e d i n t h e u n i tc i r cl e , w i t h o n e v e r t e x a t ( 1 , 0 ) . T h e n c o n s t r u c t a s e g m e n t o f l e n g t h. 2 t a n g e n t t o t h e c ir c le a t e a c h v e r t e x , w i t h t h e s e g m e n t c e n t e r e d o nt h e v e r t e x . N o w p e r t u r b t h i s f ig u r e b y r a i s i n g A r a n d O ' b y . 0 1 ,a n d l o w e r i n g A a n d B b y . 0 1 , a z i n f ig . 1 0 . I t c a n b e c h e c k e d t h a tt h e l ar g e s t p e r i m e t e r t r ia n g l e r o o t e d a t A i s A B C , a n d t h e m a x i m u mr o o t e d t r i a n g l e r o o t e d a t A ' i s A'B'G'. T h e s e d o n o t i n t e r l e a v e o n ea n o t h e r , b u t b o t h i n t e r l e a v e t h e o v e r a l l m a x i m u m C'BC. A s i m p l ei l lus t r a t ion o f the sam e e f fec t for k = 2 i s in f ig . 11 .W e m e n t i o n e d i n t h e i n t r o d u c t i o n s o m e a l g o r i t h m s f o r f i n d in g m i n i -m u m k - g o n s b a s e d o n e x t e n d ed V o r o n oi d i ag r a m s . T h e k e y l e m m at h e r e i s t h a t m i n i m u m k - g o n s o c c u r a s s u b p o l y g o n s o f th e p o i n t sc o r r e s p o n d i n g t o a p a r t i c u l a r V o r o n o i r e g i o n . O n e c a n al s o c o n s i d e rt h e f u r t h e s t p o i n t V o r o n o i , a n d h o p e t h a t s i m i l ar t e c h n i q u e s c a n b eu s e d f o r m a x i m a l k - g u n s . H o w e v e r , t h i s i s n o t o b v i o u s l y t h e c a s e.L o o k a t a r e g u l a r 2 k - g o n . I ts f u r t h e s t p o i n t k - V o r o n o i c o n s i s t s o f 2 kw e d g e s , e a c h a s s o c i a t e d w i th t h e k c o n s e c u t i v e p o i n t s " o p p o s i t e " t h ew e d g e . T h e l a r g e st k - g u n o n t h e 2 k p o i n t s i s t h e r e g u l a r k - g u n u s i n ge v e r y s e c o n d p o i n t, s o i t c a n n o t b e d e t e r m i n e d f r o m t h i s f u r t h e s t p o i n tV o r o n o i .

    2 8 7

  • 8/7/2019 p282-boyce

    7/8

    AC , j ~ . .,

    C

    B '

    A ' \\ B

    F i g . 1 0 . M a x i m a l r o o t e d t r i a n g l e s d o n ' t i n t e r l e a v e

    a

    r l

    r 2F i g . 1 1. T w o m a x i m a l c h o r d s t h a t d o n o t c r o s s

    b

    F i n a l ly t h e D o b k i n - S n y d e r m e t h o d f o r f i n d i n g m a x i m a l a r e a t r ia n g l e si n l i n e a r d m e o n c e t h e c o n v e x h u l l i s g i v e n , f a i l s t o g e n e r a l i z et o k - ~ 5 . C o n s i d e r t h e s e v e n p o i n t s . A , B , C , . D , E , D ~ , E t w i t hc o o r d i n a te s re s p e ct i v el y ( - - 1 0 1 , 0 ) , ( 0 , 0 ) , ( 0 , - - 1 0 1 ) , ( - - 5 1 , 1 . 0 1 ) ,( - - - 5 0 , 1 ) , ( 1 . 0 1 , - - - 5 0 ) , ( 1 , - - - 5 1 ) , a s i n f ig . 1 2 . T h e l a r g e s t p e n t a g o nis A .D I3 D ~ C . T h e a l g o r i t h m s t a r t s w i t h A D E B D I. T h e D t p o i n tm o v e s t o C , g i v i n g A D E B C , t h e n n o t h i n g m o v e s . T h e b a s e p o i n t i sa d v a n c e d , s o w e h a v e D E B D ' C . A i s C lose r to the D D ~ l i n e t h a nC , s o n o t h i n g m o v e s . T h e b a s e p o i n t a d v a n c e s , g i v i n g . E B D ~ l g t C .C a d v a n c e s t o A a n d E ~ a d v a n c e s to C , g i v i n g E B D I C A . N o t h i n gm o v e s f u rt h e r . O n c e a g a i n w e a d v a n c e t h e b a s e p o i n t , a n d g e tB D ' E ' C A , A w i l l n o t m o v e , s o w e a d v a n c e t h e b a s e p o i n t a n d g e tD ~ E ~ C A D . D a d v a n c e s t o B , g i v i n g D ~ . E ~ C A B , a n d t h e n A w i lln o t m a r e . A g a i n ad v a n c i n g t h e b a s e g i v e s E ~ O .A .D B , a n d n o t h i n gm o v e s . A d v a n c i n g t h e b a s e a g a i n g iv e s C A . D E B , a n d n o t h i n g m o v e s .F i n a l l y t h e b a s e m o v e s a l a s t t i m e t o A D E B D ~, a n d w e a r e b a c k t ow h e r e w e s t a r t e d .

    6 . C i r c u m s c r i b e d p o l y g o n sO u r r e s u l t s d u a l i z e i n a n i n t e r e s t i n g fa s h i o n . W e c a n c o n s i d e r l i n e s ,o r a c t u a ll y h a l f s p a c e s i n t h e p l a n e , i n s t e a d o f p o i n t s . K e e p i n g o n l yp o i n t s o n t h e c o n v e x h u l l c o r r e s p o n d s t o k e e p i n g o n l y t h o s e l i n e sw h o s e h a l f s p a c e s s u p p o r t t h e i n t e r s e c t i o n o f a l l t h e h a l fs p a c c s . G i v e nn s u c h h a l f - sp a c e s i n t h e p l a n e , w e c an f i n d t h e k o f t h e m w h o s ei n t e rs e c t io n h a s m i n i m u m a r e a o r p e r i m e t e r b y a d u a l o f t h e o r i g in a la l g o r it h m . U n f o r t u n a t e l y t h i s d o e s n o t q u i t e s o lv e t h e p r o b l e m o ff i n d i n g t h e m i n i m u m p e r i m e t e r ( o r a re a ) k - g o n s u r r o u n d i n g a g i v e nc o l l e c t io n o f n p o i n t s .A c o m b i n a t i o n o f t h e o r i g i n a l a n d t h e d u a l a l g o r i t h m s l e t s u s f i n d a ni n s c r i b e d a n d a c i r c u m s c r i b e d k - g o n f o r a c o l l e c t io n o f p o i n t s . T h i si s a u s e f u l t o o l f o r m a n y c o m p u t e r g r a p h i c s a p p l i c a t i o n s , s u c h a s h i td e t e c t i o n o r o b j e c t i n t e r s e c t i o n , l f a p o i n t i s i n s i d e t h e i n s c r i b e d k - g o nt h e n i t i s i n s i d e t h e c o n v e x h u l l o f o u r n p o i n t s . I f i t i s o u t s i d e t h ec i r c u m s c r i b i n g k - g o n , t h e n i t ' s o u t s i d e t h e c o n v e x h u l l . I f it f a ll s i nt h e c r a c k b e t w e e n t h e t w o , t h e n a m o r e c o m p l i c a t e d m e t h o d c a n b eu s e d .S u c h i n c l u s i o n t e s t s a r e e s p e c i a l l y e f f i c i e n t f o r k - g o n s o f f i x e d s h a p e ,e . g . r e c t a n g l e s . A s u p p o r t i n g l i n e i d e a c a n b e u s e d t o f i n d s u c hm i n i m u m ( i n p e r i m e t e r o r a r e a ) c i rc u m s c r i b i n g k - g o n s w i t h s i d e s a tf ixed rela t ive angles . I f w e f i x t h e o r i e n t a t i o n s o f a l l t h e s i d e s , t h e nw e c a n f i nd t h e s m a l l e s t e n c l o s i n g k - g o n i n t i m e O ( k n ) . O n c e w eh a v e t h e v e r t i c e s a t w h i c h t h e s i d e s o f t h a t p o l y g o n t o u c h , w e c a nl e t t h e s e v e r t i c e s r o t a t e a r o u n d a n d o b t a i n t h e s m a l l e s t p o l y g o n f o ra l l o r i e n t a t i o n s i n u m e O ( k 2 n ) . T h e e x t r a f ac t o r o f k c o m e s i nb e c a u s e w e h a v e t o d o a n a r e a o r p e r i m e t e r c o m p u t a t i o n o n c e w eh a v e d e t e r m i n e d t h e s u p p o r t i n g v e r t i ce s o f t h e c i r cu m s c r i b i n g k - g o n .Acknowledgements : T h e a u t h o r s w i s h t o e x p r e s s t h e i r t h a n k s t oG r e g N e l s o n a n d L y l e R a m s h a w f o r t h e i r c o n t r i b u t i o n s t o t h e c o u n -t e r e x a m p l e s d i s c u s s e d in s e c t i o n 5 , a n d f o r m a n y h e l p f u l d i s c u s s i o n sr e l a t i n g t o t h e c u r r e n t w o r k . T h e y a l s o w i s h t o t h a n k S a r a T i e t z f o rh e r a s s i s t a n c e i n t h e p r e p a r a t i o n o f t h i s m a n u s c r i p t .

    D EoB

    D ~ E ~

    F i g . 1 2 . M i s s i n g t h e l a r g e s t a r e a p e n t a g o nC

    2 8 8

  • 8/7/2019 p282-boyce

    8/8

    .[DLI

    [DS]

    [DM][DOS]

    [G]

    [HS][m ][P]

    [S][ S h ]

    [YA]

    [YFI

    R e f e r e n c e sDobkin, D. P., and Lipton, R. J. On the C o mplex i t y o fCom putat ions under Vapying Sets o f Primit ives, J. of Comp,and Syst. Sciences, 18, 1979, 86-91Dobkin, D. P., and Snyder, L On a Gen era l M e tho dfo r M a x b n iz in g a n d M in imi zin g Am o n g C e r ta in Geo me t r icPro b lems . Twentie th IEEE Symposium o n the Founda tionsof Co mpu ter Sc ience , 1979, 9-17Dobkin, D. P., and Munro, I. personal communicat ionDolew, D., and Siegel, A. The Separat ion for General S ingle-La yer W ir in g Ba rri e rs, in VLSI Systems and Computa tions ,Com puter Sc ience Press , 1981, 143-152Graham, R. L . An E~ c ien t A lg o r i thm . f o r De te rmin ing theC o n vex H u l l o f a F in i t e P la n a r S et , Info. Pr oc . Le tt ., 1,1972, 132-133florowitz, E., and Sahni, Sartaj Fu n d a men ta ls o f C o mpu te rAlgori thms, Computer Sc ience Press , 1978laglom, I. M., and Boltyanskii, V. G. Convex Figures, Holt,Rinehart and Wifis ton, 1961Post. M. J . A Minimum Spanning El l ipse Algori thm, Twenty-second Annual IEEE Symposium on the Founda tions ofCom puter Sc ience , 1981, 115-122Santalo, L. A. In tegral G eometry and G eometric Probabi l i ty ,Addison-Wesley, 1976Shamos, M. I. Problem s in .Computat ional Geom etry ,Unpublished Manuscr ipt , June 1974. Revised May 1975,Feb. 1977Yao, A. C. Fa s t A lg o ri thms fo r M in imu m S pa n n ing Treesin k Dimensions, Fifteenth Annual Allerton Conference onCom munication, Control, and Com puting, Sept. 1977, 553-55 6Yao, F. F. E~ c ien t D yn a mic Pro g ra mm in g Usin g Qua d ra n g leInequal i t ies , Twelf th ACM Symposium on the Theory ofCom putation, 1980, 429-435

    2 8 9