Approximate Voronoi Diagrams Presentation by Maks Ovsjanikov S. - - PowerPoint PPT Presentation

approximate voronoi diagrams
SMART_READER_LITE
LIVE PREVIEW

Approximate Voronoi Diagrams Presentation by Maks Ovsjanikov S. - - PowerPoint PPT Presentation

CS468, Mon. Oct. 30 th , 2006 Approximate Voronoi Diagrams Presentation by Maks Ovsjanikov S. Har-Peleds notes, Chapters 6 and 7 1-1 Outline Preliminaries Problem Statement } ANN using PLEB (Previous Lecture) Bounds and


slide-1
SLIDE 1

1-1

  • S. Har-Peled’s notes, Chapters 6 and 7

Approximate Voronoi Diagrams

CS468, Mon. Oct. 30th, 2006

Presentation by Maks Ovsjanikov

slide-2
SLIDE 2

2-1

Outline

  • Preliminaries
  • Problem Statement
  • ANN using PLEB
  • Bounds and Improvements

– Near Linear Space – Linear Space

  • ANN in Rd using compressed quad-trees

(Previous Lecture)

}

slide-3
SLIDE 3

3-1

Preliminaries

u v

slide-4
SLIDE 4

3-2

Preliminaries

u v

d(u, v)

slide-5
SLIDE 5

3-3

Preliminaries

u v q

d(u, v) d(q, u) d(q, v)

slide-6
SLIDE 6

3-4

Preliminaries

u v q

d(u, v) d(q, u) d(q, v) ≥ d(u,v)

ǫ

≥ d(u,v)

ǫ

slide-7
SLIDE 7

3-5

Preliminaries

u v q

d(u, v) d(q, u) d(q, v)

   d(q, u) ≥ d(u,v)

ǫ

d(q, v) ≥ d(u,v)

ǫ

= ⇒ d(q, v) d(q, u) ≤ 1 + ǫ

≥ d(u,v)

ǫ

≥ d(u,v)

ǫ

slide-8
SLIDE 8

3-6

Preliminaries

u v q

d(u, v) d(q, u) d(q, v)

   d(q, u) ≥ d(u,v)

ǫ

d(q, v) ≥ d(u,v)

ǫ

= ⇒ d(q, v) d(q, u) ≤ 1 + ǫ

≥ d(u,v)

ǫ

≥ d(u,v)

ǫ

q′

d(q′, u) = αd(u, v) d(q′, v) = (1 + α)d(u, v) = (1 + 1

α)d(u, v)

slide-9
SLIDE 9

4-1

   d(q, u) ≥ d(u,v)

ǫ

d(q, v) ≥ d(u,v)

ǫ

= ⇒ d(q, v) d(q, u) ≤ 1 + ǫ

Preliminaries

Holds in any metric space:

slide-10
SLIDE 10

4-2

   d(q, u) ≥ d(u,v)

ǫ

d(q, v) ≥ d(u,v)

ǫ

= ⇒ d(q, v) d(q, u) ≤ 1 + ǫ

Preliminaries

d(q, u) = αd(u, v) d(q, v) ≤ d(q, u) + d(u, v) = (1 + 1

α)d(q, u)

= ⇒ d(q,v)

d(q,u) ≤ (1 + 1 α) ≤ (1 + ǫ) if α ≥ 1 ǫ

Holds in any metric space:

slide-11
SLIDE 11

4-3

   d(q, u) ≥ d(u,v)

ǫ

d(q, v) ≥ d(u,v)

ǫ

= ⇒ d(q, v) d(q, u) ≤ 1 + ǫ

Preliminaries

d(q, u) = αd(u, v) d(q, v) ≤ d(q, u) + d(u, v) = (1 + 1

α)d(q, u)

= ⇒ d(q,v)

d(q,u) ≤ (1 + 1 α) ≤ (1 + ǫ) if α ≥ 1 ǫ

Holds in any metric space:

Similarly:

d(q, v) = αd(u, v) = ⇒ d(q,u)

d(q,v) ≤ (1 + 1 α) ≤ (1 + ǫ) if α ≥ 1 ǫ

slide-12
SLIDE 12

4-4

   d(q, u) ≥ d(u,v)

ǫ

