Top Banner
Searching Dynamic Searching Dynamic Point Sets in Spaces Point Sets in Spaces with Bounded Doubling with Bounded Doubling Dimension Dimension Lee-Ad Gottlieb Lee-Ad Gottlieb Joint work with Joint work with Richard Cole Richard Cole
71

Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Searching Dynamic Point Sets Searching Dynamic Point Sets in Spaces with Bounded in Spaces with Bounded

Doubling DimensionDoubling Dimension

Lee-Ad GottliebLee-Ad Gottlieb

Joint work withJoint work withRichard ColeRichard Cole

Page 2: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

NNSNNS

Nearest Neighbor SearchNearest Neighbor Search (NNS) (NNS)• Given a set of points Given a set of points SS in a metric in a metric

space space • Preprocess Preprocess SS so that the following so that the following

query can be answered efficiently:query can be answered efficiently: given query point q, what is the closest given query point q, what is the closest

point to point to qq in in SS??q

Page 3: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

NNSNNS

A sublinear algorithm for NNS in A sublinear algorithm for NNS in general metrics?general metrics?• Bad news: not possible.Bad news: not possible.

q

~1~1

~1

~1

~1

Page 4: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

NNSNNS

What if we only require only an What if we only require only an approximate NNS (ANN)? approximate NNS (ANN)? • More bad news: Still takes linear time!More bad news: Still takes linear time!

This talk deals with ANN.This talk deals with ANN. Can we parameterize theCan we parameterize the

hard case? hard case?

q

~1~1

~1

~1

~1

Page 5: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Doubling DimensionDoubling Dimension

The space within radius r of The space within radius r of center center cc is the is the rr--ballball of of cc..

Point set X has doubling Point set X has doubling dimension dimension if if • the points of X covered by the points of X covered by

ball B can be covered by 2ball B can be covered by 2 balls of half the radius.balls of half the radius.

1

2

3

4

6

5

7

8

Page 6: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

NNS in Low Doubling DimensionNNS in Low Doubling Dimension

Data structure for (1+Data structure for (1+)-ANN query )-ANN query on on SS• Navigating Net of points aids search. Navigating Net of points aids search. • A Navigating Net is composed of levels A Navigating Net is composed of levels

of of -nets. -nets.

Navigating nets: Simple algorithms Navigating nets: Simple algorithms for proximity searchfor proximity search. R. . R. Krauthgamer, J.R. Lee. SODA ‘04Krauthgamer, J.R. Lee. SODA ‘04

Page 7: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Modified Modified -net-net

anan modified modified -net for a point set -net for a point set SS is is a set of balls of radius a set of balls of radius centered at centered at points of points of SS• Packing propertyPacking property

The centers are separated from each other The centers are separated from each other by some minimum distance by some minimum distance ’’

We use We use ’ = 4/5 ’ = 4/5

• The ballsThe balls Cover Cover all the points of the all the points of the SS..

Page 8: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Page 9: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Radius = 1

Covering: all points are covered

Packing

Page 10: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Radius = 2

Page 11: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Page 12: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Page 13: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Page 14: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Page 15: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Page 16: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Page 17: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Page 18: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating Net VariantNavigating Net Variant1-net2-net4-net8-net

Page 19: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 20: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 21: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 22: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 23: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 24: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 25: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 26: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 27: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 28: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Search exampleSearch example1-net2-net4-net8-net

Page 29: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Another PerspectiveAnother Perspective

DAG

Page 30: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Another PerspectiveAnother Perspective

DAG

Page 31: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Another PerspectiveAnother Perspective

DAG

Page 32: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Another PerspectiveAnother Perspective

DAG

Page 33: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

AnalysisAnalysis

Time to find the lowest enclosing ballTime to find the lowest enclosing ball• How many levels of nets are there?How many levels of nets are there?

Let the spread of the points be Let the spread of the points be ddmaxmax/d/dminmin

There are O(log There are O(log ) levels) levels

• At every level, we consider At every level, we consider O(O() ) balls.balls.O(O() ) log log

If If = n = nO(1)O(1) we get a good search time we get a good search time• 22O(O() ) log nlog n

But what if But what if is asymptotically larger? is asymptotically larger?

Page 34: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Summary of Previous WorkSummary of Previous Work

(1+(1+)-NNS query)-NNS query Insertion/deletionInsertion/deletion sizesize

KL-04KL-04 22O(O() ) log log (1/(1/))O(O()) 22O(O()) log log 22O(O())nn

BKL-06BKL-06 22O(O() ) log log (1/(1/))O(O()) 22O(O()) log log O(n)O(n)

HM-06HM-06 22O(O() ) log n log n (1/(1/))O(O()) ** O(n)O(n)

This paperThis paper 22O(O() ) log n log n (1/(1/))O(O()) 22O(O()) log n log n O(n)O(n)

Spread of the points = dSpread of the points = dmaxmax/d/dminmin

Abstract dimensionAbstract dimension* * Static structure, Static structure, 22O(O())n log nn log n construction time construction time

Page 35: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

ChallengeChallenge

How to dynamically maintain and How to dynamically maintain and search a deep DAG?search a deep DAG?

loglog levelsFor large

Page 36: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Special CaseSpecial Case

O(log n) search onan unbalanced treeis well known.

Page 37: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Special CaseSpecial Case

O(log n) search onan unbalanced treeis well known.

Page 38: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Special CaseSpecial Case

O(log n) search onan unbalanced treeis well known.

Page 39: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Special CaseSpecial Case

O(log n) search onan unbalanced treeis well known.

Page 40: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Special CaseSpecial Case

