optimal distributed all pairs shortest paths

87
Optimal Distributed All Pairs Shortest Paths ETH Zurich – Distributed Computing Group Stephan Holze ETH Zürich Roger Wattenhofer ETH Zürich

Upload: henry-pittman

Post on 31-Dec-2015

37 views

Category:

Documents


1 download

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 Presentation

TRANSCRIPT

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

3

Distributed network Graph G of n nodes

2

4

51

3

Unique IDs

Distributed network Graph G of n nodes

2

4

51

31 Local infor-

mation only

Unique IDs

Distributed network Graph G of n nodes

2

4

51

32

13

Local infor-mation only

Unique IDs

Distributed network Graph G of n nodes

2

4

51

32

13

Local infor-mation only

?

Unique IDs

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

Distributed algorithms:a simple example

Count the nodes!

Count the nodes!

1. Compute BFS-Tree

Count the nodes!

1

1

0

21

2

12

2

2

Runtime: ?

1. Compute BFS-Tree

2. Count nodes in subtrees

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 a network

• Distance between two nodes = Number of hops of shortest path

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

Extentions

ExtentionsRouting tables

Social networks

Fighting spam

Extentions

Combination with: [Peleg, Roditty, Tal 2012]

Extentions

Combined with [Peleg, Roditty, Tal 2012]

APSP in O(n)

Compute All Pairs Shortest Paths

0

APSP in O(n)

Compute All Pairs Shortest Paths

0

APSP in O(n)

Knows its distance to all other nodes

Compute All Pairs Shortest Paths

0

APSP in O(n)

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)

Compute All Pairs Shortest Paths

APSP in O(n)

r

1. Pick a root-node rCompute All Pairs Shortest Paths

APSP in O(n)

r

1. Pick a root-node r2. T := BFS-Tree(r)

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;

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

APSP-Application:Compute Diameter in O(n)

APSP-Application:Compute Diameter in O(n)

Optimal?

Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

information

Diameter of Network? Diameter Lower Bound!

information

n log n bandwidth

≈(n)

Extentions

Extentions

Diameter of Network? Diameter Lower Bound!

Diameter of Network? Diameter Lower Bound!

S-Shortest Path in O(|S| + D)(x,1+ε)-Approximating Diameter

S-Shortest Path in O(|S| + D)

Shortest paths between S x V

(x,1+ε)-Approximating Diameter

S-Shortest Path in O(|S| + D)(x,1+ε)-Approximating Diameter

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]

Extentions

[Peleg, Roditty, Tal 2012]:(x, 3/2)-approximate diameter O(

Extentions

[Peleg, Roditty, Tal 2012]:(x, 3/2)-approximate diameter O(

Summary

Diameter Ө(n)APSP O(n)

r

v

u

w

APSP Ω(n)

S-Shortest Paths O(|S| + D)

Thanks!