Tutorial: Multiway Cut Problem
1. Problem description:
Given:
- an undirected graph G=(V,E)
- a nonnegative cost function c(u,v)
- a set of terminals S ⊆ V : {s1, s2, ... sk}
Ask for:
- a multiway cut C ⊆ E such that the removal of all edges in C from E disconnects each terminal from all the other terminals.
- cost of C: ∑e∈ C c(e) should be minimized.
2. Example:
3. NP-hardness of the problem.
The problem of finding a minimum weight multiway cut is NP-hard for any fixed k ≥ 3.
When k=2, it is the minimum s-t cut problem which can be solved in polynomial time using Maximum Flow algorithm.
4. A 2-2/k approximation algorithm:
- For each i = 1, 2, ..., k, compute a minimum weight isolating cut for si , say Ci .
- C = C1 ∪ C2 ∪ ... ∪ Ck - Cj in which Cj is the cut with the maximum weight.
- Output C.
What's isolating cut?
- An isolating cut for si is a set of edges whose removal disconnects si from the rest of the terminals.
This can be done by identifying the terminals in S-{s
i} into a single node, and finding a minimum cut separating this node from s
i, this takes one max-flow computation.
Notice that C contains k-1 sets of isolating cut and the removal of C from the graph G disconnects every pair of terminals, so C is a multiway cut.
Analysis of the approximation ratio: 2-2/k
- Let A be the set of edges in the optimal solution.
- Remove all edges in A from the graph:
- create k connected components, no more, no less;
- every terminal si is in a different connected component;
- let Ai ⊆ A be the isolating cut for si.
- Every edge appears in exactly two sets, so:
∑i=1k c(Ai) = 2c(A) = 2 • OPT
- Ci is the minimum isolating cut for si, so:
c(Ci) ≤ c(Ai)
- The isolating cut with the heaviest cost Cj is discarded, so:
c(Cj) ≥ 1/k ∑ c(Ci)
c(C) ≤ (1-1/k) ∑i=1k c(Ci) ≤ (1-1/k) ∑i=1k c(Ai) ≤ (2-2/k) OPT
An example showing this ratio is tight:
The blue cut is the approximation solution, c(C) = 6-3ε
The red cut is the OPT solution, c(A) = 4
5. An 3/2-1/k approximation algorithm:
This is an interesting relaxation of linear program by Gruia Calinescu, et al.
- Minimize ∑(u,v)∈ E c(u,v)d(u,v) subject to:
- d(u,v) = 1/2 ∑i=1k | xui - xvi | (u,v) ∈ E
- xv ∈ Δk ∀ v ∈ V
- xt = et ∀ t ∈ S
Explainations:
- Δk denotes the k-1 simplex, a k-1 dimensional convex polytope in Rk defined by:
{x ∈ Rk | x ≥ 0 and ∑i=1k xi = 1} .
- For x ∈ Rk , ||x|| is its L1 norm, ||x|| = ∑i=1k ||xi|| .
- et denotes the unit vector given by (ej)j = 1, (ej)i = 0 for all i¬= j.
- Vertices of G are mapped to the points in Δk, terminals are mapped to simplex corners.
- Every vertex v is associated with a k-dimensional vector xv, with each component between 0 and 1. For k = 7: xv = (xv1, xv2, xv3, xv4, xv5, xv6, xv7)
- An integral solution maps each vertex of G to a vertex of the simplex, respectively. Each edge (u,v) has length 0 or 1. Edges of length 1 form a multiway cut.Optimal integral solution corresponds to an optimal multiway cut.
- Terminals have forms:
x3 = (0,0,1,0,0,0,0); x7 = (0,0,0,0,0,0,1).
- Non-terminals:
- Integer solution:
- xvt = 1 iff v and t in the same partition.
- xvt = 0 iff v and t in the different partitions.
- Exactly one coordinate is 1, all others are 0.
- Fractional solution:
- 0 ≤ xvt ≤ 1
- ∑t=1k xvt = 1
- xv = (0, 0.2, 0, 0, 0.4, 0, 0.4)
- The distance between two vertices is defined as:
d(u,v)=1/2 ∑t=1k | xut - xvt |
- d(u,v)=0 ⇒ u and v in the same partition;
- d(u,v)=1 ⇒ u and v in different partitions;e.g. d(s1,s2) = 1/2(|1-0|+|0-1|+|0-0|) = 1 in the following figure.
- The fractional solution will give us 0 ≤ d(u,v) ≤ 1 , we need some technique to decide how to partition those vertices.
e.g. d(u,s1) = 1/2(|0.5-1|+|0.5-0|+|0-0|) = 0.5 in the following figure.
Example of G with 3 terminals {s1, s2, s3} and 3 non-terminals {u, v, w}:
In this example, the optimal fractional solution has cost 7.5:
- 6 edges with weight 2, 3 edges with weight 1, all edges has distance 1/2, so,
- ∑(u,v)∈ E c(u,v)d(u,v) = (2*1/2) * 6 + (1*1/2) * 3 = 7.5 .
How to partition node u, v and w?
1.We need normalization before present the algorithm:
- Let A be a feasible solution to the LP.
- It's possible to construct a graph G=(V,E) such that:
- The value of A is at most A with same cost.
- For all edges (u,v)∈ E the vectors xu and xv differ at most 2 coordinates.
- This can be done by dividing edges with adding dummy vertex.
- The transformation requires at most k|E| subdivisions.
2.We need some definitions before present the algorithm:
- x = optimal, normalized solution of LP.
- Et = {(u,v) ∈ E | xut ¬= xvt}
- edges between vertices that differ in coordinate t.
- each edge (u,v) appears in two of these sets.
- Wt = ∑e∈ Ei c(e)d(e)
- cost of all edges in Et, weighted by the distances.
- each edge with d(e) > 0 is counted twice.
- B(t,ρ) = {v ∈ V | xvt ≥ ρ}, for ρ ∈ [0,1]
- set of all vertices that are with small distance to terminal t.
- v is "close" to i ⇔ xvt ≥ ρ
3.The algorithm:
- Compute the optimal, normalized fractional solution x of LP;
- Relabel the terminals so that Wk is the largest among all Wi;
- Pick random σ in two permutations: {(1,2,...,k-1,k), (k-1,k-2,...,1,k)};
- Pick random ρ∈[0,1];
- For i = 1 to k-1 do Vσ(i)=B(i,ρ)-∪j<iVσ(j);
- Vk = V - ∪i<k Vi;
- Return C = {(u,v) ∈ E | u∈ Vi, v∈ Vj, i ¬= j} .
Analysis of the approximation ratio: 3/2 - 1/k
1. Intuition:
- The probability of an edge being cut = the probability of ρ falling in between the interval (xui,xvi) = the distance of these two interval.
Every color represents a choice of ρ, only when the color line falls into interval (u,v), the edge (u,v) is cut by partition v into S1, partition u into S3.
This gives us probability d(e).
With the same ρ but different σ:
- In the left graph, set 1 is partitioned first, u and v are both picked, edge (u,v) is hidden to set 2.
- In the right graph, set 2 is partitioned first, with the same ρ, u is partitioned into set 2, v is partitioned into set 1. Edge (u,v) is made a cut.
- So σ increase the probability of an edge being cut.
- This gives us probability d(e)/2.
The summation of previous d(e) and d(e)/2 gives us the approximation ratio 3/2. And since the heaviest cut is discarded, we get 3/2-1/k.
2. Formal analysis:
(1) If e ∈ E - Ek , Prob[e∈ C]≤ 1.5• d(e)
- Let e = (u,v), let i and j be the coordinates in which xu and xv differ.
- There are two cases: the intervals [xui,xvi] and [xvj,xuj] either overlap or disjoint, but having the same length d(e):
- vertices u and v can end up in one of 3 sets, Vi , Vj , Vk. (other than these 3 sets make no difference)
- if ρ ∈ [0,1]-(α ∪ β) , u and v end up in the same set, ⇒ edge e will not be in the cut.
- P1 = Pr[ρ ∈ (α ∪ β)] = |α| + |β|
- special case:
- ρ ∈ α and σ(j) < σ(i)
- both u and v will end up in Sj
- P2 = Pr[(ρ ∈ α) and (σ(j) < σ(i))] = |α|/2
- Pr[e ∈ C] = P1 - P2 = |β| + |α|/2 ≤ 1.5d(e)
(2) If e ∈ Ek , Prob[e∈ C]≤ d(e)
- Let e=(u,v) and i and k be the coordinates in which xu and xv differ.
- σ(i) < σ(k) because set k is always the last set in the two permutations;
- u and v will end up in different sets if ρ falls between interval xu and xv:
Pr[(u,v) ∈ C] = |xui - xvi| = d(e)
(3) From the analysis of (1) and (2):
E[c(C)] = ∑e∈ E c(e)Pr[e∈ C]
= ∑e∈ E-Ek c(e)Pr[e∈ C] + ∑e∈ Ek c(e)Pr[e∈ C]
≤ 1.5 ∑e∈ E-Ek c(e)d(e) + ∑e∈ Ek c(e)d(e)
= 1.5 ∑e∈ E c(e)d(e) - 0.5 ∑e∈ Ek c(e)d(e)
≤ (1.5-1/k) • OPTf
Discussion:
Referrence:
[1] Vijay V. Vazirani
Approximation Aglorithms, Springer, 2001.
[2] E. Dahlhaus, et al.
The Complexity of Multiway Cuts, Extended abstract, 1983.
[3] Gruia Calinescu, et al.
An Improved Approximation Algorithm for Multiway Cut, Journal of Computer and System Sciences, 60(3):564-574, 2000.