d(q, v) ≥ d(u,v)

ǫ

= ⇒ d(q, v) d(q, u) ≤ 1 + ǫ

Preliminaries

Moral:

Any of the far away points is a (1 + ǫ) closest neighbor

slide-13
SLIDE 13

5-1

Problem Statement:

For a given ǫ, find a (1 + ǫ) Aproximate Voronoi Diagram: Partition of space into regions with one representative ri per region, such that for any point q in region i, ri is a (1 + ǫ) nearest neighbor of q

slide-14
SLIDE 14

5-2

Problem Statement:

For a given ǫ, find a (1 + ǫ) Aproximate Voronoi Diagram: Partition of space into regions with one representative ri per region, such that for any point q in region i, ri is a (1 + ǫ) nearest neighbor of q

slide-15
SLIDE 15

5-3

Problem Statement:

For a given ǫ, find a (1 + ǫ) Aproximate Voronoi Diagram: Partition of space into regions with one representative ri per region, such that for any point q in region i, ri is a (1 + ǫ) nearest neighbor of q

Constraints:

  • bounded construction time and space (complexity)
  • Cover all space
  • sub-linear (1+ǫ) NN queries
slide-16
SLIDE 16

6-1

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries

slide-17
SLIDE 17

6-2

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries 1) Construct balls of radius (1 + ǫ)i around each point, for i = 1..∞

slide-18
SLIDE 18

6-3

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries 1) Construct balls of radius (1 + ǫ)i around each point, for i = 1..∞

slide-19
SLIDE 19

6-4

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries 1) Construct balls of radius (1 + ǫ)i around each point, for i = 1..∞

slide-20
SLIDE 20

6-5

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries 1) Construct balls of radius (1 + ǫ)i around each point, for i = 1..∞

slide-21
SLIDE 21

6-6

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries 1) Construct balls of radius (1 + ǫ)i around each point, for i = 1..∞

slide-22
SLIDE 22

6-7

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries 1) Construct balls of radius (1 + ǫ)i around each point, for i = 1..∞

slide-23
SLIDE 23

6-8

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries 1) Construct balls of radius (1 + ǫ)i around each point, for i = 1..∞

slide-24
SLIDE 24

6-9

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries 1) Construct balls of radius (1 + ǫ)i around each point, for i = 1..∞

slide-25
SLIDE 25

6-10

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries

q

For any query point q, return the center p of the smallest ball that contains it: d(q, n) > (1 + ǫ)i−1, and d(q, p) ≤ (1 + ǫ)i < (1 + ǫ) · d(q, n) = ⇒ always get a (1 + ǫ)-Nearest Neighbor

(1 + ǫ)5 > (1 + ǫ)4

slide-26
SLIDE 26

6-11

ANN using PLEB

Reduce (1 + ǫ)-ANN queries to target ball queries Problems:

  • Unbounded Number of Balls
  • Not clear how to preform target ball queries efficiently

– Partition the space into regions of influence

slide-27
SLIDE 27

7-1

Bounding the number of balls

Intuition: * For a given pair u and v, we only care if min d(q, {u, v}) ∈ [d(u,v)

ǫ+2 , d(u,v) ǫ

]

slide-28
SLIDE 28

7-2

Bounding the number of balls

Intuition: * For a given pair u and v, we only care if min d(q, {u, v}) ∈ [d(u,v)

ǫ+2 , d(u,v) ǫ

]

  • if min d(q, {u, v}) > d(u,v)

ǫ

= ⇒ either u or v are (1 + ǫ) NN

slide-29
SLIDE 29

7-3

Bounding the number of balls

Intuition: * For a given pair u and v, we only care if min d(q, {u, v}) ∈ [d(u,v)

ǫ+2 , d(u,v) ǫ

] * Do not need to grow balls of radius smaller than d(u,v)

4

  • r larger than 2d(u,v)

ǫ

  • if min d(q, {u, v}) > d(u,v)

ǫ

= ⇒ either u or v are (1 + ǫ) NN

  • if min d(q, {u, v}) < d(u,v)

ǫ+2 =

⇒ q has a unique (1 + ǫ) NN u

v d(q, u) < d(u,v)

ǫ+2

q

