Lecture 3
Lecture 3
Prof. J. G. Carlsson
Definition
A matrix A is said to be totally unimodular (TU) if each
sub-determinant of A is either 0, 1, or −1
I It turns out that an integer matrix A is totally unimodular if and
only if the set {x : Ax ≤ b , x ≥ 0} has integer corners for all
integer vectors b
Proof ( =⇒ )
I If A ∈ Rm1 ×n and B ∈ Rm2 ×n are TU, is A
necessarily TU?
B
Facts about determinants
I If A ∈ Rm1 ×n and B ∈ Rm2 ×n are TU, is A
necessarily TU?
B
I No way! Use e.g. A = 1 −1 and B = 1 1
I The set x : A 2
x≤ has (3/2, −1/2) as a corner
B 1
Corollaries
I A is TU ⇐⇒ AT is TU
I A is TU ⇐⇒ (A, I ) is TU
I A is TU ⇐⇒ the corners of {x : Ax ≤ b, x ≥ 0} are always
integers if b is an integer
I A is TU =⇒ the corners of {x : Ax = b, x ≥ 0} are always
integers if b is an integer
I The dual problem of
maximize cT x s.t. Ax ≤ b, x ≥ 0 ,
x
which is
minimize bT y s.t. AT y ≥ c ,
y
aj = (0, . . . , 0, 1, . . . , 1, 0, . . . , 0)
I The LP is
minimize cT x s.t.
x
Ax ≥ d
x ≥ 0
1 1 1
.. .. ..
. . ··· .
1 1 1
1
A= ··· 1
1 ··· 1
..
.
1 ··· 1
Example
s 1 2 7 t
2
6
2 5
c d
2
Maximum flow
I Let xij denote the amount of flow that we send across edge (i, j);
our problem is
X
maximize xsi s.t.
(s,i)∈E
xij ≤ wij
X X
xij = xji ∀i ∈
/ {s, t}
(i,j)∈E (j,i)∈E
xij ≥ 0 ∀ (i, j) ∈ E
I Let xij denote the amount of flow that we send across edge (i, j);
our problem is
X
minimize cij xij s.t.
(i,j)∈E
X
xsj = q
j
xij ≤ wij
X X
xij = xji ∀i ∈
/ {s, t}
(i,j)∈E (j,i)∈E
xij ≥ 0 ∀ (i, j) ∈ E
s 1 2 7 t s 1 2 7 t
6 6
5 5
c d c d
2 2
Just for fun (to make the dual easier), let’s remove the constraint that
xts ≥ 0 since we’re maximizing xts anyway (so it won’t affect anything)
Maximum flow in matrix form
maximize cT x s.t.
X
Ax = 0
x ≤ w
x ≥ 0 (except xts , for fun)
here A is the incidence matrix of the network and c is all zeros except
for the position corresponding to xts , which has a 1 in it
I The above constraint matrices are TU, thus we have an integral
solution if w is integral
Reminder: primal-dual relationship
minimize wT z s.t.
y,z
y
AT I ≥ c
z
z ≥ 0
X
minimize wij zij s.t.
y,z
(i,j)∈E
X
minimize wij zij s.t.
y,z
(i,j)∈E
X
minimize wij zij s.t.
y,z
(i,j)∈E
X
minimize wij zij s.t.
y,z
(i,j)∈E
I We’d like to have yi ≥ yj for all the edges (i, j) ∈ E , but since
ys = 0 and there are paths from s to t, this can’t always be the
case
Dual of maximum flow
X
minimize wij max{yj − yi , 0} s.t.
y
(i,j)∈E
ys = 0
yt = 1
I We’d like to have yi ≥ yj for all the edges (i, j) ∈ E , but since
ys = 0 and there are paths from s to t, this can’t always be the
case
I Claim that the optimal solution has 0 ≤ yi ≤ 1; why?
Dual of maximum flow
X
minimize wij max{yj − yi , 0} s.t.
y
(i,j)∈E
ys = 0
yt = 1
I We’d like to have yi ≥ yj for all the edges (i, j) ∈ E , but since
ys = 0 and there are paths from s to t, this can’t always be the
case
I Claim that the optimal solution has 0 ≤ yi ≤ 1; why?
I Take any nodes where yi > 1 and set them equal to 1; all this
does is decrease the differences yj − yi (same argument for yi < 0)
Dual of maximum flow
X
minimize wij max{yj − yi , 0} s.t.
y
(i,j)∈E
ys = 0
yt = 1
I We’d like to have yi ≥ yj for all the edges (i, j) ∈ E , but since
ys = 0 and there are paths from s to t, this can’t always be the
case
I Claim that the optimal solution has 0 ≤ yi ≤ 1; why?
I Take any nodes where yi > 1 and set them equal to 1; all this
does is decrease the differences yj − yi (same argument for yi < 0)
I By TU property, there exists optimal y∗ such that yi∗ ∈ {0, 1}
Minimum cut problem
X
minimize wij max{yj − yi , 0} s.t.
y
(i,j)∈E
ys = 0
yt = 1
yi ∈ {0, 1} ∀i ∈ V
3
3 3
a b a b
4 4
6 6
s 1 2 7 t s 1 2 7 t
2
6 6
5 2 5
c d c d
2 2
a v
b w
c x
d y
e z
a ∞ v
∞ ∞
1 w
b 1
1 ∞
s 1 c ∞ x 1 t
1 ∞ 1
∞
1 d ∞ y 1
∞
e ∞ z
b w
c x
d y
e z
Theorem
In any directed network with nodes s and t, the maximum number of
edge-disjoint paths from s to t is equal to the minimum number of
edges whose removal separates s from t.
Menger’s theorem
Theorem
In any directed network with nodes s and t, the maximum number of
edge-disjoint paths from s to t is equal to the minimum number of
edges whose removal separates s from t.
Proof.
This is a special case of max-flow min-cut where all edges have weight
1.
Total dual integrality (TDI)
Definition
The system Ax ≤ b is totally dual integral (TDI) if for all integer c,
the dual problem (2) has an integral solution y ∗ whenever the optimal
value is finite.
Theorem
If Ax ≤ b is TDI and b is integral, then all the corners of the polytope
{x : Ax ≤ b} are integral.
References I