+ 0 B ASIC P ROPERTIES O F C UTS We are interested in finding - - PowerPoint PPT Presentation

0
SMART_READER_LITE
LIVE PREVIEW

+ 0 B ASIC P ROPERTIES O F C UTS We are interested in finding - - PowerPoint PPT Presentation

!"# $%& O UTLINE


slide-1
SLIDE 1

!"# $%&

slide-2
SLIDE 2

OUTLINE

Basic definitions Why needed? GomoryHu Construction Algorithm GomoryHu Construction Algorithm A Complete GH Tree Construction Example Proof Of Correctness Minimum KCut Problem Implementation

slide-3
SLIDE 3

' (

slide-4
SLIDE 4

CUT DEFINITION

Let G = (V,E) denote a graph and c(e) a weight

function on its edges.

A is a partition of the vertices V into two sets

S and T. S and T.

Any edge (u,v) ∈ E with u ∈ S and v ∈ T is said to

be % the cut and is a # %#.

# )$ * is the sum of weights of

the edges crossing the cut.

slide-5
SLIDE 5

UV CUT

A uv cut is a split of the nodes into two disjoint

sets U and V, such that u ∈ U, v ∈ V. +!

+!

Given a graph G = (V,E) and two terminals u,v ∈ V, find the minimum uv cut.

slide-6
SLIDE 6

FLOW DEFINITION

Given a directed graph G(V,E) in which every edge

(u,v) ∈ E has a #%,#, #","# capacity c(u,v).

We distinguish two vertices: a # and a & .

We distinguish two vertices: a # and a & .

A flow network is a real function f: V×V → with the

following properties for all nodes u and v:

1.

)$ : f(u,v) ≤ c(u,v)

2.

&#- $..#$: f(u,v) = f(v,u)

3.

("- #,: ,unless u=s or u=t

slide-7
SLIDE 7

MAXFLOW

The maximum flow problem is to find a feasible

flow through a singlesource, singlesink flow network that is maximum.

MaxFlow can be computed in polynomial time MaxFlow can be computed in polynomial time

(e.g. EdmondsKarp algorithm).

/(+ The maximum amount of flow is equal to the capacity

  • f the minimal cut.

Thus, the min st cut is also computed in polynomial

time.

slide-8
SLIDE 8

IMPORTANT PUBLICATIONS ON MAXFLOW MINCUT PROBLEMS

Ford and Fulkerson, Maximal Flow through a

network (1956).

Introduction of basic concepts of flow and cut. Max flow mincut theorem. flow mincut theorem.

Mayeda, Terminal and Branch Capacity Matrices

  • f a Communication Net (1960).

Multiterminal problem.

Chien, Synthesis of a Communication Net (1960).

Synthesis of multiterminal flow network.

slide-9
SLIDE 9

+ 0

slide-10
SLIDE 10

BASIC PROPERTIES OF CUTS

We are interested in finding maximal flow/minimal

cut values between all pairs of nodes in a graph G = (V,E), where n = |V|. Any pair of nodes can serve as the source and the sink.

How many mincut computations are needed? You would think But in fact, n1 computations are enough!!

why? ( )

slide-11
SLIDE 11

FLOW EQUIVALENT GRAPHS

Two graphs G = (V, E) and G’ = (V, E’) are said to

be flow equivalent iff for each pair of vertices u,v ∈ V, the minimum uv cut (maximal uv flow) in G is the same as in G’.

It turns out that there always exist a G’ which is

a tree (Gomory Hu Tree)!!

Notice that the n1 edges of the tree correspond

to the n1 distinct mincuts in G.

slide-12
SLIDE 12

GOMORYHU (GH) TREE

R.E. GOMORY AND T.C. HU, MULTITERMINAL NETWORK FLOWS (1961).

Given a graph G = (V,E) with a capacity function

c, a cuttree T = (V,F) obtained from G is a tree having the same set of vertices V and an edge set F with a capacity function c’ verifying the F with a capacity function c’ verifying the following properties:

12

3,"# 4- ##: for any pair of vertices s and t, fs,t in G is equal to fs,t in T , i.e., the smallest capacity of the edges on the path between s and t in T.

52

))#$: a minimum cut Cs,t in T is also a minimum cut in G.

slide-13
SLIDE 13
slide-14
SLIDE 14

OUTLINE

The algorithm maintains a partition of V, (S1, S2,

…, St ) and a spanning tree T on the vertex set { S1, S2, …, St }.

Let w’ be the function assigning weights to the Let w’ be the function assigning weights to the

edges of T.

On

each iteration, T satisfies the following invariant :

