Simplex Method: Example (LALP exercise 4)

Question

Consider the following linear programming problem

\[\begin{aligned} \begin{array}{ll} \text { Minimise } & -x_{1}-2 x_{2}-x_{3} \\ \text { subject to } & 3 x_{1}+4 x_{2}+2 x_{3} &\leq 10 \\ & 2 x_{1}+x_{2}+2 x_{3} &\leq 7 \\ & x_{1}+3 x_{2}+3 x_{3} &\leq 5 \\ & x_{1}, x_{2}, x_{3} &\geq 0 \end{array} \end{aligned} \]

(a) Solve the problem using the simplex method, fully justify each step.[80]
(b) From the optimal tableau that you obtain in part (a), find an optimal solution to the dual problem.[20]

(a)

Adding slack variables leads to

\[\begin{aligned} \begin{array}{ll} \text { Minimise } & -x_{1}-2 x_{2}-x_{3}+0x_4+0x_5+0x_6 \\ \text { subject to } & 3 x_{1}+4 x_{2}+2 x_{3}+ x_4 &= 10 \\ & 2 x_{1}+x_{2}+2 x_{3}\qquad \quad+x_5 &= 7 \\ & x_{1}+3 x_{2}+3 x_{3} \qquad \qquad \qquad +x_6&= 5 \\ & x_{1}, x_{2}, x_{3},x_4,x_5,x_6 &\geq 0 \end{array} \end{aligned} \]

Since \(b = (10,7,5)^T \geq 0\), initial basis can be chosen as $B = [a_4,a_5,a_6] = I $. So \(B^{-1}b = \bar b \geq 0\). Thus, initial tableau is given by

Initial iteration

\[\begin{array}{|r|rrrrrr|r|} \hline & x_{1} & x_{2} & x_{3} & x_{4} & x_{5} & x_{6} & R H S \\ \hline f & 1 & 2 & 1 & 0 & 0 & 0 & 0 \\ \hline x_{4} & 3 & 4 & 2 & 1 & 0 & 0 & 10 \\ x_{5} & 2 & 1 & 2 & 0 & 1 & 0 & 7 \\ x_{6} & 1 & 3^* & 3 & 0 & 0 & 1 & 5 \\ \hline \end{array} \]

  • From this table, we see that \(x_2\) is a nonbasic variable, and \(z_2 − c_2 = 2 > 0\). Thus, the current basic feasible solution$ (x_4, x_5, x_6) = (10,7,5) $ is not optimal. \(x_2\) will enter the basis.

  • Now we are going to determine which vector among \(x_{4}, x_{5}, x_{6}\) will leave the basis. By checking \(y_{2}=(4,1,3)^{T}\), we note that it has \(3\) positive components. By the minimum ratio test: \(\min \left\{\frac{10}{4}, \frac{7}{1},\frac{5}{3} \right\}=\frac{5}{3}\). The vector \(x_{6}\) leaves the basis, and the marked elements in the above table is the pivoting element.

  • We do pivoting operations to get a new basic feasible solution. Thus the algorithm proceeds to the next iteration.

Iteration 1

\[\begin{array}{|r|rrrrrr|r|} \hline & x_{1} & x_{2} & x_{3} & x_{4} & x_{5} & x_{6} & R H S \\ \hline f & \frac{1}{3} & 0 & -1 & 0 & 0 & -\frac{2}{3} & -\frac{10}{3} \\ \hline x_{4} & \frac{5}{3} & 0 & -2 & 1 & 0 & -\frac{4}{3} & \frac{10}{3} \\ x_{5} & \frac{5}{3} & 0 & 1 & 0 & 1 & -\frac{1}{3} & \frac{16}{3} \\ x_{2} & \frac{1}{3} & 1 & 1 & 0 & 0 & 1 & \frac{5}{3} \\ \hline \end{array} \]

  • \(x_{1}\) is a nonbasic variable, and \(z_{1}-c_{1}\geq0\). Thus, the current basic feasible solution \(\left(x_{4}, x_{5}, x_{2}\right)=(\frac{10}{3},\frac{16}{3},\frac{5}{3})\) is not optimal. \(x_{1}\) will enter the basis.
  • Now we determine which vector among \(x_{4}, x_{5}, x_{2}\) will leave the basis. By checking \(y_{1}=(\frac{5}{3},\frac{5}{3},\frac{1}{3})^{T}\) and the minimum ratio test indicates that \(x_{4}\) should leave the basis.
  • We do pivoting operations, and get the following tableau:

