FAST ALGORITHMS FOR SURFACE EMBEDDED GRAPHS VIA HOMOLOGY › ~kyle.fox › slides ›...

Preview:

Citation preview

FAST ALGORITHMS FOR SURFACE EMBEDDED GRAPHS

VIA HOMOLOGY The Final Exam of

Kyle J. Fox

Doctoral committee: Jeff Erickson, Chair Chandra Chekuri Derek Hoiem David Eppstein, University of California, Irvine

Graph Algorithms

• Major target for algorithms research

• Provide natural abstractions for practical problems

2

Not Efficient

• Many problems are NP-hard

• Many polynomial time algorithms are quadratic or worse

3

Planarity• A natural assumption for many problem domains

• Speeds up computation

• Polynomial time → near-linear • NP-hard → polynomial time

4

Beyond Planarity• Many planar graph algorithms generalize

• Bounded genus surface graphs

• Minor free graphs

• Generalizations are sparse and have small well-balanced separators

• But that’s often not enough!

5

Surface Graphs• Drawn on 2-manifolds with boundary

• Vertices map to points, edges to internally disjoint curves

6

Flows and Cuts

• Network flow algorithms for planar graphs do not generalize easily

• First results for max flows/min cuts on surfaces in 2009 [Chambers, Erickson, and Nayyeri STOC/SoCG ’09]

• Algorithms either have high dependency on g or require very complicated subroutines

7

Thesis: Homology Helps• Many algorithms for surface embedded graphs can

be improved by using homology

• Homology was the key tool in the Chambers et al. flow/cut papers

• Homology characterizes curves by whether their difference bounds a weighted sum of faces

• Intuitively, how certain cycles or flows travel around features of the surface

8

The Dissertation

• Algorithms for combinatorial optimization problems related to maximum flows and minimum cuts

• Assume graphs with n vertices and O(n) edges on orientable surfaces of genus g = O(n)

• All algorithms use results in homology theory

9

Results1. A gO(g)n log log n time algorithm for global

minimum cut [Erickson, F, and Nayyeri SODA ’12]

2. Algorithms for shortest non-trivial cycles tailored for undirected and directed graphs [F SODA ’13]

3. A 2O(g)n² time algorithm for counting minimum s,t-cuts [Chambers, F, and Nayyeri SoCG ’13]

4. Preliminary work on computing maximum s,t-flows [Erickson and F ‘13]

10

Results1. A gO(g)n log log n time algorithm for global

minimum cut [Erickson, F, and Nayyeri SODA ’12]

2. Algorithms for shortest non-trivial cycles tailored for undirected and directed graphs [F SODA ’13]

3. A 2O(g)n² time algorithm for counting minimum s,t-cuts [Chambers, F, and Nayyeri SoCG ’13]

4. Preliminary work on computing maximum s,t-flows [Erickson and F ‘13]

11

Global Minimum Cut• Remove smallest weight set of edges to separate

graph into non-empty components

12

• gO(g)n log log n time algorithm matches best result for planar graphs when g = O(1) [Łącki and Sankowski ’11]

Dual Graph

u*

v*

f* g*f g

u

v

• vertices ⇄ faces • edges ⇄ edges • faces ⇄ vertices

13

Separating Subgraphs• Find a minimum weight set of cycles in the dual

graph that separate the faces

14

• Reduce problem to two cases

1. some minimum weight subgraph bounds a disk 2. all minimum weight subgraphs decomposable

into topologically non-trivial cycles

Results1. A gO(g)n log log n time algorithm for global

minimum cut [Erickson, F, and Nayyeri SODA ’12]

2. Algorithms for shortest non-trivial cycles tailored for undirected and directed graphs [F SODA ’13]

3. A 2O(g)n² time algorithm for counting minimum s,t-cuts [Chambers, F, and Nayyeri SoCG ’13]

4. Preliminary work on computing maximum s,t-flows [Erickson and F ‘13]

15

Non-trivial Cycles• Want short cycles that are topologically non-trivial

• Particularly non-contractible or non-separating

16

Contractible &

Separating

Non-contractible &

Separating

Non-contractible &

Non-separating

Non-trivial Running TimesWhen Directed? Running Time Citation

Before Undirected gO(g)n log log n [Italiano et al. ’11]

17

Non-trivial Running TimesWhen Directed? Running Time Citation

Before Undirected gO(g)n log log n [Italiano et al. ’11]

Now Undirected 2O(g)n log log n [F ’13]

17

Non-trivial Running TimesWhen Directed? Running Time Citation

