Optimal Planar Point Enclosure Indexing Lars Arge Vasilis

  • Slides: 21
Download presentation
Optimal Planar Point Enclosure Indexing Lars Arge, Vasilis Samoladas and Ke Yi Department of

Optimal Planar Point Enclosure Indexing Lars Arge, Vasilis Samoladas and Ke Yi Department of Computer Science Duke University Technical University of Crete

Two Dual Problems Range searching Internal memory External memory √ √ Point enclosure √

Two Dual Problems Range searching Internal memory External memory √ √ Point enclosure √ ? 2

Outline 1. 2. 3. 4. 5. 6. Previous results in internal memory Computation models

Outline 1. 2. 3. 4. 5. 6. Previous results in internal memory Computation models in external memory Previous results in external memory Our lower bound result Matching upper bound Conclusions 3

Previous Results: Internal Memory • Computation model: Pointer machine • Range searching (T is

Previous Results: Internal Memory • Computation model: Pointer machine • Range searching (T is the output size) – O(N) space, O(Nε+T) time ([BM 80]) – O(N log. N / loglog. N) space, O(log. N+T) time [Chazelle 88] * Tight for O(logc. N+T) query structures, [Chazelle 90] – Can do better on a RAM – Other tradeoffs … • Point enclosure [Chazelle 86] – Ө(N) space, Ө(log. N+T) time – Optimal in both space and time 4

External Memory: Models D Block I/O M • External pointer machine – Natural generalization

External Memory: Models D Block I/O M • External pointer machine – Natural generalization of the internal pointer machine – Each node contains B data objects – Out-degree 2 →B • Bounding-volume hierarchy (Non-replicating index structure) – Tree structure – Each object is stored only once • Indexability model [HKP 97] P 5

External Memory: Models • Indexability model – No “structure” at all! – Only models

External Memory: Models • Indexability model – No “structure” at all! – Only models layout of data – Each block contains B data objects – Can “magically” find the smallest set Π of blocks whose union contains all results – Cost is defined to be |Π| Indexability model 1 D range searching External pointer machine All other known results Bounding volume hierarchy R-trees, kd-trees 6

Previous Results: External Memory • Range searching (n=N/B) – Similar to internal memory, tradeoff

Previous Results: External Memory • Range searching (n=N/B) – Similar to internal memory, tradeoff between space and time – O(log. Bn+T/B) query time * O(n log n / loglog. Bn) space [ASV 99] – Tight in external pointer machine [SR 95] – Improved to indexability model [ASV 99] – O(n) space * O( ) time [kd. B-tree, GI 99, KS 99] – Tight in bounding-volume hierarchies * Can do O(nε+T/B) with constant redundancy – Tight in indexability model [ASV 99] 7

Previous Results: External Memory • Point enclosure – Ω( ) for bounding-volume hierarchies [ABGHH

Previous Results: External Memory • Point enclosure – Ω( ) for bounding-volume hierarchies [ABGHH 01] – Easy to get a O(n) space, O(log 2 n+T/B) query structure Problem Internal memory External memory 1 D range (N, log N + T) (n, log. Bn + T/B) 1 D point enclosure (N, log N + T) (n, log. Bn + T/B) (N, Nε+T) (n, nε+T/B) (N, log N + T) (n, log n+T/B) (n, log T/B)? B 2 n + (n. Bε, log n+T/B) B 2 D range 2 D point enclosure 8

Indexability Model in Details • N data objects laid out in disk blocks, possibly

Indexability Model in Details • N data objects laid out in disk blocks, possibly with redundancy • Each block holds at most B objects • Cost of a query q: minimum # blocks needed to retrieve all answers – Can find those blocks without cost • Redundancy r and access overhead A – r: Average # copies in the index * Size is rn blocks – A: Ratio of the query cost to the ideal cost in the worst case * Any query can be covered by blocks (A ≤ B) • Lower bound expressed as a tradeoff between r and A – 2 D range searching [ASV 99] 9

Previous Results in Indexability Model • Set queries [HKP 97] – A set S

Previous Results in Indexability Model • Set queries [HKP 97] – A set S of N objects, queries can be any subset of S – For any r≤n/B, A=B – Trivial • Range searching – [HKP 97] – – [SP 98] – Only tight for the special case when points form a grid – [ASV 99] 10

Redundancy Theorem [SP 98] (Asymptotic version) For N data objects, if there exist m

Redundancy Theorem [SP 98] (Asymptotic version) For N data objects, if there exist m queries q 1, …, qm, such that for any 1 ≤ i, j ≤ m, i ≠ j, |qi| ≥ B, |qi∩qj| ≤ B/A 2, then, we have the redundancy • Combinatorial in nature • Used successfully to obtain the range searching lower bound 11

Point Enclosure Lower Bound Construction (1) • Set of queries: the Fibonacci lattice (one

Point Enclosure Lower Bound Construction (1) • Set of queries: the Fibonacci lattice (one of low-discrepancy point sets) – m points in a m×m grid – Only property used: any rectangle with area αm contains between and points • Set of objects – Tiling rectangles of αti×m/ti – t=(m/α)1/B, i=1, …, B – m=αN/B – Θ(B·m 2/(αm)) = Θ(N) rectangles are constructed – |qi| ≥ B is satisfied 12

Point Enclosure Lower Bound Construction (2) • Any A that satisfies |qi∩qj| ≤ B/A

Point Enclosure Lower Bound Construction (2) • Any A that satisfies |qi∩qj| ≤ B/A 2 will become a lower bound • Make A as large as possible • For a rectangle to cover q 1 and q 2, we must have αti≥x and m/ti≥y, or x/α≤ ti ≤ m/y • q 1 and q 2 are two points from the Fibonacci lattice, so xy≥c 2 m • # such rectangles ≤ 13

Point Enclosure Lower Bound Construction (3) • Disprove earlier (n, log. Bn+T/B) conjecture •

Point Enclosure Lower Bound Construction (3) • Disprove earlier (n, log. Bn+T/B) conjecture • Still a square root factor away • What’s wrong? The construction technique, or the model itself? 14

Refine the Indexability Model O(log. Bn + |q|/B) Search cost Retrieval cost • Observation:

Refine the Indexability Model O(log. Bn + |q|/B) Search cost Retrieval cost • Observation: retrieval cost is relatively high for small queries • Refine: add an addictive factor! – Old: any query q is covered by blocks – New: Any query q is covered by blocks • Modify the Redundancy Theorem accordingly – The two conditions: |qi| ≥B, |qi∩qj| ≤ B/A 2 |qi| ≥BA 0, |qi∩qj| ≤ B/A 12 15

The Refined Redundancy Theorem For N data objects, if there exist m queries q

The Refined Redundancy Theorem For N data objects, if there exist m queries q 1, …, qm, such that for any 1 ≤ i, j ≤ m, i ≠ j, |qi| ≥ BA 0, |qi∩qj| ≤ B/(2 A 1)2, then, we have the redundancy Proof Sketch: Each query can be covered by and apply the original Redundancy Theorem with A=2 A 1 blocks, 16

Fix the Construction • Old construction – |q| = B – B layers of

Fix the Construction • Old construction – |q| = B – B layers of tiling rectangles – Size of Fibonacci lattice m=αN/B – Total # rectangles: N • New construction – |q| = BA 0 – BA 0 layers of tiling rectangles – Size of Fibonacci lattice m=αN/(BA 0) – Total # rectangles: N 17

Range Searching vs. Point Enclosure • Range searching – Original model – New model

Range Searching vs. Point Enclosure • Range searching – Original model – New model • Point enclosure r • Dual bounds in external memory! 18

Matching Upper Bounds (1) • In the external pointer machine model • Only interested

Matching Upper Bounds (1) • In the external pointer machine model • Only interested in the case A 1=O(1) • Goal: for any r ≤ B, design an index with redundancy r that answers query in O(logrn+T/B) I/Os • Building block: one-sided segment intersection queries – Given N horizontal segments – Report all segment directly above a query point • Persistent B-tree (modified) – O(n) space, O(log. Bn+T/B) query – Search on the x-coordinate of the query point – Retrieve the segments 19

Matching Upper Bounds (2) • Divide plane into r horizontal slabs • Associate two

Matching Upper Bounds (2) • Divide plane into r horizontal slabs • Associate two one-sided segment intersection structures to each slab – One for all top sides of rectangles that cross its bottom boundary – One for all bottom sides of rectangles that cross its top boundary and all bottom sides of rectangles that completely span the slab • Recursively handle rectangles that fall completely within a slab, resulted in a tree with fanout r • Any rectangle is stored at most r times: redundancy is r • Query: follow the tree top-down, ask two one-sided queries at each level. O(logrn log. BN+T/B) I/Os → O(logrn+T/B) by fractional cascading 20

Conclusions 1. A tight lower bound on the tradeoff between the redundancy and access

Conclusions 1. A tight lower bound on the tradeoff between the redundancy and access overhead of any index for the 2 D point enclosure queries, given in the new indexability model 2. A matching upper bound in the external pointer machine The END 21