For any edge (Si, Sj ) in T, there are vertices a and b in Si and Sj respectively such that w’ (Si, Sj ) = f(a,b) and the cut defined by edge (Si, Sj ) is a minimum ab cut in G.

slide-15
SLIDE 15

INITIAL STEP

The algorithm starts with a trivial partition V. Proceeds in n1 iterations.

b c a b c d e f 16 7 5 5 5 8 9 7 : ; :

Initial Partition = (V={a,b,c,d,e,f})

slide-16
SLIDE 16

ITERATION (1)

Select a set Si in the partition such that |Si|≥ 2. Let u and v be two distinct vertices of Si.

Select d and e

a c d e 1; < 8 9 7 8

Partition3 = ({a}, {b}, {c,d,e}, {f})

19 f 9 < 11 1; b = ; 16

Select d and e

1: 5

slide-17
SLIDE 17

ITERATION (2)

Root the current tree at Si and consider the

subtrees rooted at the children of Si.

Collapse each of the subtrees into a single vertex

to obtain graph G’ (G’ also contains all vertices of to obtain graph G’ (G’ also contains all vertices of Si).

c d e < 8 9 7 8

Collapse all other sub trees to supernodes

5

slide-18
SLIDE 18

ITERATION (3)

Find a minimum uv cut in G’. Let (A, B) the partition of the vertices of G’

defining the cut, with u ∈ A, v ∈ B.

c d e < 8 9 7 8

Compute min de cut

5

slide-19
SLIDE 19

ITERATION (4)

Compute Si

u = Si∩ A and Si v = Si∩ B.

Refine the current partition by replacing Si with

the two sets Si

u and Si v.

The new tree has an edge (S u, S v) with weight The new tree has an edge (Si

u, Si v) with weight

equal to the weight of the cut.

c d e < 8 9 7 8

Create new GomoryHu edge

5 17

slide-20
SLIDE 20

ITERATION (5)

How are the other nodes aranged at the tree after

the splitting?

Consider a subtree T’ incident at S in T. Assume Consider a subtree T’ incident at Si in T. Assume

that the collapsed node corresponding to T’ lies in A.

We connect T’ by an edge with Si

u.

The weight of the edge is the same as the weight

  • f the edge connecting T’ to Si.

All the other edges retain their weights.

slide-21
SLIDE 21

ITERATION (6)

c

Attach the previous sub tree to the cut that it

c e < 8 9 7 8

tree to the cut that it belongs

5 17 1; 19 1:

slide-22
SLIDE 22

TERMINATION

The algorithm terminates when the partition

consists of singleton vertices.

Thus, after exactly n1 iterations!

slide-23
SLIDE 23

/

slide-24
SLIDE 24

> c 16 7 5 8 7

INITIALIZATION

a d e f 5 5 9 7 : ; :

Initial Partition = (V={a,b,c,d,e,f})

slide-25
SLIDE 25

> c 7

ITERATION 1

a d e f 16 5 5 5 8 9 7 : ; :

Select b and f

slide-26
SLIDE 26

c 7

ITERATION 1

a > d e f 16 5 5 8 9 7 :

Partition1 = ({a,b}, {c,d,e,f})

= ; 19 7 5 11

slide-27
SLIDE 27

c 7

Select a,b

ITERATION 2

a > d e f 16 5 5 8 9 7 :

Partition1 = ({a,b}, {c,d,e,f})

= ; 19 7 5 11

slide-28
SLIDE 28

c 8 7

ITERATION 2

a d e f 1; 5 5 8 9 7 :

Partition2 = ({a}, {b}, {c,d,e,f})

19 7 5 11 1; > = ; 16

slide-29
SLIDE 29

c

Select c and f

ITERATION 3

a d e f 1; 5 5 8 9 7 :

Partition2 = ({a}, {b}, {c,d,e,f})

19 7 5 11 1; > = ; 16

slide-30
SLIDE 30

c < 8

ITERATION 3

a d e 1; < 9 7 8

Partition3 = ({a}, {b}, {c,d,e}, {f})

19 f 9 < 11 1; > = ; 16 1: 5

slide-31
SLIDE 31

c < 8 7 > = 16

Select d and e

ITERATION 4

a d e 1; 9 7 8

Partition3 = ({a}, {b}, {c,d,e}, {f})

19 f 9 < 11 1; > = ; 16 1: 5

slide-32
SLIDE 32

c < 7 8

ITERATION 4

a d 1; 17 9

Partition4 = ({a}, {b}, {c, e}, {d}, {f})

19 f 9 < 11 1; > = ; 16 1: e 7 8 5 17

slide-33
SLIDE 33

Select c and e

c < 7 8

ITERATION 5

a d 1; 17 9

Partition4 = ({a}, {b}, {c, e}, {d}, {f})

19 f 9 < 11 1; > = ; 16 1: e 7 8 5 17

slide-34
SLIDE 34

1; 17 1; > = 16 c 17 18 18

ITERATION 5

a d 1; 17 9

Partition5 = ({a}, {b}, {c}, {e}, {d}, {f})

19 f 9 < 11 1; > = ; 16 1: e < 7 8 5 8 17

slide-35
SLIDE 35

FINAL GH TREE

Final GomoryHu Tree

1; 19 1: 17 18

slide-36
SLIDE 36

( (

slide-37
SLIDE 37

BASIC LEMMAS (1)

Let f(u,v) denote the weight of a minimum ,

in G.

For u, v, w ∈ V, the following inequality holds:

f(u,v) ≥ min { f(u,w), f(w,v) }

Generalization:

For u, v, w1, w2, .., wr ∈ V: f(u,v) ≥ min { f(u, w1), f(w1, w2), …, f(wr, v) }

slide-38
SLIDE 38

BASIC LEMMAS (2)

Let (A, A’) be a minimum st cut, s ∈ A. Choose any two vertices x,y ∈ A. Obtain graph G’ by "")% all vertices of A’ to a

single vertex vA’.

A’

The weight of an edge (a, vA’) is defined to be the sum

  • f the weights of (a,b), where b ∈ A’.

A minimum xy cut in G’ defines a minimum xy cut

in G !!

Thus, condensing A’ to a single node does not affect

the value of a minimum cut from x to y.

slide-39
SLIDE 39

PROOF

! ( ): For any edge (Si, Sj ) in T, there are vertices a and b

in Si and Sj respectively such that

1.

w’ (Si, Sj ) = f(a,b)

1.

w’ (Si, Sj ) = f(a,b)

2.

The cut defined by edge (Si, Sj ) is a minimum ab cut in G.

The first property satisfies the first GH condition

(equivalent flow tree).

The second property satisfies the second GH

condition (cut property).

slide-40
SLIDE 40

'

slide-41
SLIDE 41

DEFINITION

Let G= (V,E) an undirected weighted graph. A set of edges of E whose removal leaves k

connected components is called a kcut.

The & problem asks for a

minimum weight kcut.

slide-42
SLIDE 42

ALGORITHM

#) 1

Compute a GH tree for graph G. #) 5

#) 5

Output the union of the lightest k1 cuts of the n 1 cuts associated with edges of T in G. Let C be this union.

slide-43
SLIDE 43

ANALYSIS

#.. :

Let S be the union of cuts in G associated with l edges of T. Then, the removal of S from G leaves a graph with at least l+1 components. a graph with at least l+1 components.

Hence, the union of k1 cuts picked from T will

form a kcut in G.

We

will prove that the previous algorithm

  • btains an approximation ratio of 2 – 2/k.
slide-44
SLIDE 44

OTHER INTERESTING PROPERTIES OF GH TREES (1)

If the GH tree for a graph G contains all n1

distinct weights, then G can have only one minimum weight cut! We can improve the performance of the GH

We can improve the performance of the GH

algorithm by picking vertices for each set which after the mincut computation will partition the set in equally sized subsets.

slide-45
SLIDE 45

OTHER INTERESTING PROPERTIES OF GH TREES (2)

Let G be a network having an edge e = [i, j ] with

parametric capacity c(e) = λ.

Let GHα be a cuttree obtained when c(e) = α. Let Pi,j

α be the path in GHα between i and j.

For λ > α it is sufficient to compute |Pi,j

α|1

minimum cuts in Gλ in order to obtain a cuttree GHλ .

slide-46
SLIDE 46

For theorists

slide-47
SLIDE 47

IMPLEMENTATION IN C++ (1)

To solve the undirected maxflow problem, we

used linear programming (GNU LP API).

Faster algorithms could be used! Based on the above maxflow algorithm, we

implemented an algorithm for the min st cut problem (maxflow and reachability in residue graph).

slide-48
SLIDE 48

IMPLEMENTATION IN C++ (2)

We implemented the GH algorithm using the

above functions, as well as some basic STL classes (e.g. set and map). A quite fast method for computing the collapsed

A quite fast method for computing the collapsed

graph was used.

The final GH tree is represented as a collection of

weighted edges

slide-49
SLIDE 49

IMPLEMENTATION IN C++ (3)

The

current implementation is

  • nly

console based.

A graphical version is on the road. Damn it, you

linux library dependencies!! linux library dependencies!!

slide-50
SLIDE 50

( ?