Iteration 2

\[\begin{array}{|r|rrrrrr|r|} \hline & x_{1} & x_{2} & x_{3} & x_{4} & x_{5} & x_{6} & R H S \\ \hline f & 0 & 0 & -\frac{5}{3} & -\frac{1}{5} & 0 & \frac{1}{3} & -4 \\ \hline x_{1} & 1 & 0 & -\frac{6}{5} & \frac{3}{5} & 0 & -\frac{4}{5} & 2 \\ x_{5} & 0 & 0 & 3 & -1 & 1 & 1 & 2 \\ x_{2} & 0 & 1 & \frac{7}{5} & -\frac{1}{5} & 0 & \frac{9}{15} & 1 \\ \hline \end{array} \]

Now, \(z_{j}-c_{j} \leq 0\) for all nonbasic variables, and thus an optimal solution is found and it is given by

\[x_{1}^{*}=2, x_{2}^{*}=1, x_{3}^{*}=0 \]

The optimal value is

\[z^{*}=-4 \]

The optimal basis \(B\) consists of the column \(a_{1}, a_{5}\) and \(a_{2}\), i.e., \(B=\left[a_{1}, a_{5}, a_{2}\right]\).

(b)

The problem can be describe as:

\[\begin{aligned} \begin{array}{ll} \text { Minimise } & -x_{1}-2 x_{2}-x_{3} \\ \text { subject to } & -3 x_{1}-4 x_{2}-2 x_{3} &\geq -10 \\ & -2 x_{1}-x_{2}-2 x_{3} &\geq -7 \\ & -x_{1}-3 x_{2}-3 x_{3} &\geq- 5 \\ & x_{1}, x_{2}, x_{3} &\geq 0 \end{array} \end{aligned} \]

If the primal problem is given by (canonical form)

\[\begin{array}{cl} (L P) \quad \text { Minimize } & c^{T} x \\ \text { s.t. } & A x \geq b, \quad x \geq 0 \end{array} \]

then its dual problem is

\[\begin{array}{cl} (D P) \quad \text { Maximize } & b^{T} y \\ \text { s.t. } \quad & A^{T} y \leq c, y \geq 0 \end{array} \]

Hence the Dual of \(P\) is

\[\begin{aligned} \begin{array}{ll} \text { Maximize } & -10y_{1}-7 y_{2}-5y_{3} \\ \text { subject to } & -3 y_{1}-2 y_{2}-1y_{3} &\leq -1 \\ & -4 y_{1}-y_{2}-3 y_{3} &\leq -2 \\ & -2y_{1}-2y_{2}-3 y_{3} &\leq- 1 \\ & y_{1}, y_{2}, y_{3} &\geq 0 \end{array} \end{aligned} \]

Since \(x_{1}^{*}=2, x_{2}^{*}=1, x_{3}^{*}=0\) is an solution to the primal problem, quick check:

\[\begin{aligned} \begin{array}{ll} \text{When}& \ x_{1}^{*}=2, x_{2}^{*}=1, x_{3}^{*}=0 ,\\ & -3 x_{1}-4 x_{2}-2 x_{3} &= -10 \\ & -2 x_{1}-x_{2}-2 x_{3} &> -7 \\ & -x_{1}-3 x_{2}-3 x_{3} &=- 5 \\ \end{array} \end{aligned} \]

Since the second constraint in the primal problem is an inequality, by the complementary slackness conditions, the second variable in the dual problem is zero, that is \(y^*_2 = 0\). Substituting this to the primal constraints, we obtain

\[\begin{aligned} \begin{array}{ll} \text { Maximize } & -10y_{1}-5y_{3} \\ \text { subject to } & -3 y_{1}-1y_{3} &\leq -1 \\ & -4 y_{1}-3 y_{3} &\leq -2 \\ & -2y_{1}-3 y_{3} &\leq- 1 \\ & y_{1}, y_{2}, y_{3} &\geq 0 \end{array} \end{aligned} \]

By drawing a graph, we can quickly obtain the reduced LP problem above, where the optimal solution is

posted @ 2022-03-07 13:20  miyasaka  阅读(53)  评论(0)    收藏  举报