-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Source: MinimumMultiwayCut
Target: ILP
Motivation: Enables exact solving of the minimum multiway cut on any backend ILP solver; serves as the canonical exact formulation for testing and validation.
Reference: Chopra & Owen (1996), Mathematical Programming 73, pp. 7–30; Călinescu, Karloff & Rabani (2000), J. Comput. Syst. Sci. 60(3); Illinois lecture notes §7
Reduction Algorithm
Notation:
- Source: graph
$G = (V, E, w)$ with$n = |V|$ vertices,$m = |E|$ edges, edge weights $w_e \in \mathbb{R}{>0}$, and $k = |T|$ terminal vertices $T = {t_0, t_1, \ldots, t{k-1}} \subseteq V$. - Target: ILP with
$kn + m$ binary variables.
Variable mapping:
Introduce two families of binary ILP variables (flattened into a single vector):
-
$y_{iv} \in {0,1}$ for each$i \in {0,\ldots,k-1}$ and$v \in V$ , at index$i \cdot n + v$ : equals$1$ if vertex$v$ is assigned to the component of terminal$t_i$ . -
$x_e \in {0,1}$ for each edge$e \in E$ , at index$kn + e_{\text{idx}}$ : equals$1$ if edge$e$ is in the cut.
Bounds (fixing terminals):
-
$y_{i,t_i} = 1$ for each$i$ (terminal$t_i$ is fixed to its own component); implemented as bounds$[1, 1]$ . -
$y_{j,t_i} = 0$ for all$j \neq i$ (terminal$t_i$ cannot belong to another component); implemented as bounds$[0, 0]$ . - All other
$y_{iv}$ and$x_e$ : binary bounds$[0, 1]$ .
Constraints:
-
Partition constraint (equality,
$n$ constraints): each vertex belongs to exactly one component:
$$\sum_{i=0}^{k-1} y_{iv} = 1 \quad \forall v \in V$$ -
Edge-cut lower bounds (inequality,
$2km$ constraints): if the endpoints of edge$e = (u, v)$ are in different components, then$x_e = 1$ :
$$x_e \geq y_{iu} - y_{iv} \quad \text{and} \quad x_e \geq y_{iv} - y_{iu} \quad \forall e = (u,v) \in E,\ i \in {0,\ldots,k-1}$$
Objective: Minimize total cut weight:
Solution extraction: A solution to the ILP yields
Size Overhead
| Target metric (code name) | Polynomial (using symbols above) |
|---|---|
num_vars |
|
num_constraints |
Validation Method
- Compare ILP optimal value against brute-force multiway cut on small instances (e.g.,
$n \leq 6$ ,$k = 3$ ). - Cross-check against PAAL library implementation: https://paal.mimuw.edu.pl/docs/multiway_cut.html
- Verify that the partition induced by $y_{iv}^$ matches the cut edges $x_e^$: for every cut edge
$e=(u,v)$ in the solution,$u$ and$v$ must be in different components.
Example
Source instance (same as in model issue #184):
-
$n = 5$ vertices$V = {0,1,2,3,4}$ ,$k = 3$ terminals$T = {0, 2, 4}$ ,$m = 6$ edges:
| Edge index | ||
|---|---|---|
| 0 | (0, 1) | 2 |
| 1 | (1, 2) | 3 |
| 2 | (2, 3) | 1 |
| 3 | (3, 4) | 2 |
| 4 | (0, 4) | 4 |
| 5 | (1, 3) | 5 |
ILP instance:
Variable layout:
-
$y_{0,v}$ : variables 0–4 (component 0, one per vertex); fixed:$y_{0,0}=1$ ,$y_{0,2}=0$ ,$y_{0,4}=0$ -
$y_{1,v}$ : variables 5–9 (component 1); fixed:$y_{1,0}=0$ ,$y_{1,2}=1$ ,$y_{1,4}=0$ -
$y_{2,v}$ : variables 10–14 (component 2); fixed:$y_{2,0}=0$ ,$y_{2,2}=0$ ,$y_{2,4}=1$ -
$x_e$ : variables 15–20 (edge cut indicators)
Objective: minimize
Optimal ILP solution:
Corresponding partition: