optimal distributed all pairs shortest paths
DESCRIPTION
Optimal Distributed All Pairs Shortest Paths. Stephan Holzer ETH Zürich Roger Wattenhofer ETH Zürich. ETH Zurich – Distributed Computing Group . TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A. - PowerPoint PPT PresentationTRANSCRIPT
1
Optimal Distributed All Pairs Shortest Paths
ETH Zurich – Distributed Computing Group
Stephan HolzerETH Zürich
Roger WattenhoferETH Zürich
Distributed network Graph G of n nodes
2
4
51
3log n
log
nlog n log n
log n
log n
2
13
Local infor-mation only
?
Unique IDs
Limitedbandwidth
Distributed network Graph G of n nodes
2
4
51
3log n
log
nlog n log n
log n
log n
2
13
Local infor-mation only
?Time complexity:
number of communication rounds
Synchronized
Internal computations
negligible
Unique IDs
Limitedbandwidth
Count the nodes!
Runtime: ?Diameter
1. Compute BFS-Tree
2. Count nodes in subtrees
1
1
0
21
2
12
2
2
Diameter of a network
• Distance between two nodes = Number of hops of shortest path• Diameter of network = Maximum distance, between any two nodes
Diameter of a network
• Distance between two nodes = Number of hops of shortest path• Diameter of network = Maximum distance, between any two nodes
Diameter of this network?
• Spanning Tree – Broadcasting, Aggregation, etc• Minimum Spanning Tree – Efficient broadcasting,
etc. • Shortest path – Routing, etc.• Steiner tree – Multicasting, etc. • Many other graph problems.
• Diameter appears frequently in distributed computing
Fundamental problems
• Spanning Tree – Broadcasting, Aggregation, etc• Minimum Spanning Tree – Efficient broadcasting,
etc. • Shortest path – Routing, etc.• Steiner tree – Multicasting, etc. • Many other graph problems.
• Diameter appears frequently in distributed computing
• E.g. local vs. global
Fundamental problems
• Spanning Tree – Broadcasting, Aggregation, etc• Minimum Spanning Tree – Efficient broadcasting,
etc. • Shortest path – Routing, etc.• Steiner tree – Multicasting, etc. • Many other graph problems.
• Diameter appears frequently in distributed computing
• E.g. local vs. global
Fundamental problems 1. Formal definition?
Complexity of computing D? .
Known bounds: O(nD) Ω (D)[before 2012]
≈O(n2) ≈(1)
• Spanning Tree – Broadcasting, Aggregation, etc• Minimum Spanning Tree – Efficient broadcasting,
etc. • Shortest path – Routing, etc.• Steiner tree – Multicasting, etc. • Many other graph problems.
• Diameter appears frequently in distributed computing
• E.g. local vs. global
Fundamental problems 1. Formal definition?
Complexity of computing D? .
Known bounds: O(nD) Ω (D)
New bounds: Ω (n)
[before 2012]≈O(n2) ≈(1)
[FHW 2012]
Even if D = 5
[2012]
• Spanning Tree – Broadcasting, Aggregation, etc• Minimum Spanning Tree – Efficient broadcasting,
etc. • Shortest path – Routing, etc.• Steiner tree – Multicasting, etc. • Many other graph problems.
• Diameter appears frequently in distributed computing
• E.g. local vs. global
Fundamental problems
Complexity of computing D? .
Known bounds: O(nD) Ω (D)
New bounds: O(n) Ω (n)
[before 2012]≈O(n2) ≈(1)
[FHW 2012]
Even if D = 5
[here]3
1. Formal definition?
• Spanning Tree – Broadcasting, Aggregation, etc• Minimum Spanning Tree – Efficient broadcasting,
etc. • Shortest path – Routing, etc.• Steiner tree – Multicasting, etc. • Many other graph problems.
• Diameter appears frequently in distributed computing
• E.g. local vs. global
Fundamental problems
Complexity of computing D? .
Known bounds: O(nD) Ω (D)
New bounds: O(n) Ω (n)
[before 2012]≈O(n2) ≈(1)
[FHW 2012]
Even if D = 5
[here]3
Independently: [Peleg, Roditty, Tal 2012]
1. Formal definition?
Use APSP to Compute Diameter
Compute All Pairs Shortest PathsFor each node {
compute distances to all other nodes;}
0
APSP in O(n)
Compute All Pairs Shortest PathsFor each node {
compute distances to all other nodes;}
1
1
0
1
1
APSP in O(n)
Compute All Pairs Shortest PathsFor each node {
compute distances to all other nodes;}
1
1
0
21
2
12
2
2
APSP in O(n)
Compute All Pairs Shortest PathsFor each node {
compute distances to all other nodes; O(D)}
1
1
0
21
2
12
2
2
APSP in O(n)
Compute All Pairs Shortest PathsFor each node {
compute distances to all other nodes; O(D)}
0
APSP in O(n)
Compute All Pairs Shortest PathsFor each node {
compute distances to all other nodes; O(D)}
1
10
1
1
APSP in O(n)
Compute All Pairs Shortest PathsFor each node {
compute distances to all other nodes; O(D)}
2
2
22
1
10
1
1
APSP in O(n)
Compute All Pairs Shortest PathsFor each node {
compute distances to all other nodes; O(D)}
2
22
1
10
1
12
3
APSP in O(n)
Compute All Pairs Shortest PathsFor each node { O(n)
compute distances to all other nodes; O(D)}
2
22
1
10
1
12
3
APSP in O(n)
Compute All Pairs Shortest PathsFor each node { O(n)
compute distances to all other nodes; O(D)} O(nD)
2
22
1
10
1
12
3
APSP in O(n)
Compute All Pairs Shortest PathsFor each node { O(n)
compute distances to all other nodes; O(D)} O(nD)
Limited parallelism:Only some nodes active.
2
22
1
10
1
12
3
APSP in O(n)
Compute All Pairs Shortest PathsFor each node { O(n)
compute distances to all other nodes; O(D)} O(nD)
Limited parallelism:Only some nodes active.
Wanted: All nodes active all the time!
2
22
1
10
1
12
3
APSP in O(n)
r
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;
Compute All Pairs Shortest Paths
APSP in O(n)
r
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
APSP in O(n)
r
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
APSP in O(n)
v
u
w
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
v
u Starts at t
w
APSP in O(n)
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
Starts at t
v
u
w
APSP in O(n)
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
Starts at t
w
v
u
APSP in O(n)
Arrives at
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
Starts at t
w
v
u
APSP in O(n)
Arrives at
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
Starts at t
w
v
u
APSP in O(n)
Arrives at
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot; start shortest paths(v);
}
Compute All Pairs Shortest Paths
Starts at t
Arrives at Arrives at
w
v
u
APSP in O(n)
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
Starts at t
Arrives at Arrives at
w
v
u
APSP in O(n)
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
Starts at t
Arrives at Arrives at +1
w
v
u
APSP in O(n)
Starts at t
Arrives at Arrives at +1
w
v
u
APSP in O(n)
v never active for u and wat the same time!
True for any trippel.No congestion!
Runtime: O(n +D) = O(n)
1. Pick a root-node r;2. T := BFS-Tree(r);3. Pebble P traverses T
in preorder;4. If P visits node v first time{
wait 1 timeslot;start shortest paths(v);
}
Compute All Pairs Shortest Paths
S-Shortest Path in O(|S| + D)
S:= Minimum O(D/ε)-Domingating Set
(x,1+ε)-Approximating Diameter
[Kutten, Peleg 1998]
S-Shortest Path in O(|S| + D)
S:= Minimum O(D/ε)-Domingating Set
Runtime: O(n/D + D)
(x,1+ε)-Approximating Diameter
[Kutten, Peleg 1998]
S-Shortest Path in O(|S| + D)
S:= Minimum O(D/ε)-Domingating Set
Runtime: O(n/D + D) Maximal Error: D/ε vs. D
(x,1+ε)-Approximating Diameter
[Kutten, Peleg 1998]
S-Shortest Path in O(|S| + D)
S:= Minimum O(D/ε)-Domingating Set
Runtime: O(n/D + D) Maximal Error: D/ε vs. D
(x,1+ε)-Approximating Diameter
[Kutten, Peleg 1998]