5.7 Practice Problems

Problem 5.7.1. Write the dual of: minimise \(3x_1 + 2x_2 + x_3\) subject to \(x_1 + x_2 + x_3 \geq 6\), \(2x_1 - x_2 = 1\), \(x_1, x_3 \geq 0\), \(x_2\) free.

Show solution

Solution. With dual variables \(y_1 \geq 0\) for the \(\geq \) row (in a minimisation) and \(y_2\) free for the equation: maximise \(6y_1 + y_2\) subject to \(y_1 + 2y_2 \leq 3\) (from \(x_1 \geq 0\)), \(y_1 - y_2 = 2\) (from \(x_2\) free), \(y_1 \leq 1\) (from \(x_3 \geq 0\)), \(y_1 \geq 0\), \(y_2\) free.

Problem 5.7.2. Use complementary slackness to show that \(x = (6, 12)\) is optimal for Example 5.5.1, and find the dual solution.

Show solution

Solution. The dual is: maximise \(-40w_1 + 30w_2 + 60w_3\) subject to \(-w_1 + 3w_2 + 4w_3 \leq 20\), \(-2w_1 + w_2 + 3w_3 \leq 10\), \(w \geq 0\) (the first primal constraint written as \(-x_1 - 2x_2 \geq -40\)). At \(x = (6, 12)\) the first constraint has slack \(40 - 30 = 10\), so \(w_1 = 0\); both \(x_j > 0\), so both dual constraints are tight: \(3w_2 + 4w_3 = 20\), \(w_2 + 3w_3 = 10\), giving \(w_3 = 2\), \(w_2 = 4\). These are non-negative, so \(w\) is dual feasible, and \(30\cdot 4 + 60\cdot 2 = 240\) equals the primal cost: both are optimal.

Problem 5.7.3. Show that the primal “maximise \(x_1 + x_2\) subject to \(x_1 - x_2 \leq -1\), \(-x_1 + x_2 \leq -1\), \(x \geq 0\)” and its dual are both infeasible. What happens to the dual if the objective is \(x_1 - x_2\) instead?

Show solution

Solution. Adding the primal constraints gives \(0 \leq -2\), so the primal is infeasible. The dual is: minimise \(-y_1 - y_2\) subject to \(y_1 - y_2 \geq 1\), \(-y_1 + y_2 \geq 1\), \(y \geq 0\), and adding its constraints gives \(0 \geq 2\): infeasible too. With the objective \(x_1 - x_2\) the dual constraints become \(y_1 - y_2 \geq 1\) and \(-y_1 + y_2 \geq -1\), which force \(y_1 - y_2 = 1\) and are satisfied by \(y = (1 + t, t)\) for every \(t \geq 0\); the dual objective \(-1 - 2t \to -\infty \), so the dual is unbounded, as it must be when the primal is infeasible and the dual feasible.

Problem 5.7.4. In Example 5.1.1, interpret \(y_2 = \frac {10}3\) and predict the profit if the second resource rises from \(56\) to \(60\) units.

Show solution

Solution. \(y_2\) is the value of one more unit of the second resource. If the basis stays optimal, the profit rises by \(4 \times \frac {10}3 = 13.3\), to \(243.3\). Check: with \(2x_1 + x_2 = 26\) and \(2x_1 + 4x_2 = 60\), \(x_2 = \frac {34}3\), \(x_1 = \frac {22}3\), feasible for the third constraint (\(-\frac {22}3 + \frac {34}3 = 4 \leq 5\)), and \(10\cdot \frac {22}3 + 15\cdot \frac {34}3 = \frac {730}3 = 243.3\). How far the resource can change before the basis changes is the subject of the next section.

Problem 5.7.5. Use Farkas’ lemma to show that the system \(x_1 + 2x_2 \leq 1\), \(-x_1 \leq -2\), \(-x_2 \leq 0\) has no solution, by exhibiting a certificate.

Show solution

Solution. Take \(y = (1, 1, 2)\): \(A^{\mathsf T}y = (1 - 1 + 0, 2 + 0 - 2) = (0, 0)\), and \(b^{\mathsf T}y = 1 - 2 + 0 = -1 < 0\). Indeed adding the first constraint, the second and twice the third gives \(0 \leq -1\).

Problem 5.7.6. Show that if (P) has a feasible solution and (D) has a feasible solution, then both have optimal solutions.

Show solution

Solution. By weak duality, the primal objective is bounded above by \(b^{\mathsf T}y\) for the feasible \(y\), so (P) is feasible and bounded. A feasible bounded LP has an optimal solution: the simplex method with Bland’s rule terminates, and it cannot end with unboundedness, so it ends at an optimal BFS. By strong duality (D) then has an optimal solution too.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.