Lecture Notes On The Ellipsoid Algorithm
Lecture Notes On The Ellipsoid Algorithm
The ellipsoid algorithm has the important property that the ellipsoids contructed shrink
in volume as the algorithm proceeds; this is stated precisely in the next lemma. This means
that if the set P has positive volume, we will eventually find a point in P . We will need to
deal with the case when P has no volume (i.e. P has just a single point), and also discuss
when we can stop and be guaranteed that either we have a point in P or we know that P is
empty.
7. Lecture notes on the ellipsoid algorithm May 4th, 2009 2
a1
P a0
E0
E1
1
V ol(Ek+1 )
Lemma 7.1 V ol(Ek )
< e− 2(n+1) .
Before we can state the algorithm more precisely, we need to define ellipsoids.
Definition 7.1 Given a center a, and a positive definite matrix A, the ellipsoid E(a, A) is
defined as {x ∈ Rn : (x − a)T A−1 (x − a) ≤ 1}.
One important fact about a positive definite matrix A is that there exists B such that
A = B T B, and hence A−1 = B −1 (B −1 )T . Ellipsoids are in fact just affine transformations
of unit spheres. To see this, consider the (bijective) affine transformation T : x → y =
(B −1 )T (x − a). It maps E(a, A) → {y : y T y ≤ 1} = E(0, I).
We first consider the simple case in which the ellipsoid Ek is the unit sphere and the
inequality we generate is x1 ≥ 0. We claim that the ellipsoid containing Ek ∩ {x : x1 ≥ 0} is
n
( 2 2 )
n+1 1 n2 − 1 X 2
Ek+1 = x : x− + x ≤1 .
n n+1 n2 i=2 i
7. Lecture notes on the ellipsoid algorithm May 4th, 2009 3
where we have used the fact that 1 + x ≤ ex for all x, with strict inequality if x 6= 0. △
Now consider the slightly more general case in which the ellipsoid is also the unit sphere
but we have an arbitrary constraint dT x ≤ 0. We want to find an ellipsoid that contains
E(0, I) ∩ {x : dT x ≤ 0} (we let kdk = 1; this can be done by scaling both sides), it is easy
1 2
to verify that we can take Ek+1 = E(− n+1 d, F ), where F = n2n−1 (I − n+1
2
ddT ), and the ratio
1
of the volumes is ≤ exp − 2(n+1) .
Now we deal with the case where Ek is not the unit sphere. We take advantage of the
fact that linear transformations preserve ratios of volumes.
T
Ek → E(0, 1)
↓ (1)
T −1 ′
Ek+1 ← E
Let’s see what happens to this half-ellipsoid after the transformation T defined by y =
T (x) = (B −1 )T (x − a). This transformation transforms Ek = E(ak , A) to E(0, I). Also,
T
{x : cT x ≤ cT ak } → {y : cT (ak + B T y) ≤ cT ak } = {y : cT B T y ≤ 0} = {y : dT x ≤ 0}, (2)
n2
1 T 2 T
Ek+1 = E ak − b, B I− dd B (4)
n + 1 n2 − 1 n+1
n2
1 2 T
= E ak − b, A− bb . (5)
n + 1 n2 − 1 n+1
2. While ak 6∈ P do:
From feasibility to Optimization First, let us show how to reduce such an optimization
problem to the problem of finding a feasible point in a polytope. Let cT x with c ∈ Rn be
our objective function we would like to minimize over P . Assume without loss of generality
that c ∈ Zn . Instead of optimizing, we can check the non-emptiness of
1
P ′ = P ∩ {x : cT x ≤ d + }
2
for d ∈ Z and our optimum value corresponds to the smallest such d. As S ⊆ {0, 1}n , d must
range in [−ncmax , ncmax ] where cmax = maxi ci . To find d, we can use binary search (and
check the non-emptiness of P ′ with the ellipsoid algorithm). This will take O(log(ncmax )) =
O(log n + log cmax ) steps, which is polynomial.
Starting Ellipsoid. Now, we need to consider using the ellipsoid to find a feasible point
in P ′ or decide that P ′ is empty. As starting ellipsoid, we can use the ball centered at
1√
the vector ( 21 , 12 , · · · , 21 ) and of radius
√ 2
n (which goes through all {0, 1}n vectors). This
ball has volume V ol(E0 ) = 21n ( n)n V ol(Bn ), where Bn is the unit ball. We have that
n/2
V ol(Bn ) = Γ(πn +1) , which for the purpose here we can even use the (very weak) upper bound
2
of π n/2 (or even 2n ). This shows that log(V ol(E0 )) = O(n log n).
Termination Criterion. We will now argue that if P ′ is non-empty, its volume is not
too small. Assume that P ′ is non-empty, say v0 ∈ P ′ ∩ {0, 1}n . Our assumption that P
is full-dimensional implies that there exists v1 , v2 , · · · , vn ∈ P ∩ {0, 1}n = S such that the
“simplex” v0 , v1 , · · · , vn is full-dimensional. The vi ’s may not be in P ′ . Instead, define wi
for i = 1, · · · , n by:
if cT vi ≤ d + 12
vi
wi =
v0 + α(vi − v0 ) otherwise
1
where α = 2ncmax
. This implies that wi ∈ P ′ as
1 1
cT wi = cT v0 + αcT (vi − v0 ) ≤ d + ncmax = d + .
2ncmax 2
We have that P ′ contains C = conv({v0 , w1 , w2 , · · · , wn }) and V ol(C) is n!1 times the volume
of the parallelipiped spanned by wi − v0 = βi (vi − v0 ) (with βi ∈ {α, 1}) for i = 1, · · · , n.
This paralleliped has volume equal to the product of the βi (which is at least αn ) times the
volume of a parallelipiped with integer vertices, which is at least 1. Thus,
n
′ 1 1
V ol(P ) ≥ V ol(C) = .
n! 2ncmax
Taking logs, we see that the number of iterations of the ellipsoid algorithm before either
discovering that P ′ is empty or a feasible point is at most
log(V ol(E0 )) − log(V ol(P ′ )) = O(n log n + n log cmax ).
This is polynomial.
7. Lecture notes on the ellipsoid algorithm May 4th, 2009 6
Separation Oracle. To run the ellipsoid algorithm, we need to be able to decide, given
x ∈ Rn , whether x ∈ P ′ or find a violated inequality. The beauty here is that we do not
necessarily need a complete and explicit description of P in terms of linear inequalities. We
will see examples in which we can even apply this to exponential-sized descriptions. What
we need is a separation oracle for P : Given x∗ ∈ Rn , either decide that x∗ ∈ P or find
an inequality aT x ≤ b valid for P such that aT x∗ > b. If this separation oracle runs in
polynomial-time, we have succeeded in finding the optimum value d when optimizing cT x
over P (or S).
Finding an optimum solution. There is one more issue. This algorithm gives us a point
x∗ in P of value at most d + 21 where d is the optimum value. However, we are interested in
finding a point x ∈ P ∩ {0, 1}n = S of value exactly d. This can be done by starting from
x∗ and finding any extreme point x of P such that cT x ≤ cT x∗ . Details are omitted.
In summary, we obtain the following important theorem shown by Grötschel, Lovász and
Schrijver, 1979.
Theorem 7.3 Let S = {0, 1}n and P = conv(S). Assume that P is full-dimensional and we
are given a separation oracle for P . Then, given c ∈ Zn , one can find min{cT x : x ∈ S} by
the ellipsoid algorithm by using a polynomial number of operations and calls to the separation
oracle.
To be more precise, the number of iterations of the ellipsoid algorithm for the above
application is O(n2 log2 n + n2 log2 cmax ), each iteration requiring a call to the separation
oracle and a polynomial number of operations (rank-1 updates of the matrix A, etc.).
Here are two brief descriptions of combinatorial optimization problems that can be solved
with this approach.
subject to:
X
(P ) xa ≥ 1 ∀S ⊆ V \ {r}
a∈δ− (S)
xa ≥ 0 a ∈ A.
Instead, we could use the ellipsoid algorithm to directly solve this linear program in polynomial-
time. Indeed, even though this linear program has an exponential number of constraints (in
the size of the graph), a separation oracle for it can be easily defined. Indeed consider x∗ . If
x∗a < 0 for some a ∈ A, just return the inequality xa ≥ 0. Otherwise, for every t ∈ V \ {r},
7. Lecture notes on the ellipsoid algorithm May 4th, 2009 7
consider the minimum r − t cut problem in which the capacity on arc a is given by x∗a . As
we have seen, this can be solved by maximum flow computations. If for some t ∈ V \ {r},
the minimum r − t cut has value less than 1 then we have found a violated inequality by x∗ .
Otherwise, we have that x∗ ∈ P . Our separation oracle can thus be implemented by doing
|V | − 1 maximum flow computations, and hence is polynomial. We are done.
Maximum Weight Matching Problem. For the maximum weight matching problem
in a general graph G = (V, E), Edmonds has shown that the convex hull of all matchings is
given by:
X |S| − 1
xe ≤ S ⊂ V, |S| odd
2
e∈E(S)
(6)
X
xe ≤ 1 v∈V
e∈δ(v)
xe ≥ 0 e ∈ E.
∗ ∗
P
Given x , we can easily check if x is nonnegative and if the n constraints e∈δ(v) xe ≤ 1 are
satisfied. There is an exponential number of remaining constraints, but we will show now
that they can be checked byPdoing a sequence of minimum cut computations.
Assume x ≥ 0 satisfies e∈δ(v) xe ≤ 1 for every v ∈ V , and we would like to decide if
X |S| − 1
xe ≤
2
e∈E(S)
for all S ⊂ V , |S| odd, and if not produce such a violated set S. We can assume without
loss of generality that |V | is even (otherwise, simply add a vertex). Let
X
sv = 1 − xe ,
e∈δ(v)
xe ≤ |S|−1
P
for all v ∈ V . Observe that e∈E(S) 2
is equivalent to
X X
sv + xe ≥ 1.
v∈S e∈δ(S)
Define a new graph H, whose vertex set is V ∪ {u} (where u is a new vertex) and whose
edge set is E ∪ {(u, v) : v ∈ V }. In this new graph, let the capacity ue of an edge be xe if
e ∈ E or sv for e = (u, v). Observe that in this graph,
X X
sv + xe ≥ 1
v∈S e∈δ(S)
if and only if X
ue ≥ 1,
e∈δH (S)
7. Lecture notes on the ellipsoid algorithm May 4th, 2009 8
where δH (S) are the edges of H with one endpoint in S. Thus, to solve our separation
problem, it is enough to be able to find the minimum cut in H among all the cuts defined
by sets S with S ⊆ V , |S| odd. This is a special case of the minimum T -odd cut problem
seen previously. If the minimum T -odd cut problem returns a minimum cut of value greater
or equal to 1, we know that all inequalities are satisfied; otherwise, a minimum T -odd cut
provides a violated inequality.