d(q, v) > (1 −

1 ǫ+2)d(u, v)

> (ǫ + 1)d(q, u)

slide-30
SLIDE 30

7-4

Bounding the number of balls

Intuition: * For a given pair u and v, we only care if min d(q, {u, v}) ∈ [d(u,v)

ǫ+2 , d(u,v) ǫ

] * Do not need to grow balls of radius smaller than d(u,v)

4

  • r larger than 2d(u,v)

ǫ

  • if min d(q, {u, v}) > d(u,v)

ǫ

= ⇒ either u or v are (1 + ǫ) NN

  • if min d(q, {u, v}) < d(u,v)

ǫ+2 =

⇒ q has a unique (1 + ǫ) NN u

v d(q, u) < d(u,v)

ǫ+2

q

d(q, v) > (1 −

1 ǫ+2)d(u, v)

> (ǫ + 1)d(q, u)

Method 1: for every pair of points {u, v}, construct enough balls to cover [d(u,v)

4

, 2d(u,v)

ǫ

] on u, v

slide-31
SLIDE 31

7-5

Bounding the number of balls

Intuition: * For a given pair u and v, we only care if min d(q, {u, v}) ∈ [d(u,v)

ǫ+2 , d(u,v) ǫ

] * Do not need to grow balls of radius smaller than d(u,v)

4

  • r larger than 2d(u,v)

ǫ

  • if min d(q, {u, v}) > d(u,v)

ǫ

= ⇒ either u or v are (1 + ǫ) NN

  • if min d(q, {u, v}) < d(u,v)

ǫ+2 =

⇒ q has a unique (1 + ǫ) NN u

v d(q, u) < d(u,v)

ǫ+2

q

d(q, v) > (1 −

1 ǫ+2)d(u, v)

> (ǫ + 1)d(q, u)

Method 1: for every pair of points {u, v}, construct enough balls to cover [d(u,v)

4

, 2d(u,v)

ǫ

] on u, v Overall: O(n2 logǫ+1(2C

ǫ − C 4 )) = O(n2 log(7C

ǫ )

log(ǫ+1)) = O(n21 ǫ log(1 ǫ)) balls

Note: log(1 + ǫ) = ǫ − ǫ2/2 + ǫ3/3 − .... = O(ǫ) in most cases

slide-32
SLIDE 32

8-1

Bounding the number of balls

Interval Near-Neighbor data structure given a range of distances [a, b], and a set of points P, answers:

  • 1. dP(q) > b
  • 2. dP(q) < a with a witness
  • 3. otherwise, finds a point p ∈ P, s.t. dP(q) ≤ d(p, q) ≤ (1 + ǫ)dP(q)
slide-33
SLIDE 33

8-2

Bounding the number of balls

Interval Near-Neighbor data structure given a range of distances [a, b], and a set of points P, answers:

  • 1. dP(q) > b
  • 2. dP(q) < a with a witness
  • 3. otherwise, finds a point p ∈ P, s.t. dP(q) ≤ d(p, q) ≤ (1 + ǫ)dP(q)

Can be realized by a set of balls of radius a(1 + ǫ)i for i = 0...M − 1, where M = ⌈log1+ǫ(b/a)⌉ and a ball of radius b around every point in P

slide-34
SLIDE 34

8-3

Bounding the number of balls

Interval Near-Neighbor data structure given a range of distances [a, b], and a set of points P, answers:

  • 1. dP(q) > b
  • 2. dP(q) < a with a witness
  • 3. otherwise, finds a point p ∈ P, s.t. dP(q) ≤ d(p, q) ≤ (1 + ǫ)dP(q)

Can be realized by a set of balls of radius a(1 + ǫ)i for i = 0...M − 1, where M = ⌈log1+ǫ(b/a)⌉ and a ball of radius b around every point in P Contains O(n1

ǫ log(b/a)) balls. Takes at most 2 target ball queries if 1 or 2 hold, and

* O(log(M)) = O(log log(b/a)

ǫ

) otherwise

slide-35
SLIDE 35

9-1

Bounding the number of balls

A data structure to answer (1 + ǫ)-ANN queries on general points

(Sariel Har-Peled: A Replacement for Voronoi Diagrams of Near Linear Size. FOCS 2001: 94-103)