Before Undirected gO(g)n log log n [Italiano et al. ’11]

Now Undirected 2O(g)n log log n [F ’13]

Before Directed

Non-separating: O(g² n log n) Non-contractible: O(gO(g) n log n)

[Erickson ’11]

17

Non-trivial Running TimesWhen Directed? Running Time Citation

Before Undirected gO(g)n log log n [Italiano et al. ’11]

Now Undirected 2O(g)n log log n [F ’13]

Before Directed

Non-separating: O(g² n log n) Non-contractible: O(gO(g) n log n)

[Erickson ’11]

Now Directed Non-contractible: O(g³ n log n) [F ’13]

17

Covering Spaces• Spaces that map down to the input

• Non-trivial cycles gain structure in the right cover

18

… …

Results1. A gO(g)n log log n time algorithm for global

minimum cut [Erickson, F, and Nayyeri SODA ’12]

2. Algorithms for shortest non-trivial cycles tailored for undirected and directed graphs [F SODA ’13]

3. A 2O(g)n² time algorithm for counting minimum s,t-cuts [Chambers, F, and Nayyeri SoCG ’13]

4. Preliminary work on computing maximum s,t-flows [Erickson and F ‘13]

19

Counting Cuts• Input gives vertices s and t

• An s,t-cut is a subset of vertices containing s but not t

• Want to count s,t-cuts that minimize weight of edges leaving cut

20

Counting Cuts Example

st

21

Counting Cuts Example

st

st

21

Counting Cuts Example

st

st

st

21

Counting Cuts Example

st

st

st

st

21

Counting Cuts Results• 2O(g)n² time algorithm for counting minimum s,t-cuts

matches the best results for planar graphs when g = O(1) [Bezáková and Friedlander ’12]

• Count forward t,s-cuts in a directed acyclic graph

• Edges leaving forward t,s-cuts are dual to directed cycles in a particular cohomology class

• Afterward, sample minimum cuts in O(n log n) time per sample

22

Results1. A gO(g)n log log n time algorithm for global

minimum cut [Erickson, F, and Nayyeri SODA ’12]

2. Algorithms for shortest non-trivial cycles tailored for undirected and directed graphs [F SODA ’13]

3. A 2O(g)n² time algorithm for counting minimum s,t-cuts [Chambers, F, and Nayyeri SoCG ’13]

4. Preliminary work on computing maximum s,t-flows [Erickson and F ‘13]

23

Maximum Flow• Classic non-trivial polynomial time algorithm • Planar case considered since the seminal maximum

flow/minimum cut paper [Ford and Fulkerson ’56]

24

Figure 2From Harris and Ross [1955]: Schematic diagram of the railway network of the Western So-viet Union and Eastern European countries, with a maximum flow of value 163,000 tons fromRussia to Eastern Europe, and a cut of capacity 163,000 tons indicated as ‘The bottleneck’.

The max-flow min-cut theorem

In the RAND Report of 19 November 1954, Ford and Fulkerson [1954] gave (next to definingthe maximum flow problem and suggesting the simplex method for it) the max-flow min-cut theorem for undirected graphs, saying that the maximum flow value is equal to theminimum capacity of a cut separating source and terminal. Their proof is not constructive,but for planar graphs, with source and sink on the outer boundary, they give a polynomial-time, constructive method. In a report of 26 May 1955, Robacker [1955a] showed that themax-flow min-cut theorem can be derived also from the vertex-disjoint version of Menger’stheorem.

As for the directed case, Ford and Fulkerson [1955] observed that the max-flow min-cuttheorem holds also for directed graphs. Dantzig and Fulkerson [1955] showed, by extendingthe results of Dantzig [1951a] on integer solutions for the transportation problem to the

25

[Harris and Ross ’55]

Flow in the Plane

• General sparse graphs: O(n² / log n) time [Orlin ’13]

• For undirected graphs: O(n log log n) time [Italiano et al. ’11]

• For directed graphs: O(n log n) time [Borradaile and Klein ’09]

25

Flow in Surfaces• For integer capacities summing to C:

O(g8n log²n log²C) [Chambers, Erickson, and Nayyeri ’09]

• For arbitrary real capacities: gO(g)n3/2 [Chambers, Erickson, and Nayyeri ’09]

• Both algorithms are very complicated and probably outperformed by more general quadratic time algorithms

• Is there a clean O(gO(1) n log n) time algorithm?

26

A New Algorithm• A true generalization of Borradaile and Klein’s

algorithm

