Title: Enumerating Distances Using Spanners of Bounded Degree
1Enumerating Distances Using Spanners of Bounded
Degree
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
Generalizing skip lists A spanner with
logarithmic spanner diameter
Maya Zalcberg 049823446 Ilia Flax
015600052
2Outline
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Enumerating distances using spanners of bounded
degree - approximate distance enumeration
- Exact distance enumeration
- Generalizing skip lists A spanner with
logarithmic spanner diameter
3Introduction
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- The goal
- Enumating the smallest k distances among the
distances in a group of n points. - input
- S a set of n points in
- k an integer such that 1 lt k lt
4Introduction
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Output
- a sequence a1,b1ak,bk distinct
pairs of S is called the k closest pairs, if -
- 1.
- 2. the distances ,
are the k smallest elements in
multiset
5Introduction
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- There are two solutions available
- using bounded-degree spanner to enumerate the k
approximate closest pairs in -
- Modify the algorithm to obtain the k exact
closest pairs in
6Approximate distance
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- S a set of n points in , k an integer such
that , t gt 1 a real number. - sorted by their distances
- is a sequence of k
t-approximate closest pairs if -
-
7Approximate distance
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- G (S,E) it a t-spanner for S
- D positive integer. The degree of each point from
S is less then or equal to D. - PQ is a priority queue that stores at most k
pairs. - Each priority(p,q) in PQ is equal to the length
of the shortest path in G between p and q at the
moment.
8Approximate distance
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Dijkstras algorithm
- We use a variant of Dijkstras SingleSource(G,s,R)
algorithm - that takes as input an undirected graph G in
which every edge has a positive weight, a vertex
s of G, and a real number Rgt0. It returns a set A
of all vertices v for which
9Algorithm
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- The algorithm uses the t-spanner G to compute a
sequence of k t-approximate closest pairs in S. - The idea is to run Dijkstras single-source
shortest path algorithm simultaneously from all
point of S.
10Algorithm
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- ApproxDistEnum(G,k)
- Initializing PQ contains the min(k,E) shortest
edges of E. - . The priority(p,q) of any such edge p,q is
equal to the Euclidean distance between p and q. - Then a sequence of k iterations is carried out.
11Algorithm
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- In each iteration
- The pair p,q with the lowest priority from PQ
is deleted and reported immediately. - For each edge q,r (and, symmetrically p,s )
of G - If the pair p,r doesnt occur in PQ, then
- priority(p,r)priority(p,q)qr and p,r
inserted into PQ. If PQ contains k1 pairs, the
pair with the highest priority is deleted. - If the pair p,r occures in PQ, then if its
priority is higher than priority(p,q)qr ,
then the priorityp,r is set to
priority(p,q)qr.
12 Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
Correctness
- According to the analysis of Dijkstras
algorithm, the algorithm returns the k shortest
path distances in G. - We show that these k pairs are the t-approximate
closest pairs in G. -
13 Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
Correctness
- Some new definitions
-
- the length of a shortest path between
and in the t-spanner G -
- is a permutation of 1,2, such that
-
14 Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
Correctness
- ApproxDistEnum(G,k) reports k pairs of points
whose final priority values are - Since G is a t-spanner,
- so by replacing i by we get
-
15 Correctness
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
16 Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
Correctness
17Correctness
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
18Correctness
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- For each i, 1ltilt
- The k pairs of points that are reported by the
algorithm are the k t-approximate closest pairs,
if -
19Correctness
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Proof
- Reminder!
- the length of the shortest path in G between
and is equal to . -
- Else G is a t-spanner, so
20Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Initializing
- Building PQ
- Running Dijkstra
-
21Exact Distance
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- G (S,E) it a t-spanner for point set S, such
that the maximum degree is D. - By making two modifications to ApproxDistEnum(G,k)
we can enumerate the k exact closest pairs.
22Algorithm
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- This algorithm takes as input a t-spanner G
(S,E) and an integer k. - It returns a sequence of k exact closest pairs in
S.
23Algorithm
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- ExactDistEnum(G,k)
- We make two modification to ApproxDistEnum(G,k)
- 1. The priority queue PQ is maintained
at full size. - 2. The algorithm does not report pairs as
before. It keeps the k closest pairs among
all pairs that were ever inserted into PQ. -
- to be continued.
24Algorithm
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- ExactDistEnum(G,k)
- 2. the terminition is when the smallest
priority in PQ is larger then t times the
Euclidian-distance of the k-th closest pair
found so far. - . At termination, the k closest pairs that have
been found are reported.
25Algorithm
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Implementation issues
- A second priority queue is maintained that
contains the same pairs as PQ, and in which the
priority of and pair p,q is equal to the
euclidian distance pq.
26Correctness
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Claim
- Let x be the Euclidian distance of the k-th pair
reported by the algorithm. - Let p,q be any two distinct points of S such that
the pair p,q is never inserted into PQ. -
- pqgtx
-
27Correctness
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Proof
- Let r,s a pair that causes us to stop.
- At the termination time priority(r,s)gttx
- Also, at the same time priority(r,s) is equal
to the length of the shortest path between r and
s in G. - At termination, all the shortest paths in G
shorter then priority(r,s) have been found.
28Correctness
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Proof
- - the length of the shortest path in G
between p and q. - priority(r,s).
- Since G is a t-spanner,
-
-
29Correctness
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Summary
- For each pair p,q, with , is
inserted into PQ. - The distance of the k-th closest pair in S is
less then or equal to x. - ExactDistEnum(G,k) enumerates the k closest pairs
in S.
30Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Fundamental claim
- - the k-th smallest Euclidean distance in S.
- p,q the current pair with minimum priority in
PQ. - Assume p,q is the first pair for which
- ExactDistEnum(G,k) terminates at the moment when
it selects p,q
31Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Proof
- the length of the shortest path in G between
p and q - x the k-th smallest Euclidean distance
- Priority(p,q)
- We have to show that gt tx
32Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Proof
-
- Any pair r,s whose distance in G has already
occurred as minimal element in PQ. - r,s distinct points of S such that
- the length of a shortest path in G between r
and s. -
33Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Summary
- At p,q selection as a minimal element in PQ,
all pairs of distinct points of S having
Euclidean distance at most Wk have been inserted
into PQ. -
- gt tx
34Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Summary
- I the number of iterations made by
ExactDistEnum(G,k) - Then the running time is
- I is less than or equal to the number of pairs of
distinct points of S having distance at most - Now we need to give an upper bound to I
35Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Lemma
- - the k-th smallest Euclidean distance in S.
- t a real number, larger then 1.
- M the number of pairs of distinct points of S
having distance at most
36Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Proof
-
- - d-dimensional grid with cells of side
lengths . Each cell of this grid has the
form - for some integers . a cell is the
Cartesian product of d intervals, which are
closed on the left and open on the right.
37Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- a cell of is nonempty, if it contains at
least one point of S. - g the number of nonempty cells. we number these
cell arbitrarily . - - the number of points of S that are
contained in the i-th nonempty cell. - , the total number of pairs x,y
such that x and y are contained in the same cell
of .
38Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- if two points are in the same cell, their
distance is less . - w is the k-th smallest distance in S, therefore
. - , and an arbitrary cell in ,
-
- the neighborhood of C in the d-dimensional
hypercube is defines as followed -
-
To be continued.
39Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- the side lengths of are equal to
, and contains the cell c in its
center. Neighborhood of C the set of all
nonempty cells of that overlap . - For each i, . is the set of all
indices j, such that the j-th nonempty cell is in
the neighborhood of the i-th nonempty cell. -
40Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- p,q two distinct points of s such that
. p,q are contained in the i-th and j-th
nonempty cells of . - if
- but therefore .
-
41Time Analysis
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- 16. Finally, we can prove the upper bound on M,
which is the number of distances in S that are
less then or equal to . -
42Summary
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Theorem
- Let S be a set on n points in , let
be a real number, let be a positive integer,
and let be a t-spanner for S of degree .
Given any integer with ,
algorithm ExactDistEnum(G,k) computes a sequence
of exact closest pairs in S in
43Generalizing Skip Lists
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- We present a randomized algorithm that constructs
a sparse spanner whose expected spanner diameter
is . -
- Skip lists this randomized data structure is a
sparse 1-spanner whose spanner diameter is
. - Lets start by presenting some definitions
44Generalizing Skip Lists
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Sparse Spanner a spanner with
or with a spanner with small weight/size. - Spanner Diameter The longest shortest path
between a pair of points in S. - Next we will present the skip list data
structure.
45Generalizing Skip Lists
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- S a set on n real numbers.
- Construct a sequence of subsets of S
- and .
- As long as ,construct a random subset
of as followed - Each number of has a 50 chance of getting
picked. - Set to be the subset of all the picked
points of . - Finally, Set and iterate.
46Generalizing Skip Lists
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- - the number of iterations. Then we obtain the
following sequence - of subsets of S, where .
- Definition , . The Skip List for
S1. for each i, , there is a double
linked list storing the elements of in
sorted order. Elements of are at level i of
the skip list.2. for each i, , and
each , the occurrences of in and
are connected by pointers.
47Generalizing skip lists
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
48Generalizing Skip Lists
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Lemma
- , , produced by the given random
process, and let M be the total size of the
corresponding skip list.1. The expected value of
is . 2. There is a constant C
that for all large enough real numbers S
3. M is proportional to , which has
expected value of . 4. There is a
constant that for all large enough real
numbers S
49Building the paths
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- p,q two points in S. we want to build a path
between p and q. - Start at p at level 1. walk right until you reach
an point at level 2. - If q is reached finished.
- Otherwise, let p1 be the first point encountered
at level 2. - Do the same walking left from q at level 1- let
q1 is the first point encountered at level 2. -
if p1 is reached finished. - Recursively build a path between p1 and q1.
50Building the paths
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- This way, we construct two paths.
- The construction stops as soon as the two paths
meet. - The result of building a path between 4 and 14 on
the skip list example is
51Building the paths
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- The expected number of steps made to build a path
between p and q is
. - The excepted number of steps made at level i is
O(1), and there are levels.
52The spanner in 1-D
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- By flattening the vertices, we can regard the
skip list as a graph G. - The expected path length between two points p,q
is . - The path the from the example in G is
4,5,9,12,14. - The skip list is a 1-spanner for S.
- What is the expected spanner diameter ?
53Summary
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Theorem
- Let S be a set on n real numbers. The skip list
of S can be regarded as a graph which is a
1-spanner for S. with high probability, the
number of edges of this graph is and
its spanner diameter is .
54Skip list spanner
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- We want to generalize out solution for 1-D to
2-D. - S a set of n points in the plane.
- Well use the same random process to obtain the
following sequence - of subsets of S, where .
55Skip List 2-D spanner
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Definition
- - an integer. , are
constructed be the random process.
For S is defined as follows - 1. For each, i, , the points of are
stored in the graph . The points of
are at level i of the skip list spanner. - 2. for each i, , and each ,
the occurrences of in level i and level i-1
are connected by pointers.
56Recall T graph
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Definition
- Let be an integer, let
and let S be a set of points in the plane. The
undirected graph is defined as
follows - 1. The vertices of are the points
of S. - 2. For each point p of S and for each cone
C of Ck, such that the translated cone Cp
contains one or more points of ,
the graph contains one edge where
r is a point in , whose
orthogonal projection onto is closest
to p
57Recall T graph
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
58Skip List 2-D spanner
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- is a graph with vertex set S and
edge set the union of the edge sets of the graphs
, . - Lemma
- an integer, , S a set of n
points in the plane. The skip list spanner is a
t-spanner for S with with high probability,
this graph contains edges and can be
constructed in time.
59Building a path
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Like in the 1-D case in order to build a path
between p and q we build two paths. One starting
at p and the other at q. We stop when the paths
meet. - We start at p at level 1 and build a path in the
graph from p toward q. - Suppose weve built a path from p to x.
- If x q finished.
- If and x doesnt occur on level 2
- 1. C a cone of such that q in .
- 2. x is the point of such that
x,x is an edge of . -
-
60Building a path
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Then x is the next point on the path from p
toward q. set xx. - We keep extending this path until xq or the
point x occurs at level 2. - Assume that x occurs at level 2.
- We start building a path from q to x in
. - Assume weve built a path from q to y.
- We stop extending the path if y is one of the
points on the path from p to x or if y occurs at
level 2.
61Building a path
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Assume y is a point p on the path from p to x.
In this case we return the path from p to p
followed by the reverse of the path from q to p
and stop. - Otherwise, x and y are both on level 2 and we use
the same algorithm to construct a path between
them.
62Summary
Outline Enumerating distance Using spanners
Approximate distance Presentation
Algorithm Correctness Time
Analysis Exact distance Presentation
Algorithm Correctness Time
Analysis Generalizing skip lists Skip
List Skip List Spanner
- Theorem
- Let be an integer, let ,
and let be a set of n points in the plane. Then
the following is true 1. The skip list spanner
is a t-spanner for
with high probability it
contains edges. 2. The skip list
spanner can be constructed in
with high probability. 3. with high
probability, the spanner diameter of the
skip list spanner is . 4. all these
bounds are with respect to the coin flips
that are used to build the skip list
spanner.
63