Build a tree, with an Interval Near Neighbor structure associated with each node

slide-36
SLIDE 36

9-2

Bounding the number of balls

A data structure to answer (1 + ǫ)-ANN queries on general points

(Sariel Har-Peled: A Replacement for Voronoi Diagrams of Near Linear Size. FOCS 2001: 94-103)

Build a tree, with an Interval Near Neighbor structure associated with each node

slide-37
SLIDE 37

9-3

Bounding the number of balls

A data structure to answer (1 + ǫ)-ANN queries on general points

(Sariel Har-Peled: A Replacement for Voronoi Diagrams of Near Linear Size. FOCS 2001: 94-103)

Build a tree, with an Interval Near Neighbor structure associated with each node

Recursively find min r such that there are ⌈n/2⌉ connected components

10 7 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3

slide-38
SLIDE 38

9-4

Bounding the number of balls

A data structure to answer (1 + ǫ)-ANN queries on general points

(Sariel Har-Peled: A Replacement for Voronoi Diagrams of Near Linear Size. FOCS 2001: 94-103)

Build a tree, with an Interval Near Neighbor structure associated with each node

Recursively find min r such that there are ⌈n/2⌉ connected components

10 7 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 12 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

For each component find a representative and recur- sively build the outer tree

slide-39
SLIDE 39

10-1

Bounding the number of balls

A data structure to answer (1 + ǫ)-ANN queries on general points

(Sariel Har-Peled: A Replacement for Voronoi Diagrams of Near Linear Size. FOCS 2001: 94-103)

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

Given a query point q: 1) q is outside R descend into the outer tree

q

slide-40
SLIDE 40

10-2

Bounding the number of balls

A data structure to answer (1 + ǫ)-ANN queries on general points

(Sariel Har-Peled: A Replacement for Voronoi Diagrams of Near Linear Size. FOCS 2001: 94-103)

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

Given a query point q: 2) if q is inside r descend into the cluster

q

slide-41
SLIDE 41

10-3

Bounding the number of balls

A data structure to answer (1 + ǫ)-ANN queries on general points

(Sariel Har-Peled: A Replacement for Voronoi Diagrams of Near Linear Size. FOCS 2001: 94-103)

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

Given a query point q: 3) otherwise I will return a (1 + ǫ

4)-NN

q

slide-42
SLIDE 42

10-4

Bounding the number of balls

A data structure to answer (1 + ǫ)-ANN queries on general points

(Sariel Har-Peled: A Replacement for Voronoi Diagrams of Near Linear Size. FOCS 2001: 94-103)

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

Given a query point q:

Because of rounding up, after each step, continue on set containing ≤ n/2 + 1 points = ⇒ number of steps ≤ log3/2 n

slide-43
SLIDE 43

11-1

Bounding the number of balls

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

1) q is outside R descend into the outer tree 2) if q is inside r descend into the cluster 3) otherwise I will return a (1 + ǫ

4)-NN

Note that:

  • last step is always 3)
  • no error is incurred in 2)
  • diameter of a cluster ≤ 2nr =

⇒ error in 1) is at most (1 + ǫ

¯ cµ)

Thus, overall error is bounded by: (1+ǫ 4)

log3/2 n

  • i=1

(1+ ǫ ¯ cµ) ≤ exp(ǫ 4)

log3/2 n

  • i=1

exp( ǫ ¯ cµ) ≤ exp  ǫ 4 +

log3/2 n

  • i=1

ǫ ¯ cµ   ≤ exp (ǫ/2) ≤ (1+ǫ) if µ = ⌈log3/2 n⌉, ¯ c = 4 and ǫ < 1

slide-44
SLIDE 44

12-1

Bounding the number of balls

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

(Sariel Har-Peled: A Replacement for Voronoi Diagrams of Near Linear Size. FOCS 2001: 94-103)

Overall Number of Balls: Since

  • the depth of the tree is at most log3/2 n
  • each node ν has I(Pν, r, 2¯

cµnr/ǫ, ǫ/4) with M = n log n balls we get an immediate bound of O(M log M) = O(n log(n) log(n log n)) = O(n log2 n)

slide-45
SLIDE 45

12-2

