MIT 6.1220 — Lecture 11

Linear Programming (Part I)

Definition (Linear Programming). We seek to optimize a linear objective function subject to linear equality and linear inequality constraints. It will always look like:

Max / min of (i=1ncixi) given xiR0 and {(i=1nAj,ixi )j bj}j=1m for j{,,=}.\text{Max / min of } \left(\sum_{i = 1}^n c_i x_i\right) \text{ given } x_i \in \mathbb{R}^{\geq 0} \text{ and } \left \{ \left(\sum_{i = 1}^n A_{j, i} x_i \ \right) \bigstar_j \ b_j \right \}_{j = 1}^m \text{ for } \bigstar_j \in \{ \leq , \geq , =\}.

Problem. (Claw Machine) You have two claw machines K1K_1 and K2K_2. Putting $x1\$x_1 into K1K_1 yields a return of $(x13)\$ \left(\frac{x_1}{3}\right), and putting $x2\$x_2 into K2K_2 yields a return of $(x22)\$ \left(\frac{x_2}{2}\right). Also, you must put at least as much into K1K_1 as K2K_2. You have $60\$60.

Solution. (Claw Machine LP) We can write the above setup as a linear program like so:

Max / min of 13x1+12x2 given xiR0 and x1x20 and x1+x260.\text{Max / min of } \dfrac{1}{3}x_1 + \dfrac{1}{2}x_2 \text{ given } x_i \in \mathbb{R}^{\geq 0} \text{ and } x_1 - x_2 \geq 0 \text{ and } x_1 + x_2 \leq 60.

We can determine a normal form for linear programs.

We can also rewrite our constraints in linear algebra notation. (Here, we say mn\vec{m} \leq \vec{n} iff minim_i \leq n_i for all indices ii.)

Find max of cx given x0 and Axb.\text{Find max of } \vec{c} \cdot \vec{x} \text{ given } \vec{x} \geq \vec{0} \text{ and } A\vec{x} \leq \vec{b}.

Definition. Given a set of constraints AxbA \vec{x} \leq \vec{b} of a linear program P\mathcal{P},

Some optimal solution always occurs at a corner point, obviously. There exist polynomial-time solving algorithms.

There's this idea of duality that's also pretty obvious. You want to minimize the RHS of a nonnegative linear combination y\vec{y} of the constraints AxbA \vec{x} \leq \vec{b}, constrained on the LHS of this linear combination being at least cx\vec{c} \cdot \vec{x}.