Part II · trunk A · integer programming · branch

06

Total unimodularity: when integrality is free

The structural reason assignment, transportation and flow problems need no branching, and the smallest structure that ends it.

needs 03illuminates 14, 15~1½ h slides + 2 h lab

06 · overview

The route

1 · the theorem

TU matrices, Hoffman–Kruskal, and why Cramer's rule is the whole proof in one direction.

2 · recognizing it

Interval, network and bipartite incidence matrices. Ghouila-Houri. What preserves TU.

3 · where it ends

Odd cycles, half-integrality, Edmonds' matching polytope, and the families beyond TU.

getting around

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.

section 1

The theorem

An algebraic condition on $A$ that makes every vertex integral.

06 · theorem

Totally unimodular matrices

definition

$A$ is totally unimodular (TU) if every square submatrix has determinant in $\{-1, 0, 1\}$.

In particular every entry is $-1$, $0$ or $1$.

Hoffman & Kruskal, 1956

For integral $A$: $\{x \ge 0 : Ax \le b\}$ is an integral polyhedron for every integral $b$ if and only if $A$ is TU.

why "if", in words

A vertex is the solution of a square system $Bx = b'$. Cramer's rule writes each coordinate as an integer divided by $\det B$. TU makes that determinant $\pm 1$, so nothing fractional can appear.

full proof in the notes (N)

"Only if" is harder: from a submatrix with determinant $\pm 2$ or more, construct an integral $b$ whose polyhedron has a fractional vertex.

06 · theorem · example

TU, checked by hand

four time slots, three shifts

Shift A covers slots 1–3, shift B slots 2–3, shift C slots 3–4. Rows are slots, columns shifts:

$$A = \begin{pmatrix}1&0&0\\1&1&0\\1&1&1\\0&0&1\end{pmatrix}$$
sizesubmatricesdeterminants
1×112seven 1s, five 0s
2×218ten 1s, eight 0s
3×34three 1s, one 0

All 34 in $\{-1,0,1\}$: TU. Any staffing LP over it has integral vertices.

the triangle

Rows are vertices, columns the edges $01, 12, 02$:

$$T = \begin{pmatrix}1&0&1\\1&1&0\\0&1&1\end{pmatrix}$$

Its nine entries and nine 2×2 minors are fine, but the whole matrix has $\det T = 2$. One bad submatrix is enough: not TU.

and the assignment LP

Costs $\begin{pmatrix}1&3\\2&5\end{pmatrix}$, no integrality asked. Its 4×4 matrix is a bipartite incidence matrix, all 69 minors in $\{-1,0,1\}$. HiGHS returns $x = \begin{pmatrix}0&1\\1&0\end{pmatrix}$, cost $3 + 2 = 5$: already an assignment.

06 · theorem

Consequences you already rely on

problemmatrixso
assignment, transportationbipartite incidencethe LP relaxation is integral; the Hungarian algorithm is a primal–dual LP method (unit 15)
max-flow, min-cost flowdirected incidence (network)integer capacities give an integer optimal flow (unit 14)
shortest path as an LPdirected incidencethe LP optimum is a path, not a fractional mix
interval schedulingconsecutive onesmaximum-weight independent interval sets solve as LPs
bipartite vertex coverbipartite incidence (transpose)König: max matching = min vertex cover

In every row, the combinatorial algorithm you'd normally use is a fast special case of solving an integral LP, and the last row is a min–max theorem.

section 2

Recognizing TU

In practice you spot the structure; you don't compute determinants.

06 · recognizing

Three families

bipartite incidence

Rows are the vertices, split into two sides; each column has one 1 on each side.

Proof by Ghouila-Houri: sign left-side rows +1 and right-side rows −1. Every column sums to 0 or ±1.

network matrices

Directed incidence: each column has one +1 and one −1. Tutte's network matrices generalize these (paths in a tree).

Ghouila-Houri: sign every row +1, and each column sums to 0 or ±1 over any subset.

interval matrices

Each row (or column) has its ones consecutive.

Ghouila-Houri: order the chosen rows by column index and alternate signs +, −, +, … Every interval then sums to 0 or ±1.

Ghouila-Houri, 1962

$A$ is TU if and only if every subset $R$ of rows has a signing $\sigma \in \{\pm1\}^R$ with $\sum_{r \in R} \sigma_r a_r \in \{-1, 0, 1\}^n$.

06 · recognizing · example

A Ghouila-Houri signing, worked

the shift matrix: signings exist

Rows $r_1 = (1,0,0)$, $r_2 = (1,1,0)$, $r_3 = (1,1,1)$, $r_4 = (0,0,1)$. Each column's ones are consecutive, so alternate signs down the rows:

chosen rowssignssum
all four$+,-,+,-$$(1, 0, 0)$✓
$r_2, r_3$$+,-$$(0, 0, -1)$✓
$r_1, r_3, r_4$$+,-,+$$(0, -1, 0)$✓

Every one of the 15 row subsets has a good signing: TU, the same verdict as the 34 determinants, from a test that is easy to see.

the triangle: no signing exists

Take all three vertex rows. Each edge column has a 1 in exactly two rows, so for its sum to be 0 those two rows need opposite signs.

So adjacent vertices get opposite signs: a 2-colouring. A triangle has none. Some column sums to $\pm 2$ whatever you choose.