Bounding the number of balls

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

Overall Number of Balls: Since

  • the depth of the tree is at most log3/2 n
  • each node ν has I(Pν, r, 2¯

cµnr/ǫ, ǫ/4) with M = n log n balls we get an immediate bound of O(M log M) = O(n log(n) log(n log n)) = O(n log2 n) However, can achieve O(n log n) by considering the connection with the Cluster Tree

  • S. Sen, N. Sharma, Y. Sabharwal: Nearest Neighbors Search using Point Location in Balls with applications to approximate

Voronoi Decompositions Journal of Computer and System Sciences, Volume 72(6) , September 2006, Pages 955-977.

2 1 3 4 5 6

slide-46
SLIDE 46

12-3

Bounding the number of balls

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

Overall Number of Balls: Since

  • the depth of the tree is at most log3/2 n
  • each node ν has I(Pν, r, 2¯

cµnr/ǫ, ǫ/4) with M = n log n balls we get an immediate bound of O(M log M) = O(n log(n) log(n log n)) = O(n log2 n) However, can achieve O(n log n) by considering the connection with the Cluster Tree

  • S. Sen, N. Sharma, Y. Sabharwal: Nearest Neighbors Search using Point Location in Balls with applications to approximate

Voronoi Decompositions Journal of Computer and System Sciences, Volume 72(6) , September 2006, Pages 955-977.

2 1 3 4 5 6

slide-47
SLIDE 47

12-4

Bounding the number of balls

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

Overall Number of Balls: Since

  • the depth of the tree is at most log3/2 n
  • each node ν has I(Pν, r, 2¯

cµnr/ǫ, ǫ/4) with M = n log n balls we get an immediate bound of O(M log M) = O(n log(n) log(n log n)) = O(n log2 n) However, can achieve O(n log n) by considering the connection with the Cluster Tree

1 2 3 4 5 6 2 1 3 4 5 6

slide-48
SLIDE 48

12-5

Bounding the number of balls

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

Overall Number of Balls: Since

  • the depth of the tree is at most log3/2 n
  • each node ν has I(Pν, r, 2¯

cµnr/ǫ, ǫ/4) with M = n log n balls we get an immediate bound of O(M log M) = O(n log(n) log(n log n)) = O(n log2 n) However, can achieve O(n log n) by considering the connection with the Cluster Tree

1 2 3 4 5 6

rloss(p) = radius of the ball around p, when p ceases to be a root

rloss(2) 2 1 3 4 5 6

slide-49
SLIDE 49

13-1 1 2 3 4 5 6

Bounding the number of balls

I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 10, n = 6 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 7, n = 3 I(P, r, 2¯ cµnr/ǫ, ǫ/4), r = 12, n = 3

Apart from the outer trees, going down the (1 + ǫ) ANN tree is equivalent to disconnecting edges of the MST tree q

2 1 3 4 5 6

The subtrees of a node are disjoint in edges = ⇒ can charge at least 1 edge to each child. Namely: if nν is the number of children of ν |Pν| = O(nν) and

ν∈D nν = O(n)

Thus, total number of balls:

  • ν∈D

O nν ǫ log µnν ǫ

  • = O

n ǫ log n log n ǫ

  • = O

n ǫ log n ǫ

slide-50
SLIDE 50

14-1

Construction Time

Construction time will be dominated by constructing the tree D Can be constructed directly from the cluster tree but this takes time O(n2) time

slide-51
SLIDE 51

14-2

Construction Time

Construction time will be dominated by constructing the tree D Can be constructed directly from the cluster tree but this takes time O(n2) time In Rd the cluster tree can be (2n − 2)-approximated by a HST in O(n log n) time:

  • 1. construct a 2-spanner of P of size O(n) in O(n log n) time
  • 2. construct an HST that (n − 1) approximates the spanner in O(n log n) time
slide-52
SLIDE 52

14-3

Construction Time

Construction time will be dominated by constructing the tree D Can be constructed directly from the cluster tree but this takes time O(n2) time In Rd the cluster tree can be (2n − 2)-approximated by a HST in O(n log n) time:

  • 1. construct a 2-spanner of P of size O(n) in O(n log n) time
  • 2. construct an HST that (n − 1) approximates the spanner in O(n log n) time

