Locality-Sensitive Orderings ANN -Quadtree Walecki Theorem - - PowerPoint PPT Presentation

locality sensitive orderings
SMART_READER_LITE
LIVE PREVIEW

Locality-Sensitive Orderings ANN -Quadtree Walecki Theorem - - PowerPoint PPT Presentation

Locality-Sensitive Orderings Main Result Quadtree Locality-Sensitive Orderings ANN -Quadtree Walecki Theorem Local-Sensitivity Authors: Timothy Chan, Sariel Har-Peled, Mitchell Theorem Jones (ITCS 2019) Applications Presenter: Anil


slide-1
SLIDE 1

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Locality-Sensitive Orderings

Authors: Timothy Chan, Sariel Har-Peled, Mitchell Jones (ITCS 2019) Presenter: Anil Maheshwari Carleton University Ottawa, Canada

slide-2
SLIDE 2

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

What we want to do?

Local Ordering Theorem (CHJ2019)

Consider a unit cube in d-dimensions. For ǫ > 0, there is a family of O( 1

ǫd log( 1 ǫ)) orderings of [0, 1)d such that for

any p, q ∈ [0, 1)d, there is an ordering in the family where all the points between p and q are within a distance of at most ǫ||p − q||2 from p or q.

p q p q ǫ||p − q|| ǫ||p − q||

slide-3
SLIDE 3

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Tools & Techniques

Old & New Concepts

1

Quadtree.

2

Linear orderings of points in a Quadtree.

3

Shifted Quadtrees and ANN.

4

Quadtree as union of ǫ-Quadtrees.

5

(Wonderful) Walecki Construction from 19th Century.

6

Locality-Sensitive Orderings.

7

Applications in ANN, Bi-chromatic ANN, Spanners, ...

slide-4
SLIDE 4

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree of a point set

slide-5
SLIDE 5

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree of a point set

slide-6
SLIDE 6

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree of a point set

slide-7
SLIDE 7

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree of a point set

a b c d a b c d A B C D A B C D

slide-8
SLIDE 8

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Linear order

DFS traversal of Quadtree

Obtain a linear order of points by performing the DFS traversal of the Quadtree.

a b c d e f g h i j k h f a k e j i g b d c l l h f a k e l j i g b d c

slide-9
SLIDE 9

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree Cells & DFS order

a b c d e f g h i j k h f a k e j i g b d c l l

slide-10
SLIDE 10

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree Cells & DFS order

a b c d e f g h i j k h f a k e j i g b d c l l

slide-11
SLIDE 11

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree Cells & DFS order

a b c d e f g h i j k h f a k e j i g b d c l l

slide-12
SLIDE 12

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree Cells & DFS order

a b c d e f g h i j k h f a k e j i g b d c l l

slide-13
SLIDE 13

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree Cells & DFS order

a b c d e f g h i j k h f a k e j i g b d c l l

slide-14
SLIDE 14

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree Cells & DFS order

a b c d e f g h i j k h f a k e j i g b d c l l

slide-15
SLIDE 15

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Approximate NN from Linear Order

Approximate NN

Let q be nearest-neighbor of p. Assume that there is a cell containing p and q in Quadtree with diameter ≈ ||p − q||.

p q p q x

diam ≈ ||p − q|| ||p − x|| ≈ ||p − q|| q = NN(p)

x

slide-16
SLIDE 16

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtrees of Shifted Point Sets

Assume all points in P ∈ [0, 1)d. Construct D = 2⌈ d

2⌉ + 1 copies of P.

Shifted Point Sets

For i = 0, . . . , D, define shifted point sets Pi = {pj + (

i D+1, i D+1, . . . , i D+1)|∀pj ∈ P}

Let Quadtrees of P0, P1, . . . , PD be T0, T1, . . . , TD.

Chan (DCG98)

For any pair of points p, q ∈ P, there exists a Quadtree T ∈ {T0, T1, . . . , TD} such that the cell containing p, q in T has diameter c||p − q|| (for some constant c ≥ 1).