Try $+,-,+$: edge $02$ sums to $1 + 1 = 2$. ✗

That is the whole reason "incidence matrix TU" and "graph bipartite" are the same thing: a good signing of all rows is a 2-colouring.

06 · recognizing

Testing by brute force, and why nobody does

Lab then, part 3, your step-1 test on interval matrices:

sizesquare submatricesseconds
6×69230.003
8×812 8690.061
10×10184 7551.43

An $n\times n$ matrix has $\binom{2n}{n} - 1$ square submatrices, which grows like $4^n$.

in practice

You recognize the structure while modelling: "this is a flow with side constraints", "these rows are intervals". If extra side constraints break TU, expect to branch, and look for a different formulation that keeps the TU core.

section 3

Where it ends

One odd cycle is enough.

06 · limits

The odd cycle

½ ½ ½

Max matching LP on a triangle: value $\tfrac32$ at the vertex $x = (\tfrac12, \tfrac12, \tfrac12)$; the best integer matching has value 1.

The incidence matrix of the triangle has determinant 2:

$$\det T = \det\begin{pmatrix}1&0&1\\1&1&0\\0&1&1\end{pmatrix} = 2$$
theorem

A graph's incidence matrix is TU if and only if the graph is bipartite. The obstruction is an odd cycle: the incidence matrix of an odd cycle has determinant $\pm 2$.

Lab step 3's test checks "TU iff bipartite" on 30 random graphs, and step 5 builds the odd cycle.

06 · limits

Half-integrality, and Edmonds' fix

Balinski, 1965

Every vertex of the fractional matching polytope $\{x \ge 0 : \sum_{e \ni v} x_e \le 1\}$ is half-integral: entries in $\{0, \tfrac12, 1\}$, and the $\tfrac12$ entries form vertex-disjoint odd cycles.

Lab then, part 2: on 197 random non-bipartite graphs the LP vertex was fractional 42 times, and the only fractional value ever seen was 0.5. On 203 bipartite graphs it was fractional 0 times.

Edmonds, 1965

Add the odd-set inequalities: for every vertex set $S$ with $|S|$ odd, $\displaystyle\sum_{e \subseteq S} x_e \le \frac{|S|-1}{2}$.

The result is exactly the matching polytope: conv of matchings, integral for every graph.

There are exponentially many such inequalities, and by unit 05 no polynomial extended formulation exists (Rothvoss). The way through is separation (unit 09), or Edmonds' blossom algorithm (unit 15).

06 · limits · example

Odd-set inequalities, on two cycles

graphmatching LPvalue+ odd set $S = V$value
triangle$(\tfrac12, \tfrac12, \tfrac12)$1.5$(1, 0, 0)$1
5-cycleall five $= \tfrac12$2.5$(0, 1, 0, 1, 0)$2

Maximize the number of matched edges. The degree constraints alone allow every edge at one half. One extra constraint per cycle, "at most $\frac{|S|-1}{2}$ edges inside $S$", and the LP optimum becomes a real matching.

why the half point is cut off

Triangle: $S$ = all 3 vertices. A matching inside 3 vertices has at most 1 edge, so $x_{01} + x_{12} + x_{02} \le 1$. The half point sums to $\tfrac32$: violated.

5-cycle: 5 vertices hold at most 2 disjoint edges, so the five values sum to at most 2. The half point sums to $\tfrac52$: violated.

An even cycle needs no such constraint: its all-halves point is the average of two perfect matchings, not a vertex.

06 · limits

Beyond TU

balanced matrices

0/1 matrices with no odd submatrix cycle. Set packing, covering and partitioning over them have integral LPs (Berge; Fulkerson, Hoffman & Oppenheim).

perfect matrices

Clique constraints of perfect graphs: the stable-set LP with clique constraints is integral (Chvátal; Lovász's perfect graph theorem).

TDI systems

Total dual integrality (Edmonds & Giles 1977): the dual has integral optima for every integral $c$. Then the primal polyhedron is integral, whatever $A$ is.

The general pattern for the rest of the course: integral polyhedra are the polynomial islands. Each has a combinatorial algorithm, and a min–max theorem that is LP duality in disguise.

06 · lab

Lab 06 — what you build

about 2 hours · uv run co lab 06 · exact integers
  1. TU by definition, with exact determinants.
  2. Ghouila-Houri, returning a real witness when it fails.
  3. Incidence and interval matrices, where the test checks TU iff bipartite.
  4. Assignment as an LP with no integrality, and an integral answer.
  5. The odd cycle, and the half-integral vertex it forces.
uv run co test 06
uv run co then 06     # assignment LP vs Hungarian · matching LP fractionality · TU test cost

06 · checkpoint

Done when

checkpoint
  • All five lab steps are ✓.
  • Given a constraint matrix, you can decide whether to expect integral LP optima, and when the answer is no, construct the odd cycle that breaks it.
  • You can explain why a flow LP with integer capacities has an integer optimal flow.

Reading

Wolsey, ch. 3 (§3.1–3.3), or Conforti, Cornuéjols & Zambelli, §4.1–4.3.
Schrijver, Combinatorial Optimization vol. A, ch. 5 (consulted).

Next

07 branch and bound, for when the LP is not integral · 14 network flows and 15 matching, the algorithms this unit explains.