Highway and VC Dimensions: from Practice to Theory and Back

advertisement
Highway and VC Dimensions:
from Practice to Theory and Back
Ittai Abraham Daniel Delling1 Amos Fiat2
Andrew V. Goldberg1 Renato F. Werneck1
1 Microsoft
Research – Silicon Valley
2 Tel
A.V. Goldberg (MSR-SVC)
Aviv University
Highway and VC Dimensions
6/11/2013
1 / 38
Highway Dimension 3.0
Original HD Definition
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
2 / 38
Highway Dimension 3.0
Original HD Definition
New HD Definition
more intuitive results
close relationship of HD to doubling dimension
analysis of the transit node algorithm
better query bounds
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
2 / 38
Outline
1
Motivation
2
Transit Node Algorithm
3
VC-dimension and Shortest Paths
4
Highway Dimension and Shortest Path Covers (SPCs)
5
Computing SPCs
6
Analyzable Preprocessing
7
TN Algorithm Analysis
8
Hub Labeling Algorithm
9
Experimental Results
10
Concluding Remarks
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
3 / 38
Shortest Paths: Recent Developments
Continent-sized road networks have 10s of millions intersections.
Dijkstra’s algorithm: ≈ 2 s
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
4 / 38
Shortest Paths: Recent Developments
Continent-sized road networks have 10s of millions intersections.
Dijkstra’s algorithm: ≈ 2 s
Routing in Road Networks
arc flags [Lauther 04, Köhler et al. 06, Bauer & Delling 08]
A∗ with landmarks [Goldberg & Harrelson 05]
reach [Gutman 04], [Goldberg et al. 06]
highway hierarchies [Sanders & Schultes 05]
contraction hierarchies [Geisberger et al. 08]
transit nodes [Bast et al. 06]
DIMACS Shortest Paths Implementation Challenge (2005–2006)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
4 / 38
Shortest Paths: Recent Developments
Continent-sized road networks have 10s of millions intersections.
Dijkstra’s algorithm: ≈ 2 s
Routing in Road Networks
arc flags [Lauther 04, Köhler et al. 06, Bauer & Delling 08]
A∗ with landmarks [Goldberg & Harrelson 05]
reach [Gutman 04], [Goldberg et al. 06]
highway hierarchies [Sanders & Schultes 05]
contraction hierarchies [Geisberger et al. 08]
transit nodes [Bast et al. 06]
DIMACS Shortest Paths Implementation Challenge (2005–2006)
Greatly improved performance: << 1 ms, ≈ 0.1 s on a mobile device
Only a few hundred or less intersections searched
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
4 / 38
Definitions and Model
Input
graph G = (V, E) with unique shortest paths
|V | = n, |E| = m
for this talk, assume G is undirected
weight function ` (length, transit time, fuel consumption, ...)
static problem, G and ` incorporate all modeling information
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
5 / 38
Definitions and Model
Input
graph G = (V, E) with unique shortest paths
|V | = n, |E| = m
for this talk, assume G is undirected
weight function ` (length, transit time, fuel consumption, ...)
static problem, G and ` incorporate all modeling information
Query (multiple times for the same input network)
given origin s and destination t, find optimal path from s to t
exact algorithms help modeling and debugging
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
5 / 38
Definitions and Model
Input
graph G = (V, E) with unique shortest paths
|V | = n, |E| = m
for this talk, assume G is undirected
weight function ` (length, transit time, fuel consumption, ...)
static problem, G and ` incorporate all modeling information
Query (multiple times for the same input network)
given origin s and destination t, find optimal path from s to t
exact algorithms help modeling and debugging
Algorithms with preprocessing
two phases: practical preprocessing and real-time queries
preprocessing output not much bigger than the input
preprocessing may use more resources than queries
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
5 / 38
Outline
1
Motivation
2
Transit Node Algorithm
3
VC-dimension and Shortest Paths
4
Highway Dimension and Shortest Path Covers (SPCs)
5
Computing SPCs
6
Analyzable Preprocessing
7
TN Algorithm Analysis
8
Hub Labeling Algorithm
9
Experimental Results
10
Concluding Remarks
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
6 / 38
Transit Node (TN) Algorithm
[Bast et al. 06]
For a region, there is a small set of nodes such that all sufficiently long
shortest paths out of the region pass a node in the set
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
7 / 38
TN Preprocessing
Basic concepts
divide a map into regions (a few thousand)
for each region, optimal paths to far away places pass
through one of a small number of access nodes (≈ 10 on
the average)
the union of access nodes is the set of transit nodes
(≈ 10 000)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
8 / 38
TN Preprocessing
Basic concepts
divide a map into regions (a few thousand)
for each region, optimal paths to far away places pass
through one of a small number of access nodes (≈ 10 on
the average)
the union of access nodes is the set of transit nodes
(≈ 10 000)
Empirical observation: small number of access/transit nodes
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
8 / 38
TN Preprocessing
Basic concepts
divide a map into regions (a few thousand)
for each region, optimal paths to far away places pass
through one of a small number of access nodes (≈ 10 on
the average)
the union of access nodes is the set of transit nodes
(≈ 10 000)
Empirical observation: small number of access/transit nodes
Preprocessing algorithm
find access nodes for every region
connect each vertex to its access nodes
compute all pairs of shortest paths between transit nodes
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
8 / 38
TN Query
Long-range query algorithm
the shortest path has the form
s – access(s) – access(t) – t
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
9 / 38
TN Query
Long-range query algorithm
the shortest path has the form
s – access(s) – access(t) – t
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
9 / 38
TN Query
Long-range query algorithm
the shortest path has the form
s – access(s) – access(t) – t
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
9 / 38
TN Query
Long-range query algorithm
the shortest path has the form
s – access(s) – access(t) – t
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
9 / 38
TN Query
Long-range query algorithm
the shortest path has the form
s – access(s) – access(t) – t
table look-up for the
(access(s), access(t)) node
pairs
Remarks
very fast: 10 × 10 table look-ups per long-range query
local queries: another method or multilevel approach
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
9 / 38
Theoretical Results
Practice
intuitive and practical algorithms, but...
why do they work well on road networks?
what is a road network (formally)?
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
10 / 38
Theoretical Results
Practice
intuitive and practical algorithms, but...
why do they work well on road networks?
what is a road network (formally)?
Theory [Abraham et al. 10, 11]
define highway dimension (HD)
good time bounds for transit nodes, highway hierarchies, and
reach algorithms assuming HD is small
even better bound for the hub labeling (HL) algorithm [Gavoille et
al. 01, Cohen et al. 02]
improved practical performance [Abraham et al. 11]
analysis highlights algorithm similarities
generative model of small HD networks (road network formation)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
10 / 38
Outline
1
Motivation
2
Transit Node Algorithm
3
VC-dimension and Shortest Paths
4
Highway Dimension and Shortest Path Covers (SPCs)
5
Computing SPCs
6
Analyzable Preprocessing
7
TN Algorithm Analysis
8
Hub Labeling Algorithm
9
Experimental Results
10
Concluding Remarks
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
11 / 38
VC-Dimension [Vapnik & Chervonenkis 71]
base set X, collection of subsets R, set system (X, R)
for Y ⊆ X, Y|R = (Y, {R ∩ Y|R ∈ R})
R shatters Y if Y|R = 2Y
(X, R) has VC-dimension d if d is the smallest integer such that no
d + 1 subset of X can be shattered
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
12 / 38
VC-Dimension [Vapnik & Chervonenkis 71]
base set X, collection of subsets R, set system (X, R)
for Y ⊆ X, Y|R = (Y, {R ∩ Y|R ∈ R})
R shatters Y if Y|R = 2Y
(X, R) has VC-dimension d if d is the smallest integer such that no
d + 1 subset of X can be shattered
Example (points and half-planes)
X is a plane, R is the set of all half-planes, VC-dimension is 3
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
12 / 38
VC-Dimension [Vapnik & Chervonenkis 71]
base set X, collection of subsets R, set system (X, R)
for Y ⊆ X, Y|R = (Y, {R ∩ Y|R ∈ R})
R shatters Y if Y|R = 2Y
(X, R) has VC-dimension d if d is the smallest integer such that no
d + 1 subset of X can be shattered
Example (points and half-planes)
X is a plane, R is the set of all half-planes, VC-dimension is 3
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
12 / 38
VC-Dimension [Vapnik & Chervonenkis 71]
base set X, collection of subsets R, set system (X, R)
for Y ⊆ X, Y|R = (Y, {R ∩ Y|R ∈ R})
R shatters Y if Y|R = 2Y
(X, R) has VC-dimension d if d is the smallest integer such that no
d + 1 subset of X can be shattered
Example (points and half-planes)
X is a plane, R is the set of all half-planes, VC-dimension is 3
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
12 / 38
VC-Dimension [Vapnik & Chervonenkis 71]
base set X, collection of subsets R, set system (X, R)
for Y ⊆ X, Y|R = (Y, {R ∩ Y|R ∈ R})
R shatters Y if Y|R = 2Y
(X, R) has VC-dimension d if d is the smallest integer such that no
d + 1 subset of X can be shattered
Example (points and half-planes)
X is a plane, R is the set of all half-planes, VC-dimension is 3
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
12 / 38
VC-Dimension [Vapnik & Chervonenkis 71]
base set X, collection of subsets R, set system (X, R)
for Y ⊆ X, Y|R = (Y, {R ∩ Y|R ∈ R})
R shatters Y if Y|R = 2Y
(X, R) has VC-dimension d if d is the smallest integer such that no
d + 1 subset of X can be shattered
Example (points and half-planes)
X is a plane, R is the set of all half-planes, VC-dimension is 3
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
12 / 38
VC-Dimension [Vapnik & Chervonenkis 71]
base set X, collection of subsets R, set system (X, R)
for Y ⊆ X, Y|R = (Y, {R ∩ Y|R ∈ R})
R shatters Y if Y|R = 2Y
(X, R) has VC-dimension d if d is the smallest integer such that no
d + 1 subset of X can be shattered
Example (points and half-planes)
X is a plane, R is the set of all half-planes, VC-dimension is 3
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
12 / 38
USP Systems
Definition
Unique Shortest Path (USP) Systems
G is a graph with unique shortest paths, X = V
R contains (some) sets of vertices on shortest paths
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
13 / 38
USP Systems
Definition
Unique Shortest Path (USP) Systems
G is a graph with unique shortest paths, X = V
R contains (some) sets of vertices on shortest paths
Strange question: VC-dimension of a USP system?
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
13 / 38
USP Systems
Definition
Unique Shortest Path (USP) Systems
G is a graph with unique shortest paths, X = V
R contains (some) sets of vertices on shortest paths
Strange question: VC-dimension of a USP system?
Theorem
VC-dimension of a USP system is at most two
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
13 / 38
USP Systems
Definition
Unique Shortest Path (USP) Systems
G is a graph with unique shortest paths, X = V
R contains (some) sets of vertices on shortest paths
Strange question: VC-dimension of a USP system?
Theorem
VC-dimension of a USP system is at most two
Proof:
three points not on a shortest path cannot be shattered
three points on a (unique) shortest path cannot be shattered
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
13 / 38
Outline
1
Motivation
2
Transit Node Algorithm
3
VC-dimension and Shortest Paths
4
Highway Dimension and Shortest Path Covers (SPCs)
5
Computing SPCs
6
Analyzable Preprocessing
7
TN Algorithm Analysis
8
Hub Labeling Algorithm
9
Experimental Results
10
Concluding Remarks
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
14 / 38
r-Significant Paths
Given a scale r, which paths are significant?
r < `(P) ≤ 2r?
A.V. Goldberg (MSR-SVC)
r < `(P)?
Highway and VC Dimensions
6/11/2013
15 / 38
r-Significant Paths
Given a scale r, which paths are significant?
r < `(P) ≤ 2r?
r < `(P)?
continuous graph yields more intuitive results
r
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
15 / 38
r-Significant Paths
Given a scale r, which paths are significant?
r < `(P) ≤ 2r?
r < `(P)?
continuous graph yields more intuitive results
r
Definition
P is r-significant if P with optional single-edge extensions at one or
both ends is a shortest path of length greater than r
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
15 / 38
r-Significant Paths
Given a scale r, which paths are significant?
r < `(P) ≤ 2r?
r < `(P)?
continuous graph yields more intuitive results
r
Definition
P is r-significant if P with optional single-edge extensions at one or
both ends is a shortest path of length greater than r
if P = (v, w) is a single-edge path with `(P) > r, then trivial paths
{v} and {w} are r-significant
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
15 / 38
More Definitions
assume that G is connected and every edge is a shortest path
network diameter D
Pr : the set of all r-significant paths
Br (v) = {w : dist(v, w) ≤ r} (a ball)
hitting set for (X, R): H ⊆ X : ∀R ∈ R, H ∩ R 6= ∅
dist(v, P) = min{dist(v, w) : w ∈ P}
Sr (v) = {P ∈ Pr : dist(v, P) ≤ 2r} (neighborhood system)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
16 / 38
Highway Dimension Motivation
For a region, there is a small set of nodes such that all sufficiently long
shortest paths out of the region pass a node in the set
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
17 / 38
Highway Dimension Definition
Highway dimension (HD) h
For every r > 0 and v ∈ V, ∃ a hitting set of size
at most h covering all r-significant P :
dist(v, P) ≤ 2r
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
v
B2r(v)
6/11/2013
18 / 38
Highway Dimension Definition
Highway dimension (HD) h
For every r > 0 and v ∈ V, ∃ a hitting set of size
at most h covering all r-significant P :
dist(v, P) ≤ 2r
v
B2r(v)
Lemma
If C is a hitting set for a “nice” set S of r-significant paths and v is an
endpoint of P ∈ S, then ∃u ∈ P ∩ C with dist(v, u) ≤ r
Proof:
v u
r
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
18 / 38
Relationship to Doubling Dimension
Doubling dimension (DD)
A metric space has a doubling dimension d if ∀r > 0, every ball
of radius 2r can be covered by 2d balls of radius r
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
19 / 38
Relationship to Doubling Dimension
Doubling dimension (DD)
A metric space has a doubling dimension d if ∀r > 0, every ball
of radius 2r can be covered by 2d balls of radius r
Theorem
If G, ` has HD h, then the metric space induced by G, ` has DD
log(h + 1)
Proof:
cover the ball B2r (v)
r-ball centers: S =
{v} ∪ {hitting set for r-significant paths at distance ≤ 2r from v}
|S| ≤ h + 1
w ∈ Br (v) is covered
w ∈ B2r (v) − Br (v): v to w s.p. contains u ∈ S : dist(u, w) ≤ r
w is covered
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
19 / 38
Star Graph
n-vertex star graph, unit edge lengths
doubling dimension: log n
HD (old definition): 1
HD (new definition): n
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
20 / 38
New/Improved Query Bounds
Lemma
A graph with HD h has the maximum degree of at most h
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
21 / 38
New/Improved Query Bounds
Lemma
A graph with HD h has the maximum degree of at most h
Improved query bounds
algorithm
old bound
transit nodes NA
(global)
reach
O((∆ + h log D)(h log D))
contraction
O((∆ + h log D)(h log D))
hierarchies
hub labels
O(h log D)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
new bound
O ( h2 )
O((h log D)2 )
O((h log D)2 )
O(h log D)
6/11/2013
21 / 38
Shortest Path Covers (SPCs)
(r, k) Shortest path cover ((r, k)-SPC):
All paths in Pr can be hit by a sparse set
A set C such that C is an r-hitting set for Pr and
∀v ∈ V, |C ∩ B2r (v)| ≤ k
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
P
v
B 2r(v)
6/11/2013
22 / 38
Shortest Path Covers (SPCs)
(r, k) Shortest path cover ((r, k)-SPC):
All paths in Pr can be hit by a sparse set
A set C such that C is an r-hitting set for Pr and
∀v ∈ V, |C ∩ B2r (v)| ≤ k
P
v
B 2r(v)
Theorem
If G has HD h, then ∀ r ∃ an (r, h)-SPC.
Proof:
Show S∗ , the smallest r-hitting set for Pr , is an (r, h)-SPC
P
Let S0 (v) = S∗ ∩ B2r (v)
Suppose |S0 (v)| > h
v
S0 (v) hits only paths in Sr (v)
B 2r(v)
Let H be the r-hitting set of Sr such that |H | ≤ h
Replacing S0 (v) by H gives a smaller set S∗
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
22 / 38
Computing Approximate SPCs
Finding S∗ is NP-hard. Efficient construction?
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
23 / 38
Computing Approximate SPCs
Finding S∗ is NP-hard. Efficient construction?
Greedy gives an O(log n) approximation [Abraham et al. 10].
Approximation independent of n?
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
23 / 38
Computing Approximate SPCs
Finding S∗ is NP-hard. Efficient construction?
Greedy gives an O(log n) approximation [Abraham et al. 10].
Approximation independent of n?
Theorem
Suppose we have a poly-time, (c log h)-approximation algorithm for
hitting set. If G has HD h, then for any r we can construct, in
polynomial time, an (r, O(h log h))-SPC.
Proof: Similar to the previous proof. Maintain a hitting set C. If for
some v, |C ∩ B2r | > ch log h, compute a hitting set for (V, Sr ) of size at
most ch log h and get a smaller hitting set C.
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
23 / 38
Hitting Sets in Low VC-dimension
[Clarkson 88, Brönnimann & Goodrich 95, Even et al. 95]
Theorem
For a set system with optimal hitting set of size h and VC-dimension d,
an O(hd log(hd)) hitting set is poly-time computable
Corollary
For an HD h graph, we can efficiently compute an O(h log h)-size
hitting set for (V, Sr (v))
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
24 / 38
Outline
1
Motivation
2
Transit Node Algorithm
3
VC-dimension and Shortest Paths
4
Highway Dimension and Shortest Path Covers (SPCs)
5
Computing SPCs
6
Analyzable Preprocessing
7
TN Algorithm Analysis
8
Hub Labeling Algorithm
9
Experimental Results
10
Concluding Remarks
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
25 / 38
Multi-scale SPCs
k = h or O(h log h) depending on preprocessing complexity
Definition
Ci = (2i−1 , k)-SPC for 0 ≤ i ≤ log D
Can construct “dense” Ci s:
C0 = V
|Clog D | ≤ k
|Ci | ≤ k|Ci+1 |
Basis for our preprocessing algorithms
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
26 / 38
Outline
1
Motivation
2
Transit Node Algorithm
3
VC-dimension and Shortest Paths
4
Highway Dimension and Shortest Path Covers (SPCs)
5
Computing SPCs
6
Analyzable Preprocessing
7
TN Algorithm Analysis
8
Hub Labeling Algorithm
9
Experimental Results
10
Concluding Remarks
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
27 / 38
TN Algorithm Analysis
Preprocessing
√
pick T so that T2 is not too big (e.g., T = m)
pick smallest t : |Ct | ≤ T
let Ct be the set of transit nodes
compute distances between transit nodes
compute access nodes A(v): build s.p. tree from v, include
w ∈ Ct iff the v to w tree path has no other elements of Ct
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
28 / 38
TN Algorithm Analysis
Preprocessing
√
pick T so that T2 is not too big (e.g., T = m)
pick smallest t : |Ct | ≤ T
let Ct be the set of transit nodes
compute distances between transit nodes
compute access nodes A(v): build s.p. tree from v, include
w ∈ Ct iff the v to w tree path has no other elements of Ct
Lemma
∀v, |A(v)| ≤ k
Proof. If v ∈ Ct , then |A(v)| = 1
Otherwise ∀w ∈ A(v), dist(v, w) ≤ 2 · 2t−1 , so w ∈ B2·2t−1 (v)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
28 / 38
TN Algorithm Analysis
Preprocessing
√
pick T so that T2 is not too big (e.g., T = m)
pick smallest t : |Ct | ≤ T
let Ct be the set of transit nodes
compute distances between transit nodes
compute access nodes A(v): build s.p. tree from v, include
w ∈ Ct iff the v to w tree path has no other elements of Ct
Lemma
∀v, |A(v)| ≤ k
Proof. If v ∈ Ct , then |A(v)| = 1
Otherwise ∀w ∈ A(v), dist(v, w) ≤ 2 · 2t−1 , so w ∈ B2·2t−1 (v)
Theorem
TN global queries take O(k2 ) time
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
28 / 38
TN: Global vs. Local
Global query correctness
let g(v, w) be the global query value
if dist(v, w) > 2t−1 , then g(v, w) = dist(v, w)
if dist(v, w) ≤ 2t−1 , g(v, w) may be too big
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
29 / 38
TN: Global vs. Local
Global query correctness
let g(v, w) be the global query value
if dist(v, w) > 2t−1 , then g(v, w) = dist(v, w)
if dist(v, w) ≤ 2t−1 , g(v, w) may be too big
how big can g(v, w) get in this case?
∀u ∈ A(v), dist(v, u) ≤ 2t
g(v, w) ≤ 2t + 2t−1 + 2t = 5 · 2t−1
if g(v, w) > 5 · 2t−1 , the global query is correct
otherwise, run a local query algorithm
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
29 / 38
TN: Global vs. Local
Global query correctness
let g(v, w) be the global query value
if dist(v, w) > 2t−1 , then g(v, w) = dist(v, w)
if dist(v, w) ≤ 2t−1 , g(v, w) may be too big
how big can g(v, w) get in this case?
∀u ∈ A(v), dist(v, u) ≤ 2t
g(v, w) ≤ 2t + 2t−1 + 2t = 5 · 2t−1
if g(v, w) > 5 · 2t−1 , the global query is correct
otherwise, run a local query algorithm
distance oracle without Euclidean distances
different such oracle (independently discovered): [Arz et al. 13]
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
29 / 38
Outline
1
Motivation
2
Transit Node Algorithm
3
VC-dimension and Shortest Paths
4
Highway Dimension and Shortest Path Covers (SPCs)
5
Computing SPCs
6
Analyzable Preprocessing
7
TN Algorithm Analysis
8
Hub Labeling Algorithm
9
Experimental Results
10
Concluding Remarks
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
30 / 38
Hub Labeling Algorithm
[Gavoille et al. 01, Cohen et al. 02]
Generic preprocessing
∀v ∈ V precompute a label L(v) ⊆ V
∀w ∈ L(v) precompute distances dist(v, w)
Cover property: ∀s, t, a shortest s-t path intersects L(s) ∩ L(t)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
31 / 38
Hub Labeling Algorithm
[Gavoille et al. 01, Cohen et al. 02]
Generic preprocessing
∀v ∈ V precompute a label L(v) ⊆ V
∀w ∈ L(v) precompute distances dist(v, w)
Cover property: ∀s, t, a shortest s-t path intersects L(s) ∩ L(t)
Query algorithm
Find and return minu∈L(s)∩L(t) (dist(s, u) + dist(u, t))
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
31 / 38
Hub Labeling Algorithm
[Gavoille et al. 01, Cohen et al. 02]
Generic preprocessing
∀v ∈ V precompute a label L(v) ⊆ V
∀w ∈ L(v) precompute distances dist(v, w)
Cover property: ∀s, t, a shortest s-t path intersects L(s) ∩ L(t)
Query algorithm
Find and return minu∈L(s)∩L(t) (dist(s, u) + dist(u, t))
Remarks
very simple query, efficient if the labels are small
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
31 / 38
HL for Low HD
Low HD preprocessing
for i = 0, 1, . . . , log D compute (2i−1 , k)-SPC Ci
∀v ∈ V set L(v) =
S
i (Ci
∩ B2·2i (v))
Lemma: ∀v ∈ V, |L(v)| = O(k log D)
Correctness
let P be the shortest s-t path and 2i < `(P) ≤ 2i+1
P ⊆ B2·2i (s) and P ⊆ B2·2i (t)
∃u ∈ P ∩ Ci , for such u we have u ∈ L(s) ∩ L(t)
Theorem
HL preprocessing can be poly-time and queries take O(k log D) time
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
32 / 38
Practical Implementation
Query
∀v, sort hubs by vertex ID
merge-sort like search for label intersection
good locality
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
33 / 38
Practical Implementation
Query
∀v, sort hubs by vertex ID
merge-sort like search for label intersection
good locality
distance queries < 300 ns.
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
33 / 38
Practical Implementation
Query
∀v, sort hubs by vertex ID
merge-sort like search for label intersection
good locality
distance queries < 300 ns.
Preprocessing
theoretical preprocessing impractical
use theory-guided heuristics
new algorithmic ideas and careful engineering
preprocessing time: 4 min. [Abraham et al. 11]
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
33 / 38
Practical Implementation
Query
∀v, sort hubs by vertex ID
merge-sort like search for label intersection
good locality
distance queries < 300 ns.
Preprocessing
theoretical preprocessing impractical
use theory-guided heuristics
new algorithmic ideas and careful engineering
preprocessing time: 4 min. [Abraham et al. 11]
average label size 85 (recently improved to 69)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
33 / 38
Practical Implementation
Query
∀v, sort hubs by vertex ID
merge-sort like search for label intersection
good locality
distance queries < 300 ns.
Preprocessing
theoretical preprocessing impractical
use theory-guided heuristics
new algorithmic ideas and careful engineering
preprocessing time: 4 min. [Abraham et al. 11]
average label size 85 (recently improved to 69)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
33 / 38
Outline
1
Motivation
2
Transit Node Algorithm
3
VC-dimension and Shortest Paths
4
Highway Dimension and Shortest Path Covers (SPCs)
5
Computing SPCs
6
Analyzable Preprocessing
7
TN Algorithm Analysis
8
Hub Labeling Algorithm
9
Experimental Results
10
Concluding Remarks
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
34 / 38
Experimental Results
query [ns]
space [GB]
prepr [h:m]
CH
79 373
0.4
0:14
TNR
1 711
2.5
0:21
TNR-AF
922
5.7
2:00
HL
556
18.8
0:37
HL-gl
256
17.7
60:00
HLC
2 554
1.8
0:50
Random queries, Western Europe, n = 18M, m = 42M
CH: [Geisberger et al. 08]
TNR: [Arz et al. 13]
TNR-AF: [Bauer et al. 10]
HL: [Abraham et al. 12]
HL-gl: [Abraham et al. 12]
HLC: [Delling et a. 13]
Good HL performance motivated further work (HHL, HLC, HLDB)
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
35 / 38
Concluding Remarks
Research Directions
complexity of computing SPCs in small HD networks
(NP-hard?)
practical algorithms for SPCs for large road networks
other applications of HD and SPCs
Complexity of hierarchical hub labels.
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
36 / 38
Concluding Remarks
Research Directions
complexity of computing SPCs in small HD networks
(NP-hard?)
practical algorithms for SPCs for large road networks
other applications of HD and SPCs
Complexity of hierarchical hub labels.
Science of Algorithmics
experimental observations: several algorithms are very fast, small
number of transit nodes
theory: highway dimension and sublinear query bounds
prediction: the hub labeling algorithm is fast
verification: practical implementation and experiments
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
36 / 38
Thank You!
SPA (Shortest Path Algorithms) project page
http://research.microsoft.com/en-us/projects/SPA/
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
37 / 38
Questions?
1
Motivation
2
Transit Node Algorithm
3
VC-dimension and Shortest Paths
4
Highway Dimension and Shortest Path Covers (SPCs)
5
Computing SPCs
6
Analyzable Preprocessing
7
TN Algorithm Analysis
8
Hub Labeling Algorithm
9
Experimental Results
10
Concluding Remarks
A.V. Goldberg (MSR-SVC)
Highway and VC Dimensions
6/11/2013
38 / 38
Download