Slide 1

Slide 1 text

Minimum Cut ֲࢸݢʢKuoE0ʣ [email protected] KuoE0.ch

Slide 2

Slide 2 text

Cut

Slide 3

Slide 3 text

cut (undirected)

Slide 4

Slide 4 text

1 3 5 6 7 8 9 2 4 undirected graph A partition of the vertices of a graph into two disjoint subsets

Slide 5

Slide 5 text

1 3 5 6 7 8 9 2 4 undirected graph A partition of the vertices of a graph into two disjoint subsets

Slide 6

Slide 6 text

1 3 5 6 7 8 9 2 4 undirected graph A partition of the vertices of a graph into two disjoint subsets

Slide 7

Slide 7 text

1 2 8 5 4 7 9 3 6 A partition of the vertices of a graph into two disjoint subsets undirected graph

Slide 8

Slide 8 text

1 2 8 5 4 7 9 3 6 Cut-set of the cut is the set of edges whose end points are in different subsets. undirected graph

Slide 9

Slide 9 text

1 2 8 5 4 7 9 3 6 Cut-set of the cut is the set of edges whose end points are in different subsets. Cut-set undirected graph

Slide 10

Slide 10 text

1 2 8 5 4 7 9 3 6 weight = number of edges or sum of weight on edges weight is 7 undirected graph

Slide 11

Slide 11 text

cut (directed)

Slide 12

Slide 12 text

1 3 5 6 7 8 9 2 4 directed graph A partition of the vertices of a graph into two disjoint subsets

Slide 13

Slide 13 text

1 3 5 6 7 8 9 2 4 directed graph A partition of the vertices of a graph into two disjoint subsets

Slide 14

Slide 14 text

1 3 5 6 7 8 9 2 4 directed graph A partition of the vertices of a graph into two disjoint subsets

Slide 15

Slide 15 text

1 2 8 5 4 7 9 3 6 directed graph A partition of the vertices of a graph into two disjoint subsets

Slide 16

Slide 16 text

1 2 8 5 4 7 9 3 6 directed graph Cut-set of the cut is the set of edges whose end points are in different subsets.

Slide 17

Slide 17 text

1 2 8 5 4 7 9 3 6 directed graph Cut-set of the cut is the set of edges whose end points are in different subsets.

Slide 18

Slide 18 text

1 2 8 5 4 7 9 3 6 Cut-set directed graph Cut-set of the cut is the set of edges whose end points are in different subsets.

Slide 19

Slide 19 text

1 2 8 5 4 7 9 3 6 weight is 5⇢ or 2⇠ directed graph weight = number of edges or sum of weight on edges

Slide 20

Slide 20 text

s-t cut 1. one side is source 2. another side is sink 3. cut-set only consists of edges going from source’s side to sink’s side

Slide 21

Slide 21 text

1 3 5 6 7 8 9 2 4 flow network Source Sink Other

Slide 22

Slide 22 text

1 3 5 6 7 8 9 2 4 flow network Source Sink

Slide 23

Slide 23 text

1 3 5 6 7 8 9 2 4 flow network Source Sink

Slide 24

Slide 24 text

1 2 8 5 4 7 9 3 6 flow network cut-set only consists of edges going from source’s side to sink’s side

Slide 25

Slide 25 text

1 2 8 5 4 7 9 3 6 weight is 6 flow network cut-set only consists of edges going from source’s side to sink’s side

Slide 26

Slide 26 text

Max-Flow Min-Cut Theorem

Slide 27

Slide 27 text

Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 total flow = 6, flow on cut = 3 + 3 = 6

Slide 28

Slide 28 text

Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 total flow = 6, flow on cut = 3 + 3 = 6

Slide 29

Slide 29 text

Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 total flow = 6, flow on cut = 3 + 4 - 1 = 6

Slide 30

Slide 30 text

Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 total flow = 6, flow on cut = 3 + 4 - 1 = 6

Slide 31

Slide 31 text

Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 total flow = 6, flow on cut = 4 + 2= 6

