Dynamic Planar Range Maxima Queries (presented at ICALP 2011) Gerth Stølting Brodal Aarhus University Kostas Tsakalidis LIAFA, Université Paris Diderot, France, November 22, 2011
Orthogonal Range Queries y t y b x l x r 2
Priority Search Tree [McCreight’75] Space: O( n ) Update: Recursively move up maximum y O(log n ) 1-Sided reporting: O(1+t) y 3
3-Sided Reporting Queries O(log n + t ) y b x l x r O(log n ) trees 4
Orthogonal Range MAXIMA Reporting alias “Generalized Planar SKYLINE Operator” Dominance Maxima Queries Report all maximal points among points with x in [ x l ,+∞) and y in [ y b ,+∞) Contour Maxima Queries Report all maximal points among y t points with x in (- ∞, x r ] 3-Sided Maxima Queries Report all maximal points among points with x in [ x l , x r ] and y in [ y b ,+∞) x l x r 4-Sided Maxima Queries Report all maximal points among points with x in [ x l , x r ] and y in [ y b , y t ] Static maximal points in O( n∙ log n ) time [Kung, Luccio, Preparata, J.ACM ’ 75] 5
Dynamic Range Maxima Reporting Space Insert Delete Overmars, van Leeuwen ‘81 n log n + t log 2 n + t log 2 n log 2 n + t Frederickson, Rodger ‘90 n log n + t log n log 2 n (1+ t )log n Janardan ‘91 n log n + t log n log 2 n Kapoor ‘00 n log n + t amo. - log n n log n / loglog n + t log n / loglog n B., Tsakalidis [ICALP ’ 11] n ∙log n log 2 n / loglog n + t log 2 n / loglog n RAM 6
Overmars, van Leeuwen [JCSS ’81] O(log n + t ) Updates: O(log 2 n ) 7
Our Structure - Tournament Tree u Right( u ) = Copy Up Maximum y 8
Tournament Tree Find next point u MAX( ) Right( u ) to be reported in O(1) time y 9
Computation of MAX(Right( u )) MAX(Right( u )) U U L MAX(Right( u L )) MAX(Right( u R )) U R [Sundar ‘89] P riority Q ueue with A ttrition O(1) time 10
Update Operation Space: O( n ) P riority Q ueue Update: O(log n ) with A ttrition with Rollback 11
Priority Queues with Attrition [Sundar , IPL ‘89] Deletemin() InsertAndAttrite(element) O(1) worst case time 12
Priority Queues with Attrition [Sundar , IPL ‘89] Invariants 1) C, B, D f sorted 2) max C ≤ min (B ᴜ D f ᴜ D r ) 3) |C|≥ |D f |+2|D r | 17 ≥ 4+2∙5 C B D f D r insertion order 13
Invariants 1) C, B, D f sorted 2) max C ≤ min (B ᴜ D f ᴜ D r ) 3) |C|≥ |D f |+2|D r | 1 ≥ “+1” B IAS 2 3 3 2 1 C B D f D r 14
Invariants 1) C, B, D f sorted 2) max C ≤ min (B ᴜ D f ᴜ D r ) 3) |C|≥ |D f |+2|D r | ≥ “+1” A B IAS B C D C D A B C=C+D f C +1 D f +1 D f -1 B=D f =0 B -1 D r -1 D f D r D r C B D f D r C B C B D f C B D f D r 15
Dominance Range Maxima Queries O(log n ) trees Query time O(log n + t ) 16
Contour Range Maxima Queries O(log n ) trees Query time O(log n + t ) 17
3-Sided Range Maxima Queries O(log n ) trees Query time O(log n + t ) 18
4-Sided Range MAXIMA Reporting and Rectangular Visibility Queries Proximity Queries/Similarity Search (- ∞,+∞ ) (+∞,+∞ ) 4-Sided Range 4 x Maxima Queries (+∞, - ∞) (- ∞, - ∞) Space Insert Delete log 2 n + t log 3 n Overmars, Wood ‘88 n ∙log n log 2 n log 2 n + t∙ log n log 2 n [ICALP ’ 11] n ∙ log n log 2 n + t log 2 n log 2 n 19
4-sided Range Maxima Queries Query time O(log 2 n + t ), space O( n ∙log n ) 20
RAM – O(log n /loglog n + t ) U … • Height O(log n / loglog n ) • MAX(Right(u)) maintained O(log ε n) using Q-heaps [Fredman, Willard, JCSS ´94] 21
Space Query Insert/Delete O( n ) O (log n /loglog n + t ) O(log n /loglog n ) RAM O( n∙ log n ) O (log 2 n + t ) O(log 2 n /loglog n ) Thank You Gerth Stølting Brodal Aarhus University
Recommend
More recommend