220 likes | 361 Views
Data Structures: Range Queries - Space Efficiency. Pooya Davoodi Aarhus University. PhD Defense July 4, 2011. Thesis Overview. Range Minimum Queries in Arrays (ESA 2010, Invited to Algorithmica ) Path Minima Queries in Trees (WADS 2011)
E N D
Data Structures:Range Queries - Space Efficiency Pooya Davoodi Aarhus University PhD DefenseJuly 4, 2011
Thesis Overview • Range Minimum Queries in Arrays (ESA 2010, Invited to Algorithmica) • Path Minima Queries in Trees (WADS 2011) • Range Diameter Queries in 2D Point Sets(Submitted to ISAAC 2011) • Succinct -ary Trees(TAMC 2011) 4 6 7 4 3 10 2 5 4 20 a b e c d f
Range Minimum Queries • Database systems • Lowest average-salary: Year Age Minimum: 65,000at [3,1]
Definition • Input: an array • Query: where is minimum in ? ()
Naïve Solution • Brute force search • Query time: time • Worst case : time ()
Data Structures • Preprocess and store some information • Naïve: store the answers of all queries • query time • Size of the table: bits Tabulation
1D vs. 2D Lowest Common Ancestor 2 • 1D: Cartesian Trees • bits per element (Tarjan et al., STOC’84) • bits per element (Sadakane, ISAAC’07) • 2D: Nothing like Cartesian Trees 7 5 20 8 6 10 16 bits per element (Our Result, ESA’10)
Indexing Data Structures • Popular in Succinct Data Structures Read-only Index Input Array bits per element (Our Results, ESA’10)
bits with query time 2 7 5 Cartesian Trees 20 8 6 16 10 Cartesian Tree: Tabulation Atallah and Yuan (SODA’10)
bits Per Element • bits query time • bitsquery time • Proof: queries distinguish inputs in time • query with time C
Outline • Range Minimum Queries(ESA 2010, Invited to Algorithmica) • Path Minima Queries(WADS 2011) • Range Diameter Queries(Submitted to ISAAC 2011) 4 6 7 3 4 10 2 5 4 20
Path Minima/Maxima Queries • The most expensive connection between two given nodes? • between b and k= (c,e) • between eand k= (j,k) • Update(c,e) = 4 i 4 4 6 30 e j 7 c 3 b 4 2 10 5 4 h f g a k d Tree-Topology Networks Trees with Dynamic Weights
Naïve Structures • Brute Force Search • Worst case query time: • Update time: • Tabulation • Query time: • Update time: i 4 6 30 e j 7 c 3 b 4 2 10 4 5 h g f a k d 30 4
Dynamic Weights • Reduction from Range Minimum Queries in 1D arrays Comparison Based Optimal: Brodal et al. (SWAT’96) Optimal: Alstrup et al. (FOCS’98) RAM Optimal by conjecture: Patrascu and Thorup (STOC’06) Optimal: Alstrup et al. (FOCS’98)
Dynamic Leaves i 4 6 30 e j 7 c 3 b 4 2 10 4 5 h g f Optimal: Pettie (FOCS’02) a k d 4
Updates with link and cut i 4 6 30 cut(c,e) e j 7 c 3 b 4 2 link (d,i,12) 10 4 12 5 h g f a k d Proof: by reduction from connectivity problems in graphs
Outline • Range Minimum Queries(ESA 2010, Invited to Algorithmica) • Path Minima Queries(WADS 2011) • Range Diameter Queries(Submitted to ISAAC 2011) 4 6 7 3 4 10 2 5 4 20
Range Diameter Queries • Farthest pair of points A Difficult Problem
Known Results Set Intersection Problem Conjecture: Set Intersection problem is difficult (Patrascu and Roditty, FOCS’10)
Set Intersection QueriesReduction ? Arithmetic on real numberswith unbounded precisions Diameter = 3 Diameter < 5
Publications • Range Minimum Queries(ESA 2010, Invited to Algorithmica) • Path Minima Queries(WADS 2011) • Range Diameter Queries(Submitted to ISAAC 2011) • Succinct -ary Trees(TAMC 2011) 4 6 7 3 4 10 2 5 4 20 b a e c d f