Slide 32

Slide 32 text

Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 total flow = 6, flow on cut = 4 + 2= 6

Slide 33

Slide 33 text

Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 total flow = 6, flow on cut = 4 + 2= 6

Slide 34

Slide 34 text

Observation 1 The network flow sent across any cut is equal to the amount reaching sink. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 total flow = 6, flow on cut = 4 + 2= 6

Slide 35

Slide 35 text

Observation 2 Then the value of the flow is at most the capacity of any cut. 1 3 2 4 5 6 3 8 4 2 4 4 3 It’s trivial!

Slide 36

Slide 36 text

Observation 2 Then the value of the flow is at most the capacity of any cut. 1 3 2 4 5 6 3 8 4 2 4 4 3 It’s trivial!

Slide 37

Slide 37 text

Observation 3 Let f be a flow, and let (S,T) be an s-t cut whose capacity equals the value of f. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 f is the maximum flow (S,T) is the minimum cut

Slide 38

Slide 38 text

Observation 3 Let f be a flow, and let (S,T) be an s-t cut whose capacity equals the value of f. 1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 f is the maximum flow (S,T) is the minimum cut

Slide 39

Slide 39 text

Max-Flow EQUAL Min-Cut

Slide 40

Slide 40 text

Example

Slide 41

Slide 41 text

1 3 2 4 5 6 3 8 4 2 4 4 3

Slide 42

Slide 42 text

1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 Maximum Flow = 6

Slide 43

Slide 43 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 Residual Network

Slide 44

Slide 44 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 Minimum Cut = 6

Slide 45

Slide 45 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 Minimum Cut = 6

Slide 46

Slide 46 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 Minimum Cut = 6

Slide 47

Slide 47 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 Minimum Cut = 6

Slide 48

Slide 48 text

The minimum capacity limit the maximum flow!

Slide 49

Slide 49 text

find a s-t cut

Slide 50

Slide 50 text

1 3 2 4 5 6 3/3 3/8 4/4 2/2 1/4 4/4 2/3 Maximum Flow = 6

Slide 51

Slide 51 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 Travel on Residual Network

Slide 52

Slide 52 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 start from source

Slide 53

Slide 53 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 don’t travel through full edge

Slide 54

Slide 54 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 don’t travel through full edge

Slide 55

Slide 55 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 no residual edge

Slide 56

Slide 56 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 no residual edge

Slide 57

Slide 57 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 s-t cut

Slide 58

Slide 58 text

1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3 s-t cut

Slide 59

Slide 59 text

result of starting from sink 1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3

Slide 60

Slide 60 text

result of starting from sink 1 3 2 4 5 6 0/3 5/8 0/4 0/2 3/4 0/4 1/3

Slide 61

Slide 61 text

Minimum cut is non-unique!

Slide 62

Slide 62 text

time complexity: based on max-flow algorithm Ford-Fulkerson algorithm O(EF) Edmonds-Karp algorithm O(VE2) Dinic algorithm O(V2E)

Slide 63

Slide 63 text

Stoer Wagner only for undirected graph time complexity: O(N3) or O(N2log2N)

Slide 64

Slide 64 text

UVa 10480 - Sabotage Practice Now

Slide 65

Slide 65 text

Problem List UVa 10480 UVa 10989 POJ 1815 POJ 2914 POJ 3084 POJ 3308 POJ 3469

Slide 66

Slide 66 text

Reference • http://www.flickr.com/photos/dgjones/335788038/ • http://www.flickr.com/photos/njsouthall/3181945005/ • http://www.csie.ntnu.edu.tw/~u91029/Cut.html • http://en.wikipedia.org/wiki/Cut_(graph_theory) • http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem • http://www.cs.princeton.edu/courses/archive/spr04/cos226/lectures/ maxflow.4up.pdf • http://www.cnblogs.com/scau20110726/archive/ 2012/11/27/2791523.html

Slide 67

Slide 67 text

Thank You for Your Listening.