• Uses duality between minimum cost flow problems in the primal and dual graphs

• Provably runs in strongly polynomial time

• May actually run in O(gO(1) n log n) time

27

Chains and Circulations• Each (oriented) edge uv has two darts u→v and

v→u

• A [0,1,2]-chain assigns real values to the vertices, oriented edges, or faces.

• Flow is a synonym for 1-chain

• A flow f is a circulation if for each vertex v,∑uv f (uv) - ∑vu f (vw) = 0

28

Capacities and Feasibility• For flow f and edge uv, we say

f (u→v) = f (uv) and f (v→u) = -f (uv)

• A capacity function c assigns real values to the darts

• Flow f is feasible if for each dart u→v, we havef (u→v) ≤ c(u→v)

• f induces residual capacity function cf, where cf (u→v) = c(u→v) - f (u→v)

29

Maximum s,t-flow• An s,t-flow has ∑uv f (uv) - ∑vu f (vu) = 0 for each

vertex v except s and t

• Value of an s,t-flow is ∑s→v f (s→v)

• Given capacity function c, want to find a feasible s,t-flow of maximum value

• Value equal to minimum capacity of darts leaving any s,t-cut [Ford and Fulkerson ’56]

30

Borradaile and Klein

• Algorithm of Borradaile and Klein removes residual clockwise cycles, and then sends flow along leftmost residual s,t-paths

• But what does leftmost mean in surfaces with genus?

• Erickson [’10] offers a different interpretation

31

Borradaile and Klein(according to Erickson)

A planar graph with capacity function c has a feasible s,t-flow matching the value of s,t-flow f if and only if there are no negative length dual cycles wrt cf.

32

[Erickson ‘10]

s

t

C o

s*

t*

• Negative length cycles are over-saturated s,t-cuts[Venkatesan ‘83]

Parametric Shortest Paths• Compute a dual shortest path tree from any dual

vertex o incident to t using c for the dart lengths

• Continuously increase flow from s to t along any path, changing residual capacities

33

[Erickson ‘10]

Parametric Shortest Paths• Shortest path tree pivots at critical moments…

34

[Erickson ‘10]

Parametric Shortest Paths• Shortest path tree pivots at critical moments…

34

[Erickson ‘10]

Parametric Shortest Paths• Shortest path tree pivots at critical moments…

34

[Erickson ‘10]

Parametric Shortest Paths• Shortest path tree pivots at critical moments…

34

[Erickson ‘10]

Parametric Shortest Paths• Shortest path tree pivots at critical moments…

34

[Erickson ‘10]

Parametric Shortest Paths• Shortest path tree pivots at critical moments…

34

[Erickson ‘10]

Parametric Shortest Paths• Shortest path tree pivots at critical moments…

34

[Erickson ‘10]

• …until a directed cycle is formed

Parametric Shortest Paths• The directed cycle is dual to a minimum s,t-cut

• Each pivot can be performed in O(log n) time

• O(n) pivots (not obvious), so O(n log n) overall

35

[Erickson ‘10]

… on Surfaces• The flow you send from s to t affects how the

shortest path tree changes

• A flow f may induce negative cycles in the dual residual graph even if there are feasible flows of the same value [Chambers, Erickson, and Nayyeri ’09]

• And it may take Ω(n²) pivots to reach a negative cycle [Erickson ’10]

36

Boundary Circulations• The boundary of a 2-chain α is the flow ∂α where ∂α(uv) = α(right(uv)) - α(left(uv))

• Boundary circulations are the boundaries of 2-chains

37

72 5

Homology• Two flows f and f’ are homologous if f - f’ is a

boundary circulation

• Forms an equivalence relation between flows

38

Coflows and Capacities• Flows, circulations, etc. are called coflows,

cocirculations, etc. in the dual

• Let Θ be a coflow and c be a capacity function. Define c’ on the edges so that - c’(uv) = c(u→v) if Θ(uv) ≥ 0 - c’(uv) = -c(v→u) otherwise

• The capacity of Θ wrt c is the dot product ⟨Θ, c’⟩

39

Homological Max Flow/Min Cut

• Extends a theorem of Chambers, Erickson, and Nayyeri [’09]

40

Theorem: Let c be a capacity function and Θ be a coflow. The maximum cost ⟨Φ, Θ⟩ of any feasible circulation Φ is equal to the minimum capacity of any coflow cohomologous to Θ.

Min Capacity Coflows

• Fix a circulation Φ and capacity function c. If coflow Θ is minimum capacity for its cohomology class wrt c then Θ is minimum capacity wrt cΦ