O(log n) search onan unbalanced treeis well known.

Can we do something similar for our DAGs?

Page 41: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Towards a TreeTowards a Tree

DAG

Page 42: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Towards a TreeTowards a Tree

Spanning tree representation

Page 43: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Towards a TreeTowards a Tree

Spanning tree representation

Page 44: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Towards a TreeTowards a Tree

Spanning tree representation

Balls & subtreesof interest

Page 45: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Towards a TreeTowards a Tree

Spanning tree representation

Balls & subtreesof interest

Page 46: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Towards a TreeTowards a Tree

Balls of interest

Spanning tree representation

Page 47: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

PreliminariesPreliminaries

For a ball x at level i, its For a ball x at level i, its friendsfriends are are all balls of level i that intersect x.all balls of level i that intersect x.• In the navigating net, every ball knows In the navigating net, every ball knows

who its friends are. This information is who its friends are. This information is readily available from the DAGreadily available from the DAG

• If two balls of the same level both If two balls of the same level both contain contain qq, they must be friends., they must be friends.

Page 48: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Modified SearchModified Search

The search begins with the top ball as the single The search begins with the top ball as the single ball of interestball of interest..

In general, the search is specified by 2In general, the search is specified by 2O(O()) balls of balls of interest,interest, all at the same level. all at the same level.• each of these balls contain the query pointeach of these balls contain the query point• For illustration, let 2For illustration, let 2O(O()) = 3 = 3

Page 49: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Modified SearchModified Search

Start the search on the largest treeStart the search on the largest tree• Identify a subtree with a constant Identify a subtree with a constant

fraction of the total size of the large treefraction of the total size of the large tree

Page 50: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Modified SearchModified Search

If the query point is not in the If the query point is not in the subtree, eliminate the subtree from subtree, eliminate the subtree from consideration.consideration.

Page 51: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Modified SearchModified Search

If the query point is in the subtree, If the query point is in the subtree, take it as a new tree of interesttake it as a new tree of interest• Take its friends, too.Take its friends, too.

Page 52: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Modified SearchModified Search

Friends are descendants of previous nodes Friends are descendants of previous nodes of interest.of interest.• The new subtrees of interest are smaller than The new subtrees of interest are smaller than

the old ones.the old ones.• The previously largest tree has been reduced The previously largest tree has been reduced

by a constant fractionby a constant fraction

Friends

Page 53: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Modified SearchModified Search

Friends are descendants of previous nodes Friends are descendants of previous nodes of interest.of interest.• The new subtrees of interest are smaller than The new subtrees of interest are smaller than

the old ones.the old ones.• The largest subtree has been reduced by a The largest subtree has been reduced by a

constant fractionconstant fraction• This implies an O(log n) searchThis implies an O(log n) search

Page 54: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Conclusion: Conclusion: • Spanning tree of the DAG can be Spanning tree of the DAG can be

searched in time 2searched in time 2O(O() ) log nlog n

We now discuss maintaining the We now discuss maintaining the navigating net under insertionsnavigating net under insertions• Recall that Recall that can be large. can be large.• We cannot afford log We cannot afford log time to update time to update

the DAGthe DAG

Page 55: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net First problem:First problem:

• InsertionsInsertions

1-net2-net4-net

Page 56: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net1-net2-net4-net

First problem:First problem:• InsertionsInsertions

Page 57: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net1-net2-net4-net

First problem:First problem:• InsertionsInsertions• Solution: close-Solution: close-

containmentcontainment

Page 58: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net1-net2-net4-net

First problem:First problem:• InsertionsInsertions• Solution: close-Solution: close-

containmentcontainment

Page 59: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 60: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 61: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 62: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 63: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 64: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 65: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 66: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 67: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 68: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Solution:Solution:• dropoff =5dropoff =5• Close-containmentClose-containment

1-net5-net25-net

Page 69: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net

Second ProblemSecond Problem• Net sizeNet size

It costs too much to store all the friendsIt costs too much to store all the friends 22O(O()) friends for each of O(n) balls gives 2 friends for each of O(n) balls gives 2O(O())n n

spacespace

• SolutionSolution Storing friends for only n/2Storing friends for only n/2O(O()) balls, uses balls, uses

O(n) space.O(n) space. Implicit: no need to know the value of Implicit: no need to know the value of

Page 70: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

Navigating NetNavigating Net Third ProblemThird Problem

• DeletionsDeletions A deleted point may have been the center of A deleted point may have been the center of (log (log ) )

balls of the net.balls of the net. We cannot remove all these balls.We cannot remove all these balls.

• SolutionSolution Leave the balls there, but mark the 1-level ball as Leave the balls there, but mark the 1-level ball as

deleted.deleted.• After After (n) deletions, start rebuilding structure in the (n) deletions, start rebuilding structure in the

backgroundbackground During the search, identify which subtrees of the During the search, identify which subtrees of the

spanning tree have unmarked nodesspanning tree have unmarked nodes• Only these subtrees should be searchedOnly these subtrees should be searched• Cost: O(1) for each query.Cost: O(1) for each query.

Page 71: Searching Dynamic Point Sets in Spaces with Bounded Doubling Dimension Lee-Ad Gottlieb Joint work with Richard Cole.

ConclusionConclusion

We give a dynamic ANN method that We give a dynamic ANN method that is spread independentis spread independent• (1+(1+)-ANN search: 2)-ANN search: 2O(O() ) log n log n (1/(1/))O(O())

• Insertions/deletions: 2Insertions/deletions: 2O(O() ) log n log n • Data structure size: O(n)Data structure size: O(n)