Only possible in Rd, in general no HST can be computed in subquadratic time

2 1 3 4 5 6

slide-53
SLIDE 53

14-4

Construction Time

Construction time will be dominated by constructing the tree D Can be constructed directly from the cluster tree but this takes time O(n2) time In Rd the cluster tree can be (2n − 2)-approximated by a HST in O(n log n) time:

  • 1. construct a 2-spanner of P of size O(n) in O(n log n) time
  • 2. construct an HST that (n − 1) approximates the spanner in O(n log n) time

Only possible in Rd, in general no HST can be computed in subquadratic time

2 1 3 4 5 6 24 6 9 12 18 1 2 3 4 5 6 1 2 3 4 1.5

slide-54
SLIDE 54

15-1

Construction Time

In Rd the cluster tree can be (2n − 2)-approximated by a HST in O(n log n) time:

  • 1. construct a 2-spanner of P of size O(n) in O(n log n) time
  • 2. construct an HST that (n − 1) approximates the spanner in O(n log n) time

24 6 9 12 18 1 2 3 4 5 6

To compensate for the approximation factor, grow more balls: Instead of I(P, r, 2¯ cµnr/ǫ, ǫ/4) construct I(P, r/(2n), 2¯ cµnr/ǫ, ǫ/4)

slide-55
SLIDE 55

15-2

Construction Time

In Rd the cluster tree can be (2n − 2)-approximated by a HST in O(n log n) time:

  • 1. construct a 2-spanner of P of size O(n) in O(n log n) time
  • 2. construct an HST that (n − 1) approximates the spanner in O(n log n) time

24 6 9 12 18 1 2 3 4 5 6

To compensate for the approximation factor, grow more balls: Instead of I(P, r, 2¯ cµnr/ǫ, ǫ/4) construct I(P, r/(2n), 2¯ cµnr/ǫ, ǫ/4) Instead of O(n

ǫ log b a) = O(n ǫ log n) will have:

O(n

ǫ log nr

r n ) = O(n

ǫ log n2) = O(n ǫ log n) balls at every node

slide-56
SLIDE 56

15-3

Construction Time

In Rd the cluster tree can be (2n − 2)-approximated by a HST in O(n log n) time:

  • 1. construct a 2-spanner of P of size O(n) in O(n log n) time
  • 2. construct an HST that (n − 1) approximates the spanner in O(n log n) time

24 6 9 12 18 1 2 3 4 5 6

To compensate for the approximation factor, grow more balls: Instead of I(P, r, 2¯ cµnr/ǫ, ǫ/4) construct I(P, r/(2n), 2¯ cµnr/ǫ, ǫ/4) Instead of O(n

ǫ log b a) = O(n ǫ log n) will have:

O(n

ǫ log nr

r n ) = O(n

ǫ log n2) = O(n ǫ log n) balls at every node

Same asymptotic space and time complexity

slide-57
SLIDE 57

16-1

Answering ANN queries

Haven’t made our life easier, since answering target ball queries is a difficult problem

slide-58
SLIDE 58

16-2

Answering ANN queries

Haven’t made our life easier, since answering target ball queries is a difficult problem Don’t need exact balls (1 + ǫ) ball r

