Ellipsoid method is a weakly polynomial algorithm for solving linear programming. The preliminary version was introduced by the Russian mathematician Shor in 1977 for general convex optimization problems. Then it was applied to linear programming by Khachyan in 1979 [1]. Before interior point method, it was the first polynomial time algorithm for LP.

Feasibility implies Optimality

Now, consider the primal LP:

P:max⁡cTxs.t.Ax≤bx≥0 \mathcal{P}: \qquad \begin{aligned} &\max &c^T x & \\ &s.t. &Ax \le b & \\ & & x \ge 0 & \end{aligned}

whose dual is given by

D:min⁡yTb  s.t.yTA≥cTy≥0   \mathcal{D}: \qquad \begin{aligned} &\min &y^Tb \ \ & \\ &s.t. &y^TA \ge c^T & \\ & &y \ge 0 \ \ & \end{aligned}

The ellipsoid does not optimize the primal directly. Instead, it try to return a feasible point (x,y)(x, y) that satisfies the following constraints:

cTx=yTbAx≤bx≥0yTA≥cTy≥0   \begin{aligned} c^T x &= y^Tb & \\ Ax &\le b & \\ x &\ge 0 & \\ y^TA &\ge c^T & \\ y &\ge 0 \ \ & \end{aligned}

By weak duality, if such point exists, then xx is the optimal solution for the primal program. (Note that, if there is no feasible point for the third program, the primal could be either infeasible or unbounded.)

Ellipsoid

Ellipsoid is a unit ball that has been squashed or stretched along orthogonal directions. We illustrate this by an example in two dimension. The following picture shows an ellipse obtained by enlarging the unit ball by a facto of 22 along the v1v_1 direction and squashing it ball by half along the v2v_2 direction, where v1v_1 and v2v_2 constitute an orthogonal base.

It is equivalent to first squash or stretch the ball along the directions of e1,e2e_1, e_2,

then rotate the resulting ellipsoid to corresponding orthogonal directions.

The rotation can be done by left multiplying an orthogonal matrix

V=[v1,v2] V = [v_1, v_2]

where v1,v2v_1, v_2 are the orthogonal base for which the squash and stretch are performed.

To recover the unit ball, we can first perform the reverse rotation:

x←VTx x \leftarrow V^T x

followed by a reverse scaling:

x←[1/22]x x \leftarrow \begin{bmatrix} 1/2 & \\ & 2 \end{bmatrix} x

Note that the reverse rotation is represented by matrix VTV^T as VVT=IV V^T = I. Therefore, the ellipsoid is denoted as

([1/22]VTx)T([1/22]VTx)≤1 \left( \begin{bmatrix} 1/2 & \\ & 2 \end{bmatrix} V^T x \right)^T \left( \begin{bmatrix} 1/2 & \\ & 2 \end{bmatrix} V^T x \right) \le 1

That is

xT(V[1/22]2VT)x≤1 x^T \left( V \begin{bmatrix} 1/2 & \\ & 2 \end{bmatrix}^2 V^T \right) x \le 1

In general, an ellipsoid is represented by

E(s,P)={x:(x−s)TP−1(x−s)≤1} E(s, P) = \{ x : (x - s)^T P^{-1} (x - s) \le 1\}

where s∈Rns \in \mathbb{R}^n is the center of the ellipsoid and PP is a positive semi-definite matrix.

Recall that a positive semi-definite matrix PP can be rewritten as

P=VΣVT P = V \Sigma V^T

and

P−1=VΣ−1VT P^{-1} = V \Sigma^{-1} V^T

where VV is an orthogonal matrix and Σ\Sigma is a diagonal matrix. Geometrically, VV are the directions and Σ\sqrt \Sigma are the ratios of the squashes or stretches. If we define B=VΣB = V \sqrt \Sigma, then BT=ΣVTB^T = \sqrt \Sigma V^T, B−1=Σ−1VTB^{-1} = \sqrt \Sigma^{-1} V^T and P=BBTP = B B^T, P−1=(B−1)TB−1P^{-1} = (B^{-1} )^T B^{-1}.

