Solving a Knapsack Problem

Consider the knapsack problem

\begin{displaymath}
\begin{array}{lrcrcrcl}
\min & -3x_1 & - & 4x_2 & - & 6x_3...
...x_3 & \leq & 7 \\
&&& x_i & = & 0,1 && i=1,...,3
\end{array}\end{displaymath}

This is an integer programming problem. We solve it by solving a sequence of linear programming relaxations of the problem. The initial relaxation is

\begin{displaymath}
\begin{array}{lrcrcrcl}
\min & -3x_1 & - & 4x_2 & - & 6x_3...
... & 7 \\
& 0 & \leq & x_i & \leq & 1 && i=1,...,3
\end{array}\end{displaymath}

The simplex tableau for this problem is

\begin{displaymath}
M =
\begin{array}{\vert r\vert rrrrrrr\vert}
\multicolumn...
... & 0 \\
1 & 0 & 0 & 1 & 0 & 0 & 0 & 1 \\ \hline
\end{array} \end{displaymath}

The optimal tableau for this relaxation is

\begin{displaymath}
M^1 =
\begin{array}{\vert r\vert rrrrrrr\vert}
\multicolu...
... 0.4 & 0 & 0 & 0 & -0.2 & 0.2 & 0.6 & 1 \\ \hline
\end{array} \end{displaymath}

Thus, the optimal solution to the initial relaxation is

\begin{displaymath}
x_1=1, \quad x_2=1, \quad x_3=0.6
\end{displaymath}

This does obviously not solve the original relaxation, because it has x3=0.6. Notice that no feasible solution to the integer programming problem can have both x2=1 and x3=1. Thus, every solution satisfies

\begin{displaymath}
x_2 + x_3 \leq 1
\end{displaymath}

We can add this constraint to M1, giving the tableau

\begin{displaymath}
M^2 =
\begin{array}{\vert r\vert rrrrrrrr\vert}
\multicol...
... \\
1 & 0 & 1 & 1 & 0 & 0 & 0 & 0 & 1 \\ \hline
\end{array} \end{displaymath}

Pivoting to get an identity, we obtain

\begin{displaymath}
M^3 =
\begin{array}{\vert r\vert rrrrrrrr\vert}
\multicol...
...& 0 & 0 & 0 & -0.2 & 0.2 & -0.4 & 0 & 1 \\ \hline
\end{array} \end{displaymath}

Solving this tableau using the dual simplex method gives

\begin{displaymath}
M^3 =
\begin{array}{\vert r\vert rrrrrrrr\vert}
\multicol...
... \\
1 & 0 & 1 & 0 & 0 & 0 & 1 & 0 & 0 \\ \hline
\end{array} \end{displaymath}

So, the solution to the modified relaxation is

\begin{displaymath}
x_1=1, \quad x_2=0, \quad x_3=1
\end{displaymath}

This is integral, so it solves the original integer program.



 
John E. Mitchell
2003-10-17