(1 + ǫ)r b≈ is (1 + ǫ) approximation of b = b(p, r), if b ⊆ b≈ ⊆ b(p, r(1 + ǫ)

slide-59
SLIDE 59

16-3

Answering ANN queries

Haven’t made our life easier, since answering target ball queries is a difficult problem Don’t need exact balls (1 + ǫ) ball r

(1 + ǫ)r b≈ is (1 + ǫ) approximation of b = b(p, r), if b ⊆ b≈ ⊆ b(p, r(1 + ǫ)

slide-60
SLIDE 60

16-4

Answering ANN queries

Haven’t made our life easier, since answering target ball queries is a difficult problem Don’t need exact balls (1 + ǫ) ball r

(1 + ǫ)r b≈ is (1 + ǫ) approximation of b = b(p, r), if b ⊆ b≈ ⊆ b(p, r(1 + ǫ)

slide-61
SLIDE 61

16-5

Answering ANN queries

Haven’t made our life easier, since answering target ball queries is a difficult problem Don’t need exact balls (1 + ǫ) ball r

(1 + ǫ)r b≈ is (1 + ǫ) approximation of b = b(p, r), if b ⊆ b≈ ⊆ b(p, r(1 + ǫ)

Consider Interval Near Neighbor structure on approximate balls: If I≈(P, r, R, ǫ/16) is a (1 + ǫ/16) approximation to I(P, r, R, ǫ/16) If for point q, I≈(P, r, R, ǫ/16) returns a ball (p, α), α ∈ [r, R] = ⇒ p is (1 + ǫ/4)-ANN to q: r(1 + ǫ/16)i ≤ dP(q) ≤ d(p, q) ≤ r(1 + ǫ/16)i+1(1 + ǫ/16) ≤ (1 + ǫ/4)r

slide-62
SLIDE 62

17-1

Fast ANN in Rd

For a given ball, b(p, r), construct a grid centered at p, with cell-size 2i, s.t. √ d2i ≤ (ǫr)

16

Call, b≈ the set of cells that intersect b(p, r) The distance between 2 points in a d-dimensional cell of size α is at most d

i=1 α2 =

√ dα b≈ is a (1 + ǫ/16) approximate ball, and contains O

  • rd

(ǫr)d

  • = O
  • 1

ǫ d

cells

slide-63
SLIDE 63

17-2

Fast ANN in Rd

For a given ball, b(p, r), construct a grid centered at p, with cell-size 2i, s.t. √ d2i ≤ (ǫr)

16

Call, b≈ the set of cells that intersect b(p, r) The distance between 2 points in a d-dimensional cell of size α is at most d

i=1 α2 =

√ dα b≈ is a (1 + ǫ/16) approximate ball, and contains O

  • rd

(ǫr)d

  • = O
  • 1

ǫ d

cells

slide-64
SLIDE 64

18-1

Fast ANN in Rd

  • Fix the origin, and construct grid-cells from there
  • If there are 2 cells with the same size, pick the one, corresponding to the smallest ball
  • Thus construct an approximate I-(1 + ǫ/16) data structure C
slide-65
SLIDE 65

18-2

Fast ANN in Rd

  • Fix the origin, and construct grid-cells from there
  • If there are 2 cells with the same size, pick the one, corresponding to the smallest ball
  • Thus construct an approximate I-(1 + ǫ/16) data structure C

Finding the smallest ball containing q ⇐ ⇒ finding the smallest grid-cell containing q

slide-66
SLIDE 66

18-3

Fast ANN in Rd

  • Fix the origin, and construct grid-cells from there
  • If there are 2 cells with the same size, pick the one, corresponding to the smallest ball
  • Thus construct an approximate I-(1 + ǫ/16) data structure C

Finding the smallest ball containing q ⇐ ⇒ finding the smallest grid-cell containing q Encode all the cells of C into a compressed quad-tree, such that each cell appears as a node

  • Construction takes O(|C| log |C|) time
  • Finding the appropriate node in C takes O(log |C|) time
  • If information about smallest ball is propagated down the tree, answering a query takes O(log |C|)
slide-67
SLIDE 67

18-4

Fast ANN in Rd

  • Fix the origin, and construct grid-cells from there
  • If there are 2 cells with the same size, pick the one, corresponding to the smallest ball
  • Thus construct an approximate I-(1 + ǫ/16) data structure C

Finding the smallest ball containing q ⇐ ⇒ finding the smallest grid-cell containing q Encode all the cells of C into a compressed quad-tree, such that each cell appears as a node

  • Construction takes O(|C| log |C|) time
  • Finding the appropriate node in C takes O(log |C|) time
  • If information about smallest ball is propagated down the tree, answering a query takes O(log |C|)

Recall that we had a data structure with O(n

ǫ log n ǫ) balls. Each ball is approximated by O( 1 ǫd) cells

⇒ The overall complexity of the quad-tree is O(N), where N = O( n

ǫd+1 log n ǫ).

By noticing that there are many balls of similar sizes, we reduce the complexity to:

  • Construction: O(nǫ−d log2(n/ǫ) time
  • Storage: O(nǫ−d log(n/ǫ) space
  • Point location query: O(log(n/ǫ))