Learn
Lesson · Networks: Flows, Paths and Assignments · Integer corners

Total Unimodularity and Integer Corners

Every optimum so far has come out in whole units without anyone asking. The reason is a property of the matrix: every square submatrix of a node-arc incidence matrix has determinant zero, one or minus one, so Cramer's rule divides by one and a basic solution of whole data is whole. Drop the directions and the property fails — on an odd cycle the determinant is two and the optimal corner is genuinely halves.

totally unimodular: EVERY square submatrix has determinant 0, +1 or −1 a node-arc incidence matrix is totally unimodular; its own determinant is 0 basic solution x_B = B⁻¹ b = adj(B) b / det(B), and det(B) = ±1 so integer b and TU A ⟹ every basic feasible solution is an integer point undirected incidence of an ODD cycle: determinant 2, and the corner is halves an even cycle is bipartite; its determinant is 0 and its corners stay whole
The definition, the consequence, and the smallest matrix that fails it

Core ideas

What this lesson establishes

This is the lesson the path's ordering exists for. Three ideas, and the third is the one that stops it becoming a slogan.

1

Total unimodularity is a condition on every submatrix, not on the matrix

It is not enough that the determinant of the whole matrix be ±1, and it is not about the entries being 0 and ±1 either. Every square submatrix of every size must have determinant in {0, +1, −1}. On a four-by-five incidence matrix that is 120 submatrices up to size three, and the lab sweeps all of them and reports zero failures.

2

Cramer's rule is the whole argument

A basic solution solves B x_B = b for a square non-singular submatrix B of the constraint matrix. Cramer's rule gives each component as a ratio of determinants with det B underneath. If the data are whole, the numerator is whole; if det B = ±1, the division is exact. The corners are then lattice points, and a linear programme attains its optimum at a corner.

3

Direction is what makes it work

The +1 and −1 in each column are not decoration. Replace them with two +1s — the undirected incidence matrix — and the property fails on any cycle of odd length: the triangle's determinant is 2. The lab then solves a packing programme on that matrix and returns x = (1/2, 1/2, 1/2) worth 3/2, which no integer point reaches. Integrality is earned, and this is what earns it.

The material

Why a network programme returns whole numbers, and when it stops

The definition, then the theorem and its two-line proof, then the matrix that fails it and the halves it produces.

Definition · Totally unimodular

A matrix A is totally unimodular when every square submatrix of A — of every size, formed by choosing any rows and any equally many columns — has determinant 0, +1 or −1.

Every entry of such a matrix is itself a one-by-one submatrix, so every entry is 0, +1 or −1. The converse fails, and the failure is the interesting part of this lesson.

Theorem · Integrality of network corners

Let A be totally unimodular and b an integer vector. Then every basic feasible solution of Ax = b, x ≥ 0 is an integer vector.

The node-arc incidence matrix N of any directed network is totally unimodular. Hence every corner of the minimum-cost flow programme is whole, on whole supplies and whole capacities, with no integrality constraint written anywhere.

A basic solution takes a square non-singular submatrix B of the columns and sets x_B = B⁻¹b, with every other variable zero. By Cramer's rule the k-th component of x_B is det(Bₖ) / det(B), where Bₖ is B with its k-th column replaced by b.

B is a square submatrix of a totally unimodular matrix and is non-singular, so det(B) is +1 or −1. Bₖ has integer entries throughout — the columns of B are integer and b is integer — so det(Bₖ) is an integer. An integer divided by ±1 is an integer, and every component of x_B is therefore whole. The non-basic components are zero.

Nothing in this depends on the objective, so it holds at the optimum in particular; and since a bounded linear programme attains its optimum at a corner, the optimum is an integer point.

□

That the incidence matrix satisfies the condition is checkable rather than memorable, and the lab checks it. On the five-arc network from the minimum-cost flow lesson, N is four by five and the sweep runs every submatrix of size one, two and three — 20, then 60, then 40, which is 120 in all — and reports every determinant in {0, ±1}.

N for s>a s>b a>b a>t b>t s 1 1 0 0 0 a -1 0 1 1 0 b 0 -1 -1 0 1 t 0 0 0 -1 -1 rows 1,2,3 and columns 1,3,4 det 1 rows 1,2 and columns 1,2 det 1 rows 1,2,3 and columns 1,2,3 det 0 the whole matrix is singular: every column holds one +1 and one -1, so the four rows sum to the zero row sweep to size 3: 20 + 60 + 40 = 120 submatrices, 0 failures

The same drawing, undirected, and the corner that is halves

Now take the triangle on three vertices and build the undirected incidence matrix instead: +1 at both ends of each edge rather than +1 and −1. Nothing about the picture has changed. The matrix is three by three, and its determinant is 2.

undirected incidence of the triangle directed, same drawing 1 0 1 1 0 -1 1 1 0 -1 1 0 0 1 1 0 -1 1 det = 2 sweep: unimodular exactly one submatrix out of 19 fails, and it is the whole matrix max x1 + x2 + x3 subject to that matrix times x ≤ 1, x ≥ 0 corner x = (1/2, 1/2, 1/2) value 3/2 no integer point reaches 3/2; the best whole answer is 1
Example · The halves are real, and exact

The lab runs the same exact simplex on the same kind of programme and returns 1/2 three times, printed as a fraction. There is no rounding anywhere and nothing has gone wrong: (1/2, 1/2, 1/2) is a genuine corner of that polyhedron, and it is strictly better than any lattice point inside it.

This is the gap that the whole of Integer Programming is about, arriving here as a two-line consequence of one determinant. It is also the reason this course can be solved by the simplex method and that one cannot.