The representation can be viewed as merely a recipe for converting the ellipsoid back to the unit ball:

  1. First perform a translation x←(x−s)x \leftarrow (x - s) so that the center of the ellipsoid is now the center.

  2. Rotate the ellipsoid, such that its axes are aligned with e1,e2,...,ene_1, e_2, ..., e_n. This is done by multiplying the matrix VTV^T: x←VTxx \leftarrow V^T x.

  3. Squash or stretch along the axes e1,e2,...,ene_1, e_2, ..., e_n: x←Σ−1xx \leftarrow \sqrt \Sigma^{-1} x.

  4. Therefore, the linear transformation for the recovery is

x←B−1(x−s) x \leftarrow B^{-1} (x - s)

Conversely, E(s,P)=E(s,VΣΣVT)E(s, P) = E(s, V \sqrt \Sigma \sqrt \Sigma V^T) tells us how to get the ellipsoid from the unit ball:

  1. Scale unit ball along the axes e1,e2,..,ene_1, e_2, .., e_n by factors that Σ1,1,Σ2,2,...,Σn,n\sqrt \Sigma_{1, 1}, \sqrt \Sigma_{2, 2}, ..., \sqrt \Sigma_{n, n}.

  2. Rotate the ellipsoid by matrix VV.

  3. Move the ellipsoid by ss.

That is, x←VΣy+sx \leftarrow V \sqrt \Sigma y + s takes the unit ball {y:yTy≤1}\{ y : y^T y \le 1 \} to the corresponding ellipsoid {x:(x−s)TVΣ−1VT(x−s)≤1}\{ x : (x - s)^T V \Sigma^{-1} V^T (x - s) \le 1 \}.

Goal

Now return to our discussion of ellipsoid method. Without lose of generality, we consider only the following problem:

Given F={x:Ax≤b}F = \{x : Ax \le b\}, output any x∈Fx \in F or report F=∅F = \emptyset, where A∈Rm×n,x∈Rn,b∈RmA \in \mathbb{R}^{m \times n}, x \in \mathbb{R}^n, b \in \mathbb{R}^m.

We assume further that

  1. ∃R∈R\exists R \in \mathbb{R}, F⊆B(0,R)F \subseteq B(0, R). Besides, if F≠∅F \neq \emptyset, ∃r∈R\exists r \in \mathbb{R}, and t∈Rnt \in \mathbb{R}^n, s.t., B(t,r)⊆FB(t, r) \subseteq F. Here B(0,R)={x:∥x∥2≤R}B(0, R) = \{ x : \Vert x\Vert_2 \le R \} and B(t,r)={x:∥x−t∥2≤r}B(t, r) = \{ x : \Vert x - t\Vert_2 \le r \}.

  2. Separation Oracle: Given a vertex s∈Rns \in \mathbb{R}^n, the separation oracle is a mechanism that asserts

    • either s∈Fs \in F
    • or s∉Fs \notin F and returns a direction (which is a unit vector) d∈Rnd \in \mathbb{R}^n, such that dTs≥dTxd^T s \ge d^T x for ∀x∈F\forall x \in F.

The first assumption says that FF is neither too "large" nor too "small". Note that B(t,r)⊆FB(t, r) \subseteq F also implies that FF has full dimension.

For LP, the separation is straightforward to implement: we just check whether As≤bAs \le b. If so, then s∈Fs \in F. Otherwise, ∃i∈[m]\exists i \in [m], such that the ithi^{th} constraint is violated: (As)i>bi(A s)_i > b_i. Just return dT=Ai,⋅d^T = A_{i, \cdot}.

Question to ponder: the feasible region of an LP may not satisfy the first assumption? It is possible to reduce it to one satisfying the first assumption?

The Algorithm

The algorithm begins with a special ellipsoid E0=B(0,R)E_0 = B(0, R). At each step, it queries the separation oracle and generates a smaller ellipsoid (with reduced volume). If FF is not empty, the ellipsoid at each step is guaranteed to contain it. The algorithm stops before the volume of the ellipsoid decreases below $ \mathtt{vol} (B(t, r))$.

