We are now ready to introduce the important concept of the dual of a linear program. Before doing so, let us go back to
Example 2.1.1 from
Section 2.1 and see how we can bound the value of this LP from below and above in an “algebraic” fashion. Of course, there is a very natural certificate for a lower bound. If we simply take a point
\((x,y)\in \mathbb{R}^2\text{,}\) then one can easily check whether each of the constraints are satisfied by
\((x,y)\) and compute the value of the objective function at that point. For example, if we take
\((x,y)=(9/4,1/4)\text{,}\) then we can check that all of the constraints are satisfied and therefore the value of the LP is at least
\(f(9/4,1/4)=17/4\text{.}\) So, we see that, in general, proving that the value of an LP satisfies a given lower bound is in NP because a feasible point yields a certificate which can be efficiently verified.
Now, what about proving an upper bound on the value of the LP in
Example 2.1.1? Of course, as we saw in
Section 2.1, this can be done by computing the value of the objective function at each of the vertices of the feasible region. However, the concept of duality will provide us with an alternative method for proving upper bounds which is purely algebraic (and very slick!). What we want to prove is that
\(2x-y\leq 17/4\) for any choice of variables
\((x,y)\) satisfying the constraints. A clever way to do this is to try to “combine” the constraints in such a way that it gives us an upper bound on the objective function. For example, suppose that we add together the constraints
\(x+3y\leq 3\) and
\(x-y\leq 2\) to get
\(2x+2y\leq 5\text{.}\) Since we know that
\(y\geq0\text{,}\) we get
\begin{equation*}
2x-y\leq 2x+2y\leq 5
\end{equation*}
which means that the value of the LP is at most 5. This is, of course, weaker than the bound of \(17/4\) that we wanted, but it demonstrates the principle that, by combining constraints in the right way, one can often get an upper bound on the objective function. To prove the best possible upper bound via this strategy, what we want to do is to multiply both sides of \(x+3y\leq 3\) by a non-negative number, say \(a\text{,}\) and both sides of \(x-y\leq 2\) by a non-negative number, say \(b\text{,}\) and add them together so that the following holds
\begin{equation*}
2x-y\leq a(x+3y) + b(x-y)\leq 3a + 2b
\end{equation*}
and, moreover, the quantity \(3a+2b\) is as small as possible. The second inequality holds simply because \(a\) and \(b\) are non-negative. For the first inequality to hold, it suffices to ensure that the coefficients of \(x\) and \(y\) in \(a(x+3y) + b(x-y) = (a+b)x + (3a-b)y\) are at least \(2\) and \(-1\) respectively since \(x,y\geq0\) (this explains why Standard Inequality Form is so useful). In other words, the best possible upper bound that we can prove via this approach is equal to the value of the following linear program in variables \(a\) and \(b\text{:}\)
\begin{align*}
\text{min } \amp \amp 3a+2b\\
\text{subject to } \amp \amp a+b\geq 2\\
\text{subject to } \amp \amp 3a-b\geq -1\\
\amp \amp a\geq 0\\
\amp \amp b\geq 0.
\end{align*}
This linear program turns out to be the dual of the LP in
Example 2.1.1. A cool thing about the dual is that it gives us a “constructive” method for bounding the value of the original LP (called the
primal LP in the context of duals) from above. That is, every feasible point for the dual gives us an upper bound for the primal. By plugging in
\((a,b)=(1/4, 7/4)\text{,}\) one can check that all of the constraints of the dual are satisfied and the objective function
\(3a+2b\) evaluates to
\(17/4\text{.}\) Therefore, when combined with the lower bound proved earlier, this gives us another proof that the value of the LP in
Example 2.1.1 is
\(17/4\text{.}\)
Let us now define the dual of an LP in general. Given an LP
\begin{align*}
\text{max } \amp \amp c^Tx\\
\text{subject to } \amp \amp Ax\leq b\\
\amp \amp x\geq 0
\end{align*}
in Standard Inequality Form, the dual is a linear program in variables \(y_1,\dots,y_m\) defined by
\begin{align*}
\text{min } \amp \amp b^Ty\\
\text{subject to } \amp \amp A^Ty\geq c\\
\amp \amp y\geq 0
\end{align*}
where
\(A^T\) denotes the transpose of the matrix
\(A\text{.}\) As in
Example 2.1.1, the value of the dual linear program is always an upper bound for the value of the primal; this is known as the Weak Duality Theorem. In fact, somewhat magically, the primal and dual actually have the
same value. This is known as the Strong Duality Theorem and will be proved in
Section 2.3.