Part II · trunk A · integer programming · branch · deep theory
You can optimize over a polytope in polynomial time exactly when you can find a violated inequality in polynomial time. Exponentially many constraints are fine.
needs 04, 08~2 h slides + 2½ h lablab: uv run co lab 09
09 · overview
Optimization and separation oracles, the Grötschel–Lovász–Schrijver equivalence, and why the ellipsoid method is the bridge.
The subtour LP, separation by minimum cut, and Stoer–Wagner.
Lazy constraints, cut callbacks, how good the bound is, and Concorde.
Words with a dotted underline are glossary terms: click one for its definition. G lists every term in the unit, N shows the notes. Optional extra: interactive figures, linked from the slides they support by a small ▸ chip; skip them freely.
Lab then: at 200 cities there are 8 × 10⁵⁹ subtour constraints. The LP bound needed 56, the optimal tour 70.
section 1
Two oracles for a polytope, and the fact that they are equally powerful.
09 · theorem
Given $c$: return $\arg\max\{c^\top x : x \in P\}$, or report $P = \emptyset$.
"Solve the problem for any objective."
Given $y$: either certify $y \in P$, or return an inequality $a^\top x \le \beta$ valid for $P$ with $a^\top y > \beta$.
"Find a violated constraint, if there is one."
A polytope with exponentially many facets can have a short separation oracle, one that searches its facets implicitly. For subtour constraints it is a minimum cut, and for matching's odd-set constraints a minimum odd cut.
For the theorem, $P$ must be "well-described": its facets have bounded encoding size $\varphi$, and the running time may be polynomial in $\varphi$ and $n$.
09 · theorem
For a family of well-described polyhedra, the optimization problem is solvable in polynomial time if and only if the separation problem is.
The ellipsoid method (unit 04) only ever asks "is this centre inside, and if not, which inequality fails?". A separation oracle answers exactly that, so the ellipsoid method runs, and with the objective added as a sliding objective it optimizes.
Flip the picture with the polar $P^\circ$: facets of $P$ become vertices of $P^\circ$, and vertices of $P$ become facets. "Find a violated facet of $P$" becomes "optimize over $P^\circ$", and the next slide shows it on a square.
details in the notes (N)
09 · theorem · example
Left: $P = [-1,1]^2$ and $y = (1.5, 0.5)$. Right: $P^\circ = \{a : |a_1| + |a_2| \le 1\}$. The facet $x_1 \le 1$ of $P$ is the vertex $(1, 0)$ of $P^\circ$.
| $P$ (square) | $P^\circ$ (diamond) |
|---|---|
| 4 facets $\pm x_1 \le 1$, $\pm x_2 \le 1$ | 4 vertices $(\pm1, 0)$, $(0, \pm1)$ |
| 4 vertices $(\pm1, \pm1)$ | 4 facets $\pm a_1 \pm a_2 \le 1$ |
Is $y = (1.5, 0.5)$ in $P$? Maximize $a^\top y = 1.5a_1 + 0.5a_2$ over $P^\circ$. The best vertex is $a = (1, 0)$, value $1.5$.
$1.5 > 1$, so $a^\top x \le 1$, i.e. $x_1 \le 1$, is valid for $P$ and violated by $y$. A cut, found by an optimization.
If the maximum had been $\le 1$, every facet of $P$ would hold at $y$, so $y \in P$.
09 · theorem
| result | via |
|---|---|
| Maximum-weight matching as an LP in polynomial time | odd-set inequalities (unit 06) separated by a minimum odd cut (Padberg & Rao 1982) |
| The first polynomial algorithm for submodular function minimization | separation over the base polytope by a greedy algorithm (unit 13) |
| Maximum stable set in perfect graphs | Lovász's theta function, an SDP, separated over the theta body (unit 25) |
| Subtour LP for the TSP in polynomial time | subtour constraints separated by a global minimum cut (this lab) |
| NP-hardness of separation for hard polytopes | the other direction, contrapositive |
Some of these (stable sets in perfect graphs, submodular minimization, for a long time) had no other known polynomial algorithm. The ellipsoid method was the only route.
section 2
The constraint family that started it all, and its minimum-cut oracle.
09 · subtours
Solid edges at 1, dashed at ½. Every degree is 2 and the graph is connected, yet the cut around $\{3,4,5\}$ weighs 1: a subtour constraint is violated.
Edge variables $x_e$ on the complete graph, the DFJ formulation (1954), with $\delta(S)$ the edges leaving $S$:
$$\begin{aligned}\min\ & \textstyle\sum_e c_e x_e \\ \text{s.t. } & \textstyle\sum_{e \in \delta(v)} x_e = 2 \quad \forall v \\ & \textstyle\sum_{e \in \delta(S)} x_e \ge 2 \quad \forall\, \emptyset \ne S \subsetneq V \\ & 0 \le x_e \le 1\end{aligned}$$The degree constraints alone allow subtours: several disjoint cycles. The subtour constraints say every vertex set must be entered and left. There are $2^{n-1}-1$ of them.
09 · subtours
$x^*$ violates some subtour constraint iff the global minimum cut of the support graph with edge weights $x^*$ has value below 2.
The constraint for $S$ is exactly "the cut $\delta(S)$ has weight $\ge 2$", so the most violated one is the lightest cut. It is a restatement, not a trick.
Integer points are easier: a 0/1 solution of the degree constraints is a union of cycles, and each cycle's vertex set has cut weight 0. The connected components check suffices (lab step 5).
$n - 1$ phases, $O(nm + n^2 \log n)$ in total. No flows needed.
why merging is safe: notes (N)
09 · subtours · example
$x = 1$ on the edges of triangles $\{0,1,2\}$ and $\{3,4,5\}$, 0 elsewhere. Every degree is 2.
Support graph components: $\{0,1,2\}$ and $\{3,4,5\}$. Two components, so both constraints $x(\delta(\{0,1,2\})) \ge 2$ and $x(\delta(\{3,4,5\})) \ge 2$ are violated, with left side 0.
In each triangle two edges at 1 and one at $\tfrac12$: $01 = 12 = 1$, $02 = \tfrac12$, and the same on $\{3,4,5\}$. Two bridges at $\tfrac12$: $03$ and $25$.
Degrees: vertex 0 has $1 + \tfrac12 + \tfrac12 = 2$, vertex 1 has $1 + 1 = 2$, and so on. All degree constraints hold, and the support graph is connected.
Minimum cut: $\{3,4,5\}$, weight $\tfrac12 + \tfrac12 = 1 < 2$. The constraint for $S = \{3,4,5\}$ is violated.
Weights $01 = 3$, $23 = 3$, $02 = 12 = 13 = 1$.
| phase | order (attachment when added) | cut of phase |
|---|---|---|
| 1 | 0, 1 (3), 2 (2), 3 (4) | $\{3\}$: 4 |
| 2 | 0, 1 (3), $\{2,3\}$ (3) | $\{2,3\}$: 3 |
| 3 | 0, $\{1,2,3\}$ (4) | $\{1,2,3\}$: 4 |
After each phase the last two are merged. The best phase cut, 3, is the global minimum: $\{0,1\}$ against $\{2,3\}$.
Why the fractional point needs a real min cut: components see one piece, and every degree is right. Only a cut computation finds the thin connection.
09 · subtours
| $n$ | constraints that exist | used by the LP | LP bound | optimum | MIP cuts | gap |
|---|---|---|---|---|---|---|
| 30 | 5.4 × 10⁸ | 6 | 480.5 | 482 | 5 | 0.31% |
| 80 | 6.0 × 10²³ | 16 | 725.0 | 726 | 24 | 0.14% |
| 120 | 6.7 × 10³⁵ | 39 | 813.0 | 819 | 52 | 0.73% |
| 200 | 8.0 × 10⁵⁹ | 56 | 1083.5 | 1091 | 70 | 0.69% |
Lab then, random Euclidean instances. The exact tour at $n = 200$ took 10 MIP solves and 46 s with HiGHS as the integer solver.
section 3
Lazy constraints, and how far the idea goes.
09 · practice
Every MIP solver can take constraints it doesn't see up front:
Gurobi: a callback with cbLazy and cbCut. SCIP: a constraint handler with check, enforce and separate methods. That is the same distinction.
Adding subtour constraints only as user cuts means the solver can accept an integer solution made of subtours, if no fractional node happened to trigger separation. Lazy constraints need enforcement on integer solutions, which is what lab step 5 does, clumsily.
09 · practice
For metric TSP the optimal tour is at most $\tfrac32$ times the subtour LP bound (Wolsey 1980; Shmoys & Williamson 1990), and instances with gap close to $\tfrac43$ exist. The 4/3 conjecture says that is the truth; it is open.
On random Euclidean instances the gap is tiny, under 1% in the lab.
Unit 11 computes the same bound a completely different way (the Held–Karp bound from 1-trees), and gets the same number.
Concorde: Applegate, Bixby, Chvátal & Cook. Branch-and-cut with subtour constraints, comb inequalities, and "local cuts" found by solving small projected subproblems.
It solved an 85 900-city instance from a chip-layout application (pla85900) to proven optimality in 2006, with about 136 CPU-years of computation.
09 · lab
uv run co test 09
uv run co then 09 # constraints used vs constraints that exist, LP bound vs optimum, up to 200 cities
09 · checkpoint
Grötschel, Lovász & Schrijver, ch. 6 (consulted).
Schrijver, Combinatorial Optimization, §5.10–5.11 and ch. 58.
Applegate, Bixby, Chvátal & Cook (2006), ch. 5–6.
Stoer & Wagner, JACM 44 (1997).
10 column generation, where the same idea applies to columns · 11 Lagrangian relaxation and the Held–Karp bound · 12 Benders, where constraints are generated from a subproblem's duals.