The algorithmic flow is shown below:


  1. i=0i = 0.

  2. E0=B(0,R)E_0 = B(0, R).

  3. While vol(Ei(si,Pi))≥vol(B(t,r))\mathtt{vol} (E_i(s_i, P_i)) \ge \mathtt{vol} (B(t, r)):

  4. \qquad if si∈Fs_i \in F, output sis_i.

  5. \qquad else,

  6. \qquad \qquad Obtain a direction did_i, s.t., diTsi≥diTxd_i^T s_i \ge d_i^T x for x∈Fx \in F*.

  7. \qquad \qquad Calculate a ellipsoid Ei+1⊃Ei∩{x:diTsi≥diTx}E_{i + 1} \supset E_{i} \cap \{x : d_i^T s_i \ge d_i^T x \}.

  8. \qquad \qquad i←i+1i \leftarrow i + 1.

  9. Output F=∅F = \emptyset.


For the one dimension case, it is nothing more than a variant of binary search.

Bounding the Number of Iterations

The main result that characterizes the running time is

Theorem. It is guaranteed that for each ii,

vol(Ei+1)vol(Ei)≤exp⁡(−12(n+1)). \frac{ \mathtt{vol} ( E_{i + 1} ) } { \mathtt{vol} (E_i) } \le \exp \left( -\frac{1}{2 (n + 1) } \right).

Corollary. The number of iterations of the ellipsoid method is bounded by

2n(n+1)ln⁡Rr. 2n(n + 1) \ln \frac{R}{r}.

To simplify the notation further, we write Ei=E(s,P)E_i = E(s, P), di=dd_i = d and Ei+1=E(s′,P′)E_{i + 1} = E(s', P'). The key lemma for the theorem is:

Lemma. Given an ellipsoid E(s,P)={x∈Rn:(x−s)TP−1(x−s)≤1}E(s, P) = \{ x \in \mathbb{R}^n : (x - s)^T P^{-1} (x - s) \le 1\} and the half space H(s,d)={x∈Rn:dT(x−s)≤0}H(s, d) = \{ x \in \mathbb{R}^n : d^T (x - s)\le 0 \}, we can find an ellipsoid E(s′,P′)E(s', P'), such that

  1. E(s′,P′)E(s', P') contains the intersection of E(s,P)E(s, P) and H(s,d)H(s, d) :
E(c,P)∩H(s,d). E(c, P) \cap H(s, d).
  1. The volume of E(s′,P′)E(s', P') is at most exp⁡(−12(n+1))\exp \left( -\frac{1}{2 (n + 1) } \right) times that of E(s,P)E(s, P).

In particular, s′s' and P′P' is given by

s′=s−1n+1PddTPdP′=n2n2−1(P−2n+1PddTPd(PddTPd)T) \begin{aligned} s' &= s - \frac{1}{n + 1} \frac{P d}{\sqrt{d^T P d} } \\ P' &= \frac{n^2}{n^2 - 1} \left( P - \frac{2}{n + 1} \frac{Pd}{\sqrt{d^T P d} } \left( \frac{Pd}{\sqrt{d^T P d} } \right)^T \right) \end{aligned}

Proof. The transformation y=B−1(x−s)y = B^{-1} (x - s) maps E(s,P)E(s, P) to E(0,I)E(0,I), and

{x∈Rn:dTB(B−1(x−s))≤0} \{x \in R^n: d^T B (B^{-1} (x - s)) \le 0\}

to

H(0,BTd)={y∈Rn:dTBy≤0}. H(0, B^T d) = \{y \in R^n: d^T B y \le 0\}.

Let

e′=BTddTBBTd=BTddTPd e' = \frac{B^T d}{\sqrt{d^T B B^T d} } = \frac{B^T d}{\sqrt{d^T P d} }