Example · An even cycle keeps its whole corners

Do the same on the four-cycle. The undirected incidence matrix has determinant 0, the sweep finds nothing outside {0, ±1}, and the packing programme's corner is (1, 0, 1, 0) worth 2 — whole.

So it is not undirectedness as such that breaks integrality; it is the odd cycle. An even cycle is bipartite, and bipartite graphs are where the undirected incidence matrix stays totally unimodular. That observation is what makes the assignment problem behave, and it comes back on the matching lesson.

Two warnings about the direction of the theorem. It says total unimodularity is sufficient for integer corners, not necessary: plenty of programmes have integral polyhedra for other reasons. And it says nothing whatever about a programme whose matrix is not totally unimodular — such a programme may still happen to have a whole optimum on some instance, and that is luck rather than structure.

Interactive

Why the corners are integers

Every square submatrix of a node–arc incidence matrix has determinant 0, +1 or −1 — and an odd cycle does not

Every square submatrix, and what its determinant costsdet B = ±1 makes B⁻¹b whole; det B = 2 makes it halves
a determinant in {0, +1, −1}a determinant outside itthe rows and columns you picked

Method

Deciding whether a programme's corners have to be whole

Build the matrix, check the condition, and then say which of the two conclusions you are entitled to.

1

Write the constraint matrix out, not the drawing

Total unimodularity is a property of a matrix. Two different matrices can describe the same picture — the directed and undirected incidence matrices of the triangle are the standard example — and one of them is totally unimodular and the other is not.

2

Check the entries first, because it is free

Every entry must already be 0, +1 or −1, since each is a one-by-one submatrix. An entry of 2 anywhere settles the question immediately and you have spent no effort.

3

Sweep the small submatrices, and name any failure

Every two-by-two, then every three-by-three. A failure is not a verdict of “probably not”: it is a specific submatrix with a specific determinant, and quoting it is the difference between a check and an impression.

4

If it passes, state the conclusion with its hypothesis attached

Integer right-hand side gives integer corners. On fractional supplies you get fractional corners from a totally unimodular matrix too, and the theorem never claimed otherwise.

5

If it fails, look for the fractional corner rather than assuming one

Failure removes the guarantee; it does not prove a fractional optimum exists. The odd cycle really does produce one, and finding it is what turns the failed check into something you have learned.

The condition, the argument, and its limits

Score 0 / 0

One drawing, two matrices, two answers

The triangle throughout. The only thing that changes is whether each column gets a plus and a minus or two pluses, and every number below is read off the sweep and the exact simplex.

DIRECTED 1>2, 2>3, 3>1 e1 e2 e3 1 1 0 -1 2 -1 1 0 3 0 -1 1 sweep to size 3: 9 + 9 + 1 = 19 submatrices failures: none TOTALLY UNIMODULAR det of the whole matrix: 0 (the rows sum to zero) UNDIRECTED the same three edges, +1 at both ends e1 e2 e3 1 1 0 1 2 1 1 0 3 0 1 1 sweep to size 3: 19 submatrices failures: 1, and it is rows 1,2,3 by columns 1,2,3 det = 2 NOT totally unimodular max x1 + x2 + x3 s.t. A x ≤ 1, x ≥ 0 x = (1/2, 1/2, 1/2) value 3/2 best integer point value 1 FOUR-CYCLE undirected, 1-2-3-4-1 det = 0, sweep clean, corner x = (1, 0, 1, 0) value 2 whole

The pair of three-by-three matrices differs in three minus signs and in nothing else, and that is the whole of the difference between a problem the simplex method settles and a problem that needs a search. Worth staring at for a minute.

For a rehearsal, take the four-arc network from the minimum-cost flow lesson and use the lab's row and column pickers to find a three-by-three submatrix with determinant −1, then one with determinant 0. Both exist; predicting which is which before you press the button is the exercise.

The harder rehearsal: build the undirected incidence matrix of the five-cycle and sweep it. It fails, for the same reason the triangle does, and the half-integral corner is worth 5/2 against a best whole answer of 2. Then do the six-cycle and watch the failure disappear.

Common mistakes

1
Checking only the whole matrix's determinant“Totally” is doing the work in the name. The directed incidence matrix of any network has determinant zero, because its rows sum to zero, and it is still totally unimodular; the undirected triangle's determinant is 2 and one failing submatrix is enough to lose everything. The condition is over all square submatrices of all sizes.
2
Concluding that integrality is a property of the problemIt is a property of the matrix you wrote. The same triangle gives a totally unimodular matrix read one way and a matrix with a fractional corner read the other. Change the formulation — add a side constraint, share a capacity between two commodities — and the structure can be gone while the picture still looks like a network.
3
Reading fractional corners as a numerical problem(1/2, 1/2, 1/2) is not a rounding artefact and it will not go away with better arithmetic; it is where the optimum of that programme is. The labs carry exact fractions throughout for this reason, and a half printed as a half is the lesson rather than a display detail.

Check your understanding

✓
Finish when you can state the theorem with its hypothesis, run the argument from Cramer's rule, and produce the counterexample.

You should be able to define total unimodularity over all square submatrices, build both incidence matrices of a small graph, explain where det(B) = ±1 enters the proof, say why an integer right-hand side is part of the hypothesis, and exhibit the odd cycle's half-integral corner.

Note: This is the result the ordering of the whole path was arranged around, and it is why networks and general whole-number problems belong to different courses: a network is a linear programme whose corners are already lattice points, and Integer Programming exists for the linear programmes whose corners are not. “The Assignment Problem” takes the sharpest special case of the network side — every supply and every demand equal to one — and solves it by a method that never writes a tableau at all.

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.