slide-17
SLIDE 17

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Dynamic ANN

Chan’s ANN Algorithm:

1

Construct linear (dfs) order for each of the Quadtrees T0, T1, . . . , TD.

2

For each point p, find its neighbor in each of the linear orders that minimizes the distance.

3

Let q be the neighbor of p with the minimum distance.

4

Report q as the ANN of p.

Chan (1998, 2006)

For fixed dimension d, in O(n log n) preprocessing time and O(n) space, we can find a c-approximate nearest neighbor of any point in P in O(log n) time (c = f(d)).

slide-18
SLIDE 18

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

ǫ-Quadtree

ǫ-Quadtree

For a constant ǫ > 0, recursively partition a cube [0, 1)d evenly into 1

ǫd sub-cubes (ǫ = 1/2 =

⇒ Standard Quadtree).

l × l × . . . × l ǫl × ǫl × . . . × ǫl ǫ2l × ǫ2l × . . . × ǫ2l ǫ3l × ǫ3l × . . . × ǫ3l l l

slide-19
SLIDE 19

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Quadtree as union of ǫ-Quadtrees

Partitioning a Quadtree T into log 1

ǫ ǫ-Quadtrees

Let ǫ = 2−3. T = T B

ǫ ∪ T R ǫ ∪ T U ǫ .

T T B

ǫ

T U

ǫ

T R

ǫ

slide-20
SLIDE 20

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Walecki’s Result

Ordering cells of a node of an ǫ-Quadtree

Let ǫ = 2−3. Any two cells are neighbors in at least one of the 8 orders.

A B C D E F G H I J K L M N O P ABPCODNEMFLGKHJI BCADPEOFNGMHLIKJ CDBEAFPGOHNIMJLK DECFBGAHPIOJNKML EFDGCHBIAJPKOLNM FGEHDICJBKALPMON GHFIEJDKCLBMANPO HIGJFKELDMCNBOAP

slide-21
SLIDE 21

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

(Wonderful) Walecki Result

Walecki Theorem

A complete graph on n vertices can be partitioned into ⌈ n

2 ⌉ Hamiltonian paths.

slide-22
SLIDE 22

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Linear orders of points of P ∈ [0, 1)d

DFS Traversal of an ǫ-Quadtree Tǫ

1

#children of any node of Tǫ = O(1/ǫd).

2

Construct O(1/ǫd) linear orders of cells using Walecki’s construction.

3

Generate O(1/ǫd) permutations of points in P by performing DFS traversal of Tǫ with respect to each linear order.

slide-23
SLIDE 23

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Structure of Cells

A B C D E F G H I J K L M N O P A B P C O D N E M F L G K H J I

slide-24
SLIDE 24

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

What have we learnt so far?

1

Point set P ∈ [0, 1)d.

2

Shifted points sets P0, P1, . . . , PD and their Quadtrees T0, T1, . . . , TD.

3

Each Quadtree Ti partitioned into log 1

ǫ ǫ-Quadtrees.

4

Linear orders of cells of a node in an ǫ-Quadtree.

5

Permutations of points of P obtained from DFS (for each linear order) of ǫ-Quadtrees.

6

Total #Permutations = O(D × log 1

ǫ × 1 ǫd ) = O( 1 ǫd log 1 ǫ).

7

These permutations satisfy “locality” condition.

slide-25
SLIDE 25

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Locality Property

Locality-Sensitive Orderings

Let the Quadtree Ti ∈ {T0, T1, . . . , TD} has a cell containing p and q with diameter ≈ ||p − q||.

Ti

slide-26
SLIDE 26

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Locality Property

Locality-Sensitive Orderings

Let the Quadtree Ti ∈ {T0, T1, . . . , TD} has a cell containing p and q with diameter ≈ ||p − q||.

c||p − q|| c||p − q||

ǫc||p − q|| Ti

slide-27
SLIDE 27

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Locality Property

Locality-Sensitive Orderings

Let the Quadtree Ti ∈ {T0, T1, . . . , TD} has a cell containing p and q with diameter ≈ ||p − q||.