so that H(0,BTd)H(0, B^Td) is equivalent to H(0,e′)H(0, e').

It suffices to find an ellipsoid that contains E(0,I)∩H(0,e′)E(0, I) \cap H(0, e'). Then applying the reverse transformation x=By+sx = By + s will give us an ellipsoid that contains E(s,P)∩H(s,d)E(s, P) \cap H(s, d).

We can further reduce the problem to finding an ellipsoid that covers E(0,I)∩H(0,e1)E(0, I) \cap H(0, e_1) as we can recover the ellipsoid by rotating e1e_1 to e′e'.

Claim. The ellipsoid that covers E(0,I)∩H(0,e1)E(0,I) \cap H(0, e_1) is given by

E(−1n+1e1,n2n2−1(I−2n+1e1e1T)) E \left( -\frac{1}{n + 1}e_1, \frac{n^2}{n^2 - 1} \left( I - \frac{2}{n + 1}e_1 e_1^T \right) \right)

and has minimum volume exp⁡(−12(n+1))\exp ( -\frac{1}{2(n + 1)} ).

To under the ellipsoid, we check how it transforms the unit ball to an ellipsoid:

  1. It squashes the ball along the e1e_1 axis, by a factor of n2n2−1n−1n+1=nn+1\sqrt{ \frac{n^2} {n^2 - 1} \frac{n - 1} {n + 1} } = \frac{n}{ n + 1 }.

  2. Then it stretches all other directions e2,e3,...,ene_2, e_3, ..., e_n by a factor of n2n2−1\sqrt \frac{n^2}{n^2 - 1}.

  3. Finally, move the center of the ellipsoid to −1n+1e1-\frac{1}{n + 1}e_1.

Note that the ellipsoid has volume

(1−1n+1)(1+1n2−1)(n−1)/2≤exp⁡(−1n+1+1n2−1(n−1)/2)=exp⁡(−12(n+1)). \begin{aligned} \left(1 - \frac{1}{n + 1} \right) \left( 1 + \frac{1}{n^2 -1} \right)^{(n - 1) / 2} &\le \exp \left( - \frac{1}{n + 1} + \frac{1}{n^2 -1} (n - 1) / 2 \right) \\ &= \exp \left( - \frac{1}{2(n + 1)} \right). \end{aligned}

This is also the ratio of the ellipsoid over that of the unit ball, whose value is 1.

Before we prove the claim, we show how to transform the ellipsoid back to E(s′,P′)E(s', P') that covers E(s,P)∩H(s,d)E(s, P) \cap H(s, d). First, by symmetry, the ellipsoid that covers E(0,I)∩H(0,e′)E(0, I) \cap H(0, e') is given by

E(−1n+1e′,n2n2−1(I−2n+1e′(e′)T)) E \left( -\frac{1}{n + 1}e', \frac{n^2}{n^2 - 1} \left( I - \frac{2}{n + 1}e' (e')^T \right) \right)

Applying the mapping By+s=xB y + s = x:

E(−1n+1e′,n2n2−1(I−2n+1e′(e′)T))⟶E(s−1n+1BTe′,n2n2−1B(I−2n+1e′(e′)T)BT). E \left( -\frac{1}{n + 1} e', \frac{n^2}{n^2 - 1} \left( I - \frac{2}{n + 1}e' (e')^T \right) \right) \\ \longrightarrow E \left( s - \frac{1}{n + 1} B^T e', \frac{n^2}{n^2 - 1} B \left( I - \frac{2}{n + 1}e' (e')^T \right) B^T \right).

As linear transformation preserves the ratio of volumes, the ratio of the volume of the final ellipsoid over that of E(s,P)E(s, P) is also exp⁡(−12(n+1))\exp(- \frac{1}{2 (n + 1)} ).

Question to ponder:

  1. Show that n2n2−1(I−2n+1e1e1T)\frac{n^2}{n^2 - 1} (I - \frac{2}{n + 1}e_1 e_1^T) is positive definite.

  2. Show that (n2n2−1(I−2n+1e1e1T))−1=n2−1n2I+2n+2n2e1e1T\left( \frac{n^2}{n^2 - 1} (I - \frac{2}{n + 1}e_1 e_1^T) \right)^{-1} = \frac{n^2 - 1}{n^2} I + \frac{2n + 2}{n^2} e_1 e_1^T.

  3. Show that n2n2−1B(I−2n+1e′(e′)T)BT\frac{n^2}{n^2 - 1} B (I - \frac{2}{n + 1}e' (e')^T) B^T is positive definite.

Proof of the Claim. As both E(0,I)E(0,I) and H(0,e1)H(0, e_1) are symmetric to e1e_1, so should the ellipsoid covering the intersection of them. Therefore it should be of the form

a1(x1−λ)+∑i=2naixi2≤1 a_1 (x_1 - \lambda) + \sum_{i = 2}^n a_i x_i^2 \le 1

where aia_i's and λ\lambda (0<λ<10 < \lambda < 1) are the parameters to be determined. The goal is to minimize its volume:

1a1∏i=2n1aivol[E(0,I)]. \sqrt{\frac{1}{a_1} \prod_{i = 2}^n \frac{1}{a_i} } \mathtt{vol} [ E(0, I) ].

where $ \mathtt{vol} [ E(0, I) ] = 1$ is the volume of unit ball in RnR^n. It is equivalent to maximize

a1∏i=2nai. a_1 \prod_{i = 2}^n a_i.

As the ellipsoid covers E(0,I)∩H(0,e1)E(0,I) \cap H(0, e_1) and should has as small volume as possible, the points eie_i (i=1,2,...,ni = 1, 2, ..., n) should be on its boundary. Therefore,

a1(1−λ)2+∑i=2nai02=1→a1(1−λ)2=1a1(0−λ)2+ai12=1→ai=1−a1λ2∀i=2,3,...,n \begin{aligned} a_1 (1 - \lambda)^2 + \sum_{i = 2}^n a_i 0^2 &= 1 &\rightarrow a_1(1 - \lambda)^2 = 1 &\\ a_1 (0 - \lambda)^2 + a_i 1^2 &= 1 &\rightarrow a_i = 1 - a_1 \lambda^2 &\quad \forall i = 2, 3, ..., n \\ \end{aligned}

Replacing aia_i with 1−a1λ21 - a_1 \lambda^2 and then a1a_1 with 1(1−λ)2\frac{1}{(1 - \lambda)^2}, the goal becomes

max⁡1(1−λ)2[1−λ2(1−λ)2]n−1 \max \quad \frac{1}{(1 - \lambda)^2} \left[ 1 - \frac{\lambda^2}{(1 - \lambda)^2} \right]^{n - 1}

Substitute 11−λ\frac{1}{1 - \lambda} by a variable x>1x > 1, and let

f≐x2[1−(x−1)2]n−1 f \doteq x^2 [1 - (x - 1)^2]^{n - 1}

Its derivative is

f′=2x[1−(x−1)2]n−1−2(n−1)(x−1)x2[1−(x−1)2]n−2 f' = 2x [1 - (x - 1)^2]^{n - 1} - 2 (n - 1)(x - 1) x^2 [1 - (x - 1)^2]^{n - 2}

Setting the derivative to zero, we obtain

[1−(x−1)2]−(n−1)(x−1)x=0⇒1−x2+2x−1−(n−1)x2+(n−1)x=0⇒−nx2+(n+1)x=0⇒x=n+1n \begin{aligned} &[1 - (x - 1)^2] - (n - 1)(x - 1)x = 0 \\ &\Rightarrow 1 - x^2 + 2x - 1- (n -1 )x^2 + (n -1 )x = 0 \\ &\Rightarrow - n x^2 + (n + 1) x = 0 \\ &\Rightarrow x = \frac{n + 1}{n} \end{aligned}

It follows that a1=(n+1n)2a_1 = (\frac{n + 1}{n})^2, λ=1n+1\lambda = \frac{1}{n + 1} and ai=n2−1n2a_i = \frac{n^2 - 1}{n^2} for ∀i=2,3,...,n\forall i = 2, 3, ..., n.

Reference

[1]. Michel X. Goemans, 7. Lecture notes on the ellipsoid algorithm, 18.433: Combinatorial Optimization, MIT