Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal...

112
Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015

description

This talk: Organization 3 Graph structures Unweighted, Undirected UnWeighted, Undirected UnWeighted, UnDirected Tools A pproximation R andomness (Things are pretty much the same for unweighted directed graphs)

Transcript of Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal...

Page 1: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

1

Shortest Paths in Decremental, Distributed

and Streaming Settings

Danupon Nanongkai KTH Royal Institute of Technology

BIRS, Banff, March 2015

Page 2: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

2

This talk• Focus on single-source shortest paths (SSSP)• 3 Settings: Distributed, Decremental,

Streaming• The three settings seem to share some

common features: All we can do is essentially BFS

• Better guess for the right solution by looking at these settings at the same time

*

* There are exceptions

Page 3: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

3

This talk: Organization

Graph structures

Unweighted, Undirected

UnWeighted, Undirected

UnWeighted, UnDirected

Tools

Approximation

Randomness

(Things are pretty much the same for unweighted directed graphs)

Page 4: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

4

Model Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

? ? ? ?

Semi-Stream(# passes) ? ? ? ?

Decremental(total update time) ? ? ? ?

Page 5: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

5

Preliminaries

Part 0

Page 6: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

6

Notations

• n = number of nodes• m = number of edges• W = (max weight) / (min weight)• SSSP = single-source shortest paths problem• APSP = all-pairs shortest paths problem

Page 7: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

7

Remarks

• polylog n and polylog W are mostly hidden• Some great results may not be mentioned

(sorry!)• If I seem to miss something, please let me

know (thank you!)

Page 8: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

8

Introduction

Part 1

Page 9: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

9

Distributed Setting (CONGEST)

Part 1.1

Page 10: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

10

1

23

4

5 6

1

1

1

1

1

4

3

74

4

Network represented by a weighted graph G with n nodes and diameter D.

n=6D=2

Page 11: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

11

1

23

4

5 6

43

6

1

1

1

1

1

1

4

3

74

4

41

1

Nodes know only local information

Page 12: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

12

Time complexity “number of days”

Page 13: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

13

Days: Exchange O(log n) bit

1Day 1

23

4

5 6

Page 14: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

14

Nights: Perform local computation

1

23

4

5 6

1Day

1Night

Assume: Any calculation finishes in one night

Page 15: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

15

1Night

Days: Exchange O(log n) bit

2Day 1

23

4

5 6

Page 16: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

16

2Day

2Night

Nights: Perform local computation

1

23

4

5 6

Page 17: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

17

Finish in t days Time complexity = t

Page 18: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

18

Example

s-t distance

Page 19: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

19

s

23

4

5 t

1

1

1

1

1

4

3

74

4

Goal: Node t knows distance from s

Distance from s = ?

Page 20: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

20

s

23

4

5 t

1

1

1

1

1

4

3

74

4

Distance from s = 4

Goal: Node t knows distance from s

Page 21: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

21

s

23

4

5 t

1

1

1

1

1

4

3

74

4

Distance from s = 4 8

2-approximate solution

Page 22: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

22

Computing s-t distance can be done in O(D) time by using the

Breadth-First Search (BFS) algorithm.

Unweighted Case

Page 23: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

23

s

23

4

5 t

0

Source node sends its distance to neighbors

1Day

Page 24: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

24

23

4

5

0

Each node updates its distance

1Day

1Day

1Day

1Night

11

1

s

t

Page 25: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

25

23

4

5

0

Nodes tell new knowledge to neighbors

2Day

11

1

s

t

Page 26: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

26

23

4

5

0

Each node updates its distance

1Day

1Day

1Day

2Night

11

1

22

s

t

Page 27: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

27

This algorithm takes O(D) time

Page 28: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

28

(Multi-pass) Streaming Setting

Part 1.2

Page 29: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

29

Small RAM

Huge Harddisk

3rd pass

1 2

3 4

(1, 2) (2, 4) (1, 3) (2, 3)

W(n2) space

O(n) space

Page 30: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

30

Small RAM

Huge Harddisk(1, 2) (2, 4) (1, 3) (2, 3)

Page 31: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

31

Small RAM

Huge Harddisk(1, 2) (2, 4) (1, 3) (2, 3)

Page 32: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

32

Small RAM

Huge Harddisk(1, 2) (2, 4) (1, 3) (2, 3)

Page 33: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

33

Small RAM

Huge Harddisk(1, 2) (2, 4) (1, 3) (2, 3)

Page 34: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

34

Small RAM

Huge Harddisk

2nd pass

(1, 2) (2, 4) (1, 3) (2, 3)

Page 35: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

35

Small RAM

Huge Harddisk

3nd pass

(1, 2) (2, 4) (1, 3) (2, 3)

Page 36: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

36

Complexity = # of passes

Ideally: (polylog n) passesLimitation: (n polylog n) space

Page 37: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

37

Example

s-t distance

Page 38: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

38

Huge Harddisk

3rd pass

s 2

3 t

(1, 2) (2, 4) (1, 3) (2, 3)

Small RAM

Initially

0

Page 39: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

39

Small RAM

Huge Harddisk

3rd pass

s 2

3 t

(1, 2) (2, 4) (1, 3) (2, 3)

1st pass

0 1

1

Page 40: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

40

Small RAM

Huge Harddisk

3rd pass

s 2

3 t

(1, 2) (2, 4) (1, 3) (2, 3)

2st pass

0 1

1

2

Page 41: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

41

This algorithm takes O(D)=O(n) passes

Page 42: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

42

Decremental Setting

Part 1.3

Page 43: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

43

We start with a graph withof n nodes and m edges.

Page 44: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

44

Edges are gradually deleted

Page 45: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

45

Edges are gradually deleted

Page 46: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

46

GoalMaintain some graph property

under edge deletions

Page 47: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

47

Total Update Time=

Total time to maintaingraph property after all m deletions

Page 48: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

48

Example

s-t distance

Page 49: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

49

Goal

Maintain the distance between s and t after every deletions

Page 50: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

50

Naive algorithmCompute

Breadth-First Search Tree (BFS)after every deletion

Total update time = O(m2)

Page 51: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

51

Better Solution

Dynamic BFS Tree(Even-Shiloach Tree [JACM 1981])

O(m2) O(mn)

Page 52: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

52

Algorithm descriptionas nodes talking to each other

Page 53: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

53

s

e

b c

f

d

Single-Source Shortest Paths from s

Page 54: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

54

s

e

b c

f

d

Every node v maintains its level in the BFS

level=1 level=1 level=1

level=2 level=2

Page 55: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

s

e

b c

f

d

Delete (s,b) b connects to a new parent

level=1 level=1 level=1

level=2 level=2

55

s

eb

c

f

dlevel=1 level=1

level=2 level=2level=2

Page 56: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

b announces its level change

56

s

e

b c

f

dlevel=1 level=1 level=1

level=2 level=2

s

eb

c

f

dlevel=1 level=1

level=2 level=2level=2

level(b)=2

level(b)=2

Page 57: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

f connects to a new parent. e changes level.

57

s

eb

c

f

dlevel=1 level=1

level=2 level=2level=2

s

e

b

c

f

d

level=2level=2

level=3

level=1 level=1

level(b)=2

level(b)=2

Page 58: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

Again, e announces level change

58

level(e)=3

s

e

b

c

f

d

level=2level=2

level=3

level=1 level=1

Page 59: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

Again, e announces level change

59

s

e

b

c

f

d

level=2level=2

level=3

level=1 level=1This is what we obtain after deleting (s,b)

Page 60: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

Even-Shiloach tree can be implemented in such a way that

total update time = number of messages

60

Page 61: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

s

eb

c

f

dlevel=1 level=1

level=2 level=2level=2

level(b)=2

level(b)=261

Takes

3 time steps

Even-Shiloach tree can be implemented in such a way that

total update time = number of messages

Page 62: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

62

Exercise

Number of messages (thus time complexity) is

O(mD) = O(mn)

Hint

Node v sends degree(v) messages every time level(v) increases.

Page 63: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

63

Unweighted, Undirected Graphs

Part 2

Page 64: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

64

Unweighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(D)[BFS]

Stream(# passes)

O(D)

[BFS]

Decremental(total update time)

O(mD)

[BFS]

Page 65: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

65

Unweighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(D)[BFS]

Stream(# passes)

O(D) O(n)

[BFS]

Decremental(total update time)

O(mD) O(mn)

[BFS]

Page 66: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

66

Unweighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(D)[BFS]

W(D)(even for approx)

[Folklore]

see weighted caseStream(# passes)

O(D) O(n)

[BFS]

W(R)for distance R=O(log n),

exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13]

Decremental(total update time)

O(mD) O(mn)

[BFS]

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

Page 67: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

67

Unweighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(D)[BFS]

W(D)(even for approx)

[Folklore]

see weighted caseStream(# passes)

O(D) O(n)

[BFS]

W(R)for distance R=O(log n),

exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13]

Decremental(total update time)

O(mD) O(mn)

[BFS]

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

Page 68: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

68

Lower bounds for streaming SSSP

• Feigenbaum et al. SODA’05: computing the set of vertices at distance p from source s in ≤ p/2 passes requires n1+Ω(1/p) space. – Guruswami, Onak CCC’13: Same space lower bound holds

even for (p−1) passes

• Guruswami, Onak, CCC’13: A p passes algorithm requires n1+W(1/p)/pO(1) space to check if dist(s, t) ≤ 2(p + 1) – Superlinear space when p is small

Page 69: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

69

Unweighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(D)[BFS]

W(D)(even for approx)

[Folklore]

see weighted caseStream(# passes)

O(D) O(n)

[BFS]

W(R)for distance R=O(log n),

exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13]

Decremental(total update time)

O(mD) O(mn)

[BFS]

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

W(n)?

Page 70: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

70

Hardness for Decremental SSSP

• Roditty, Zwick, ESA’04: – Assume: no combinatorial O(n3-e)-time algorithm for

Boolean Matrix Multiplication – Then: no combinatorial exact decremental SSSP

algorithm with O(mn1-e) total update time• Henzinger et al. STOC’15: – Assume: no combinatorial O(n3-e)-time algorithm for

Online Boolean Matrix-Vector Multiplication– Then: no combinatorial exact decremental SSSP

algorithm with O(mn1-e) total update time

Page 71: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

71

Online Boolean Matrix-Vector Multiplication

• Given an (n x n)-matrix M. • Given an n-vector v1.

• Must answer Mv1. • …• Given an n-vector vn.

• Must answer Mvn. • Conjecture: No O(n3-e)-time algorithm• Current best: O(n3/log2 n) [Williams, SODA’07]

Page 72: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

72

Unweighted, Undirected SSSP -- ConclusionModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(D)[BFS]

W(D)(even for approx)

[Folklore]

see weighted caseStream(# passes)

O(D) O(n)

[BFS]

W(R)for distance R=O(log n),

exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13]

Decremental(total update time)

O(mD) O(mn)

[BFS]

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

W(n)?

Page 73: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

73

UnWeighted, Undirected Graphs

Part 3

Page 74: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

74

UnWeighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

O(D)O(n)[Bellman-Ford]

Stream(# passes)

O(n)[Bellman-Ford]

Decremental(total update time)

O(m2)[trivial]

Page 75: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

75

UnWeighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

O(D)O(n)[Bellman-Ford]

W(D) W(n1/2+D) even for approx[Das Sarma et al STOC’11]

Stream(# passes)

O(n)[Bellman-Ford]

W(R) for distance R=O(log n), exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13[

Decremental(total update time)

O(m2)[trivial]

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

Page 76: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

76

W(n1/2+D) lower bound for distributed weighted SSSP

• W(D) is from the unweighted case.• Das Sarma et al. STOC’11:

There exists a family of O(log n)-diameter graphs s.t. poly(n)-approximating dist(s, t) requires W(n1/2) time(Klauck et al. PODC’14: Also hold for quantum distributed algorithms)

Page 77: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

77

UnWeighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

O(D)O(n)[Bellman-Ford]

W(D) W(n1/2+D) even for approx[Das Sarma et al STOC’11]

Stream(# passes)

O(n)[Bellman-Ford]

W(R) for distance R=O(log n), exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13[

Decremental(total update time) O(m2)

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

?

?

?

Page 78: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

78

Related open problems• Bernstein STOC’13: Exists O(mn) time for

decremental exact APSP on undirected graphs? – Exists: O(mn) time (1+e) approximation on

weighted directed graphs– Interesting even for unweighted undirected case– Weighted case: O(mn2) total update time via fully-

dynamic algorithm [Demetrescu, Italiano, STOC’03]

– Unweighted case: O(n3) total update time [Demetrescu, Italiano FOCS’01] [Baswana et al., STOC’02]

Page 79: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

79

Related open problems• Bernstein STOC’13: Exists O(mn) time for

decremental exact APSP on undirected graphs?

• One more here: Getting O(mn) for exact weighted SSSP?

• Also: distributed APSP in O(n) time– Known: O(n)-time (1+e)-approximation

• Also from Bernstein: Can we remove log W?

Page 80: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

80

UnWeighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

O(D)O(n)[Bellman-Ford]

W(D) W(n1/2+D) even for approx

O(n1/2+o(1)+D)(1+e)-approx

[Henzinger et al. ‘15]

Stream(# passes)

O(n)[Bellman-Ford]

W(R) for distance R=O(log n), exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13[

O(no(1)) (1+e)-approx

O(n1+o(1)) space

[Henzinger et al.’15]

Decremental(total update time)

O(m2) W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(m1+o(1)) (1+e)-approx

[Henzinger et al. FOCS’14]

Page 81: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

81

(1+e)-approximation for weighted undirected case

• Henzinger et al. FOCS’14: (1+e)-approximation decremental SSSP in O(m1+o(1)) total update time– Hidden in o(1): O(1/elog1/2 n)– Heavily rely on randomization

• Henzinger et al.’15: (1+e)-approximation SSSP in– Streaming: no(1) passes and n1+o(1) space– Distributed: n1/2+o(1) time

Page 82: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

82

Key subroutine: BFS Algorithms

Hop set

Thorup-Zwick Clusterspreviously used for distance oracles and spanners

Bounded-depth BFS trees from every nodewith special stopping rules

Page 83: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

83

Note: 1-pass streaming algorithm

• Feigenbaum et al. [ICALP’04]: A (2k-1)-spanner can be constructed in one pass, O(kn1/k) space– Implies, e.g., O(log n)-approximation 1-pass O(n)-

space algorithm for SSSP

Page 84: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

84

UnWeighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

O(D)O(n)[Bellman-Ford]

W(D) W(n1/2+D) even for approx

O(n1/2+o(1)+D)(1+e)-approx

[Henzinger et al. ‘15]

Stream(# passes)

O(n)[Bellman-Ford]

W(R) for distance R=O(log n), exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13[

O(no(1)) (1+e)-approx

O(n1+o(1)) space

[Henzinger et al.’15]

Decremental(total update time)

O(m2) W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(m1+o(1)) (1+e)-approx

[Henzinger et al. FOCS’14]

?

?

?

Page 85: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

85

Open: Eliminate no(1) terms

• E.g. (1+e)-approx O(n polylog n)-space (polylog n)-pass streaming algorihtm for SSSP?

• Exists an (polylog n, e)-hop set of size polylog n?– Known: (no(1), e)-hop set of size n1+o(1)

Page 86: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

86

Hop Set

Skip

Page 87: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

a

d

ef

c

b

a

d

ef

c

b

Spanner(Sparsify graph)

a

d

ef

c

b

Hopset(Densify graph)

a

d

ef

c

b

Two orthogonal approaches

Page 88: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

Hopset [Cohen, JACM’00]

88

(h,e)-hopset of a network G = (V,E) is a set E* of new weighted edges such that

h-edge paths in H=(V, E E*)∪give (1+ε) approximation to distances in G.

Page 89: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

Example (1)

Add shortcuts between every pairInput graph

89Picture from Cohen [JACM’00]

4

a

25

6

Page 90: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

Example (1)

Add shortcuts between every pairInput graph

90Picture from Cohen [JACM’00]

4

a

25

6

45

6

Page 91: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

Example (1)

Input graph

Picture from Cohen [JACM’00]

4

a

25

6

45

6

a 6

b

91

(1, 0)-hopsetone edge is enoughto get distance no error

Page 92: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

Example (2)

Input graph with (5, 0)-hopsetInput graph

92Picture from Cohen [JACM’00]

11

Page 93: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

93

Hopset constructions

References (h, e) Size NoteCohen [JACM’00] (polylog n, e) n1+o(1) PRAM alg

Bernstein [FOCS’09] (no(1),e) n1+o(1) Use Thorup-Zwick ClustersStatic O(m) time alg

Henzinger et al. [FOCS’14]

” ” Decremental O(m1+o(1))-time alg

Page 94: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

94

UnWeighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

O(D)O(n)[Bellman-Ford]

W(D) W(n1/2+D) even for approx

O(n1/2+o(1)+D)(1+e)-approx

[Henzinger et al. ‘15]

Stream(# passes)

O(n)[Bellman-Ford]

W(R) for distance R=O(log n), exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13[

O(no(1)) (1+e)-approx

O(n1+o(1)) space

[Henzinger et al.’15]

Decremental(total update time)

O(m2) W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(m1+o(1)) (1+e)-approx

[Henzinger et al. FOCS’14]

Page 95: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

95

UnWeighted, Undirected SSSPModel Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

O(D)O(n)[Bellman-Ford]

W(D) W(n1/2+D) even for approx

O(n1/2+o(1)+D)(1+e)-approx

[Henzinger et al. ‘15]

Stream(# passes)

O(n)[Bellman-Ford]

W(R) for distance R=O(log n), exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13[

O(no(1))

(1+e)-approxO(n1+o(1)) space

[Henzinger et al.’15]

Decremental(total update time)

O(m2) W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(m1+o(1)) (1+e)-approx

[Henzinger et al. FOCS’14]

?

Derandomization Ideas from [Roditty et al., ICALP’05], [Lenzen, Patt-Shamir’15], [Goldberg et al., STOC’87]

Page 96: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

96

Related question: Deterministic weighted APSP

• Deterministic decremental (1+e)-approximation O(mn)-time algorithm for weighted APSP

• Known for unweighted APSP [Henzinger et al., FOCS’13] – Derandomized [Roditty, Zwick, FOCS’04]

– Tight [Dor et al, FOCS’96], [Henzinger et al, STOC’15]

• Randomized decremental (1+e)-approximation O(mn)-time algorithm for weighted directed APSP [Bernstein, STOC’13]

Page 97: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

97

UnWeighted, Undirected SSSP -- ConclusionModel Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

O(D)O(n)[Bellman-Ford]

W(D) W(n1/2+D) even for approx

O(n1/2+o(1)+D)

(1+e)-approx

[Henzinger et al. ‘15]

Stream(# passes)

O(n)[Bellman-Ford]

W(R) for distance R=O(log n), exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13[

O(no(1))

(1+e)-approxO(n1+o(1)) space

[Henzinger et al.’15]

Decremental(total update time)

O(m2) W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(m1+o(1)) (1+e)-approx

[Henzinger et al. FOCS’14]

?

?

? ?

?

?

Page 98: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

98

UnWeighted, UnDirected Graphs

Part 4

Page 99: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

99

UnWeighted, UnDirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(n)[Bellman-Ford]

W(n1/2+D) even for approx

O(n1/2+o(1) +D)(1+e)-approx

O(n1/2D1/2+D)(1+e)-approx

Stream(# passes)

O(n)[Bellman-Ford]

W(log n) any approx (reachability)

[Guruswami,Onak CCC’13[

r-pass n2/r space[trivial]

Decremental(total update time)

O(mn)(1+e)-approx

O(m2)

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(mn1+o(1)) (1+e)-approx

O(mn0.9) (1+e)-approx

Page 100: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

100

Lower bounds for streaming directed SSSP

• Guruswami, Onak, CCC’13:

A p passes algorithm for s-t reachability requires n1+W(1/p)/pO(1) space

(Superlinear space when p is small)

Page 101: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

101

UnWeighted, UnDirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(n)[Bellman-Ford]

W(n1/2+D) even for approx

O(n1/2+o(1) +D)(1+e)-approx

O(n1/2D1/2+D)(1+e)-approx

Stream(# passes)

O(n)[Bellman-Ford]

W(log n) any approx (reachability)

[Guruswami,Onak CCC’13[r-pass n2/r space

[trivial]

Decremental(total update time)

O(mn)(1+e)-approx

O(m2)

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(mn1+o(1)) (1+e)-approx

O(mn0.9) (1+e)-approx

?

?

?

Page 102: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

102

UnWeighted, UnDirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(n)[Bellman-Ford]

W(n1/2+D) even for approx

O(n1/2+o(1) +D)(1+e)-approx

O(n1/2D1/2+D)(1+e)-approx

Stream(# passes)

O(n)[Bellman-Ford]

W(log n) any approx (reachability)

[Guruswami,Onak CCC’13[r-pass n2/r space

[trivial]

Decremental(total update time)

O(mn)(1+e)-approx

O(m2)

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(mn1+o(1)) (1+e)-approx

O(mn0.9) (1+e)-approx

Page 103: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

103

UnWeighted, UnDirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(n)[Bellman-Ford]

W(n1/2+D) even for approx

O(n1/2+o(1) +D)(1+e)-approx

O(n1/2D1/2+D)(1+e)-approx

Stream(# passes)

O(n)[Bellman-Ford]

W(log n) any approx (reachability)

[Guruswami,Onak CCC’13[r-pass n2/r space

[trivial]

Decremental(total update time)

O(mn)(1+e)-approx

O(m2)

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(mn1+o(1)) (1+e)-approx

O(mn0.9) (1+e)-approx

Page 104: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

104

Upper Bounds for Directed SSSP

• Nanongkai STOC’14 (implicit): (1+e)-approximation O(n1/2D1/2+D)-time distributed algorithm

• Henzinger et al. STOC’14: (1+e)-approximation decremental algorithm with O(mn0.99) total update time – Recently improve to O(mn0.9) total update time

Page 105: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

105

UnWeighted, UnDirected SSSPModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(n)[Bellman-Ford]

W(n1/2+D) even for approx

O(n1/2+o(1) +D)(1+e)-approx

O(n1/2D1/2+D)(1+e)-approx

Stream(# passes)

O(n)[Bellman-Ford]

W(log n) any approx (reachability)

[Guruswami,Onak CCC’13[r-pass n2/r space

[trivial]

Decremental(total update time)

O(mn)(1+e)-approx

O(m2)

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(mn1+o(1)) (1+e)-approx

O(mn0.9) (1+e)-approx

?

?

?

Page 106: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

106

Hop Set for Directed Graphs?

• k-Transitive-Closure Spanner [Thorup WG’92]:– Has the same transitive closure as in the original

graph– Diameter at most k

• There is a n1/2-TC-spanner of size O(n). How efficient can we compute it in various settings?

Page 107: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

107

Conjecture• Two parties each gets part of the directed graph.• Conjecture: There exists no communication

protocol that takes r rounds and o(n2/r) communication that can solve s-t shortest path on n-node directed graphs.

• Might be true even for reachability• Will imply a tight lower bound in the streaming

setting• Will imply a non-trivial (perhaps tight) lower

bound in the distributed setting

Page 108: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

108

Conclusion

Page 109: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

109

Unweighted, Undirected SSSP -- ConclusionModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(D)[BFS]

W(D)(even for approx)

[Folklore]

see weighted caseStream(# passes)

O(D) O(n)

[BFS]

W(R)for distance R=O(log n),

exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13]

Decremental(total update time)

O(mD) O(mn)

[BFS]

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

W(n)?

Page 110: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

110

UnWeighted, Undirected SSSP -- ConclusionModel Exact alg. Lower bound Approx + Rand Approx + Rand

Distributed(# rounds)

O(D)O(n)[Bellman-Ford]

W(D) W(n1/2+D) even for approx

O(n1/2+o(1)+D)

(1+e)-approx

[Henzinger et al. ‘15]

Stream(# passes)

O(n)[Bellman-Ford]

W(R) for distance R=O(log n), exact only

[Feigenbaum et al SODA’05] [Guruswami,Onak CCC’13[

O(no(1))

(1+e)-approxO(n1+o(1)) space

[Henzinger et al.’15]

Decremental(total update time)

O(m2) W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(m1+o(1)) (1+e)-approx

[Henzinger et al. FOCS’14]

?

?

? ?

?

?

Page 111: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

111

UnWeighted, UnDirected SSSP -- ConclusionModel Exact alg. Lower bound Approx + Rand

Distributed(# rounds)

O(n)[Bellman-Ford]

W(n1/2+D) even for approx

O(n1/2+o(1) +D)(1+e)-approx

O(n1/2D1/2+D)(1+e)-approx

Stream(# passes)

O(n)[Bellman-Ford]

W(log n) any approx (reachability)

[Guruswami,Onak CCC’13[r-pass n2/r space

[trivial]

Decremental(total update time)

O(mn)(1+e)-approx

O(m2)

W(mn)conditional, exact only

[Roditty, Zwick, ESA’04][Henzinger et al. STOC’15]

O(mn1+o(1)) (1+e)-approx

O(mn0.9) (1+e)-approx

?

?

?

?

?

?

Page 112: Shortest Paths in Decremental, Distributed and Streaming Settings 1 Danupon Nanongkai KTH Royal Institute of Technology BIRS, Banff, March 2015.

112

Thank you