c||p − q|| c||p − q||

p q ǫc||p − q|| Ti

slide-28
SLIDE 28

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Locality Property

Locality-Sensitive Orderings

Let the Quadtree Ti ∈ {T0, T1, . . . , TD} has a cell containing p and q with diameter ≈ ||p − q||.

c||p − q|| c||p − q||

p q ǫc||p − q|| Ti

slide-29
SLIDE 29

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Locality Property

Locality-Sensitive Orderings

Let the Quadtree Ti ∈ {T0, T1, . . . , TD} has a cell containing p and q with diameter ≈ ||p − q||.

c||p − q|| c||p − q||

p q ǫc||p − q||

All points within a distance of ǫc||p − q|| from p and q

Ti

slide-30
SLIDE 30

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Main Theorem

(CHJ 2019)

Consider a unit cube [0, 1)d. For ǫ > 0, there is a family of O( 1

ǫd log( 1 ǫ)) orderings of [0, 1)d such that for any

p, q ∈ [0, 1)d, there is an ordering in the family where all the points between p and q are within a distance of at most ǫ||p − q||2 from p or q.

p q p q ǫ||p − q|| ǫ||p − q||

slide-31
SLIDE 31

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Applications

1

Approximate Bichromatic NN

2

Geometric Spanners

3

(Points) Fault-Tolerant Spanners

4

Approximate EMST

5

Approximate NN

6

Dynamization of all of the above

7

...

slide-32
SLIDE 32

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Bichromatic NN

Approximate Bichromatic NN

Let p and q constitute a red-blue Nearest Neighbor of the point set.

c||p − q|| c||p − q||

p q ǫc||p − q|| Ti

slide-33
SLIDE 33

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Bichromatic NN

Approximate Bichromatic NN

Let p and q constitute a red-blue Nearest Neighbor of the point set.

c||p − q|| c||p − q||

p q ǫc||p − q|| Ti

p p’ q q’

slide-34
SLIDE 34

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Bichromatic NN

Approximate Bichromatic NN

Let p and q constitute a red-blue Nearest Neighbor of the point set.

Ti

p p’ q q’

||p′ − q′|| ≤ ||p′ − p|| + ||p − q|| + ||q − q′|| ≤ (1 + 2ǫ)||p − q||

slide-35
SLIDE 35

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Bichromatic ANN Algorithm

Input: Bichromatic point set R ∪ B ∈ [0, 1)d. Output: Bichromatic ANN pair (r, b), r ∈ R, b ∈ B. For each of D = O(d) quadtrees of shifted point sets & For each of the log 1

ǫ ǫ-quadtrees

1

Construct O( 1

ǫd ) Walecki’s orderings.

2

For each ordering, perform DFS traversal of the ǫ-quadtrees, resulting in a permutation of points in P.

3

Among all pairs of consecutive red-blue points in all the permutations, find the pair (r, b) that minimizes ||r − b||.

4

Report (r, b) as Bichromatic ANN.

slide-36
SLIDE 36

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Bichromatic ANN

Bichromatic ANN Theorem (CHJ19)

Let R and B be two sets of points in [0, 1)d and let ǫ ∈ (0, 1) be a parameter. Then one can maintain a (1 + ǫ)-approximation to the bichromatic closest pair in R × B under updates (i.e., insertions and deletions) in O(log n log2 1

ǫ/ǫd) time per operation, where n is the total

number of points in the two sets. The data structure uses O(n log 1

ǫ/ǫd) space, and at all times maintains a pair of

points r ∈ R, b ∈ B, such that ||r − b|| ≤ (1 + ǫ)d(R, B), where d(R, B) = minr∈R,b∈B ||r − b||. Variants of linear orders/permutations are used to construct dynamic structures for ANN, Geometric Spanners, Approximate EMST, etc.

slide-37
SLIDE 37

Locality-Sensitive Orderings Main Result Quadtree ANN ǫ-Quadtree Walecki Theorem Local-Sensitivity Theorem Applications

Thank-you