41

Back to the Plane• Find a minimum cost coflow

• Continuously increase flow from s to t along any path, changing residual capacities

42

1

11

1

1

12

23

3

4

57

Back to the Plane• Minimum cost cocirculation pivots at critical

moments…

43

1

11

1

1

12

23

3

4

57

11

1

12

3

214

5

66

1

• …by pushing coflow around s,t-cuts

Optimal Circulations and Coflows

• Fix a coflow Θ and capacity function c. Circulation Φ maximizes ⟨Φ, Θ⟩ and Θ is minimum capacity for its cohomology class wrt c if and only if Φ(u→v) = c(u→v) for every dart u→v such that Θ(u→v) > 0

• Φ saturates the darts carrying coflow

44

Generalizations• Extend parametric minimum capacity coflows to

arbitrary surfaces and cohomology classes

• Minimum cost coflow is resilient to circulations; can push flow from s to t along any path

• Maintain feasible flow saturating darts with positive coflow

45

1 2

s

t

coflow

Augmentations• D: edges carrying non-zero coflow

• Cannot send primal flow through edges in D if we want to keep darts saturated

• Push flow through G \ D until there is an s,t-cut S with saturated outgoing darts C in G \ D

46

1 2

s

t 1 2

s

t

outgoing darts C in G \ Dcoflow edges D

Pivots• Some edges from C + D bound s,t-cut S in G

• Push coflow around coboundary of S until an edge goes empty

47

1 2

s

t

1

3

s

t

coboundary of s,t-cut S in G

Pivots• Pushed coflow around a coboundary so the new

coflow is in the same cohomology class

• Every dart carrying positive coflow is saturated, so coflow is still minimum cost

48

1 2

s

t

1

3

s

t

Termination

49

• Process ends when no edge can go empty

• We’ve saturated a minimum s,t-cut in G and computed a maximum s,t-flow

3

s

t

1

3

s

t

1

saturated s,t-cut

Efficient Pivots• Initial coflow runs along a shortest path tree from o

• o is the only “source” so edges with dual coflow stay connected

• Both D and G \ D have a simple structure, so O(g log n + g²) time per pivot

50

s

t

1 1

11 3

3

7o

Time AnalysisTheorem: Let N be the number of pivots. Our algorithm computes a maximum s,t-flow inO(n log n + gN(g + log n)) time.

51

• Ideally, N = O(gO(1)n), even for arbitrary cohomology classes

• Right now, can prove N = O(n²)

Winding Numbers• For s,t-path π, let f π be the flow that sends 1 unit on

each dart of π

• The winding number of coflow Θ wrt π is ⟨f π, Θ⟩

52

1 2

s

t

winding number = 2

More Winding

53

1 2

s

t

1

3

s

t

• The winding number of a fixed path π wrt each minimum cost coflow Θ increases by at least 1 with each pivot

winding number = 2 winding number = 3

Means Less Winding

54

1 2

s

t

• Each iteration’s augmenting paths avoid edges used for the minimum cost coflow

• The winding number of each augmenting path π wrt the original minimum cost coflow Θ₀ decreases by at least 1 with each pivot

winding number = 0 winding number = -1

1 2

s

t

Bounding Pivots

55

s

t

1 1

11 3

3

7o

• In the shortest path coflow Θ₀, Θ₀(u→v) ≤ O(n)

• So lowest winding number possible for any augmenting path is -O(n²)

• First augmenting paths have winding number 0 wrt Θ₀

Bounding Pivots

56

• So after O(n²) pivots, there can never be another augmenting path avoiding edges with coflow

Theorem: Our algorithm computes a maximum s,t-flow in O(gn²(g + log n)) time.

Next Steps in Flows

• Prove O(gO(1)n) bound on number of pivots

• If it applies to arbitrary coflows, there are likely applications to minimum cost flow, multiple-source multiple-sink maximum flow, …

57

Results1. A gO(g)n log log n time algorithm for global

minimum cut [Erickson, F, and Nayyeri SODA ’12]

2. Algorithms for shortest non-trivial cycles tailored for undirected and directed graphs [F SODA ’13]

3. A 2O(g)n² time algorithm for counting minimum s,t-cuts [Chambers, F, and Nayyeri SoCG ’13]

4. Preliminary work on computing maximum s,t-flows [Erickson and F ‘13]

58

What Comes Next?

• Postdoc at ICERM at Brown University participating in the Spring 2014 program Network Science and Graph Algorithms

59

Thank you!

Recommended