Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

MA213 Chapter 8 – The Simplex method

Exercise solutions

Exercise 8.1

(a) We first write the above problem in standard equality form by adding slack variables x3 , x4 , x5 .
If we select these as basic variables, we can write the problem in tableau form with respect to this
choice:
maximise z
subject to z = 130x1 + 100x2
x3 = 27 − 1.5x1 − x2
x4 = 21 − x1 − x2
x5 = 9 − 0.3x1 − 0.5x2
x1 , x2 , x3 , x4 , x5 ≥ 0.
The corresponding basic solution is x1 = 0, x2 = 0, x3 = 27, x4 = 21, x5 = 9, with objective value
0. This solution corresponds to the vertex (0, 0) in the original problem. Its non-basic variables
are {x1 , x2 }, its basic variables are {x3 , x4 , x5 }. The objective z is, happily, already expressed in
terms of the non-basic variables.

Iteration 1
Step 1: Choose the entering variable. Choose some xk with positive objective coefficient.
Here, the objective coefficients of x1 and x2 are 130 and 100, respectively, so either could be chosen.
Let us choose x1 .
Step 2: Choose the exiting variable. We intend to increase x1 as much as possible, keeping un-
changed at 0 the value of the remaining nonbasic variables (in this case, only x2 ) without violating
the constraints. If we increase x1 by t, in order to satisfy the equality constraints, the basic variables
must be modified as follows:
x3 = 27 − 1.5t
x4 = 21 − t
x5 = 9 − 0.3t

Since the above values must be nonnegative, the maximum value of t that we can choose is
27 21 9
min{ 1.5 , 1 , 0.3 } = 18. For this choice of t, variable x3 takes value zero, and hence it is the ex-
iting variable.
Step 3: Pivot. We need to bring the problem in tableau form with respect to the new choice of basic
variables {x1 , x4 , x5 }. At this stage, the equation containing x3 is x3 = 27−1.5x1 −x2 , which allows
us to write the new basic variable x1 in terms of the non-basic variables as x1 = 18 − 32 x2 − 23 x3 .
Replacing x1 with this expression in all remaining equations gives

maximise z
subject to z = 2340 + 40 3 2
x − 260
3
x3
2 2
x1 = 18 − x
3 2
− x
3 3
1 2
x4 = 3 − x
3 2
+ x
3 3
x5 = 3.6 − 0.3x2 + 0.2x3
x1 , x2 , x3 , x4 , x5 ≥ 0.

1
The new basic solution is (18, 0, 0, 3, 6), with value 2340.
Iteration 2
In the above tableau, the only variable with positive objective coefficient is x2 , with coefficient 40
3
,
hence we have to choose x2 has the entering variable. To choose the exiting variable, we choose the
largest t such that the current basic variables remain non-negative:
2
x1 (t) = 18 − 3
t
1
x4 (t) = 3 − 3
t
x5 (t) = 3.6 − 0.3t
18 3 3.6
We get t = min{ 2/3 , 1/3 , 0.3 } = 9, which makes x4 take value 0, thus x4 exits the basis. The new
basic variables are {x1 , x2 , x5 }.
We obtain the new tableau:

maximise z
subject to z = 2460 − 60x3 − 40x4
x1 = 12 − 2x3 + 2x4
x2 = 9 + 2x3 − 3x4
x5 = 0.9 + 0.4x3 + 0.9x4
x1 , x2 , x3 , x4 , x5 ≥ 0.

Iteration 3
At this point, there are no variables with positive objective coefficient. We stop with the optimal
solution x1 = 12, x2 = 9, x3 = x4 = 0, x5 = 0.9. The optimal value of the problem is 2460.

0, 3x1 + 0, 5x2 ≤ 9
x1 + x2 ≤ 21
(0, 18) 1, 5x1 + x2 ≤ 27

( 15 27
2, 2)

(12, 9)

(0, 0) (18, 0)

Figure 1: Representation of the feasible region of the problem in the example, and path followed
by the Simplex Method.

(b) Note that the Simplex Method, in the space of the original variables x1 , x2 , followed the
sequence of vertices (0, 0), (18, 0), (12, 9).

2
(c) We first write down the dual problem.

min 27y1 + 21y2 + 9y3


1.5y1 + 0.3y2 + 0.3y3 ≥ 130
y1 + y2 + 0.5y3 ≥ 100
y1 , y2 , y3 ≥ 0
Both variables x1 , x2 are basic in the optimal solution we computed, hence the corresponding dual
constraints must be satisfied at equality. The effective constraints are the first two, hence y3 must
be zero. Hence we need to solve the system

1.5y1 + y2 = 130
y1 + y2 = 100
The solution is y1 = 60, y2 = 40, y3 = 0, which is feasible for the dual.

Exercise 8.2

(a) After introducing the slack variables, the problem becomes:

max z
z = 2x1 + 4x2 − x3
x4 = 4 − x1 − 2x3
x5 = 2 + x1 − x2 − x3
x6 = 4 − 2x1 − 2x2 + x3
x1 , . . . , x 6 ≥ 0
The initial basis is B = {4, 5, 6}, which corresponds to the basic solution (0, 0, 0, 4, 2, 4), with value
0. Variable x1 has positive coefficient in the objective function, which is z = 2x1 + 4x2 − x3 .
We increase x1 to the largest value t which keeps the solution non-negative. The change in the
basic variables is

x4 (t) = 4 − t
x5 (t) = 2 + t
x6 (t) = 4 − 2t

The maximum value is t = 2. The next basis is B = {1, 4, 5}, corresponding to the basic solution
(2, 0, 0, 2, 4, 0), of value 4. We recompute the problem in tableau form with respect to the new
basis.

max z
z = 4 + 2x2 − x6
x4 = 2 + x2 − 52 x3 + 21 x6
x5 = 4 − 2x2 − 12 x3 − 21 x6
x1 = 2 − x2 + 12 x3 − 21 x6
x1 , . . . , x 6 ≥ 0
The non-basic variable x2 has positive coefficient in the objective function z = 4 + 2x2 − x6 . We
increase x2 to the largest value t which keeps the solution non-negative. The change in the basic

3
variables is
x1 (t) = 2 − t
x4 (t) = 2 + t
x5 (t) = 4 − 2t
The maximum value is t = 2. Notice that, for t = 2, both x1 and x5 become 0, so we need to select
one of the two to leave the basis. Both are legitimate choices, but in this case we are applying
Bland’s rule, which prescribes to select the variable of minimum index among the ones eligible to
leave the basis. Hence, we select x1 to leave the basis. The next basis is B = {2, 4, 5}, corresponding
to the basic solution (0, 2, 0, 4, 0, 0), of value 8. We recompute the problem in tableau form with
respect to the new basis.

max z
−z − 2x1 + x3 − 2x6 = −8
x1 + 2x3 + x4 = 4
− 2x1 + 32 x3 + x5 − 12 x6 = 0
x1 + x2 − 12 x3 + 12 x6 = 2
x1 , . . . , x 6 ≥ 0
max z
z = 8 − 2x1 + x3 − 2x6
x4 = 4 − x1 − 2x3
x5 = 2x1 − 32 x3 + 21 x6
x2 = 2 − x1 + 12 x3 − 21 x6
x1 , . . . , x 6 ≥ 0
The non-basic variable x3 has positive coefficient in the objective function z = 8 − 2x1 + x3 − 2x6 .
We increase x3 to the largest value t which keeps the solution non-negative. The change in the
basic variables is
1
x2 (t) = 2 + t
2
x4 (t) = 4 − 2t
3
x5 (t) = 0 − t
2
Note that the maximum value is t = 0, which is achieved on the row corresponding to the variable
x5 . Hence x5 leaves the basis.The next basis is B = {2, 3, 4}, corresponding to the same basic
solution as before. We recompute the problem in tableau form with respect to the new basis.

max z
z = 8 − 23 x1 − 23 x5 − 5
x
3 6
x4 = 4 − 11 3 1
x + 34 x5 − 2
x
3 6
4
x3 = x − 23 x5
3 1
+ 1
x
3 6
x2 = 2 − 13 x1 − 13 x5 − 1
x
3 6
x1 , . . . , x 6 ≥ 0
The objective function is z = 8 − 23 x1 − 23 x5 − 53 x6 . All nonbasic variables have negative coefficient
in the objective, therefore the current solution is optimal.
The optimal solution found for the original problem is the point x∗ = (0, 2, 0), with value 8.

4
(b) The solution x∗ computed above is the unique optimum. We will see this in two different
ways.
Method 1: The usual way we have learned to do this is by looking at the dual solution proving
optimality of x∗ . We will compute such optimal dual solution in point c) below, so we postpone
this method to the next point.
Method 2: Observe that, from the top row of the optimal tableau corresponding, we get that the
objective function z can be expressed as
2 2 5
z = 8 − x1 − x5 − x6 .
3 3 3
In particular, all the coefficients of the non-basic variables (x1 , x5 , x6 ) are strictly negative, which
implies that, for any solution where the nonbasic variables take positive value, the objective value
is strictly less than 8. It follows that the only optimal solutions are the ones where x1 , x5 , x6 = 0.
However, from the equations it follows that the only such solution is (0, 2, 0, 0, 0, 0), hence (0, 2, 0)
is the only optimum for the original problem.

(c) In the optimal solution, the non-basic variables are x1 , x5 , x6 . Recalling that x5 is the slack
variable for the second resource constraint of the original problem, and x6 for the third, it follows
that the basic variables (for the original problem) are x2 , x3 , and the effective constraints are the
second and the third (observe that, in this case, x3 is basic but it has value 0). It follows that any
optimal dual solution must have y1 = 0 because the first constraint is satisfied as strict inequality.
Setting at equality the dual constraints corresponding to the basic variables x2 , x3 , we obtain

y2 + 2y3 = 4
y2 − y3 = −1

Solving the system gives y1∗ = 0, y2∗ = 2/3, y3∗ = 5/3. One need to check that y ∗ is feasible for the
dual, which it is, because it is nonnegative and it satisfies the first dual constraint y1 − y2 + 2y3 ≤ 2,
and conclude that x∗ is primal optimal and y ∗ is dual optimal.
Now we are ready to verify if x∗ is the unique optimum. From the lectures, we know that in order
for there being multiple optima, at least one of the following two conditions must be verified:

i) The dual value associated with some effective constraint is 0.

ii) y ∗ satisfies at equality the dual constraint relative to some nonbasic variable.

Condition i) is not verified because the effective constraints (constraint 2 and 3) have positive dual
values (y2∗ = 2/3, y3∗ = 5/3), whereas condition ii) is not verified because the only non-basic variable
is x1 , but the corresponding dual constraint is verified at strict inequality (y1∗ − y2∗ + 2y3∗ = 83 > 2).
It follows that x∗ is the unique optimum.

Exercise 8.3
We write the problem in the form used on the lecture with respect to the basis {3, 4, 5}.

5
maximise z
subject to z = 2x1 + x2
x3 = 2 − x1 + 2x2
x4 = 5 − 2x1 + x2
x5 = 4 + 4x1 − x2
x1 , x2 , x3 , x4 , x5 ≥ 0.
The current extreme point is (0, 0, 2, 5, 4), with value 0. Both x1 and x2 have positive coefficients in
the first line, which means that we can select either of them as the entering variable. If we increase
x1 from 0 to t, then the basic variables change as,

x3 (t) = 2 − t
x4 (t) = 5 − 2t
x5 (t) = 4 + 4t.

Hence, the largest possible value of t is t = 2, and the exiting variable will be x3 . We obtain the
new basis {1, 4, 5}. The current extreme point is (2, 0, 0, 1, 12), with value 4.
We now need to express all variables in terms of the nonbasic variables x2 and x3 . From the second
equality, we express
x1 = 2 + 2x2 − x3 .
Substituting this, we obtain the problem in tableau form with respect to the new basis {1, 4, 5}:

maximise z
subject to z = 4 + 5x2 − 2x3
x2 = 2 + 2x2 − x3
x4 = 1 − 3x2 + 2x3
x5 = 12 + 7x2 − 4x3
x1 , x2 , x3 , x4 , x5 ≥ 0.
At this point, x2 is the only candidate for an entering variable, as z = 4 + 5x2 − 2x3 . Increasing x2
to t, the basic variables change as

x1 (t) = 2 + 2t
x4 (t) = 1 − 3t
x5 (t) = 12 + 7t.

Hence, the maximum possible increase is to t = 1/3, and the variable leaving the basis is x4 . The
new basis is {1, 2, 5}. The current extreme point is (8/3, 1/3, 0, 0, 43/3), with value 17/3.
The corresponding tableau form can be written as

max z
4
−z + x
3 3
− 35 x4 = − 173
1
x1 − x
3 3
+ 32 x4 = 83
2
x2 − x
3 3
+ 31 x4 = 13
2
− x
3 3
+ 37 x4 + x5 = 433
x1 , . . . , x5 ≥ 0.

6
maximise z
subject to z = 17 3
+ 34 x3 − 5
x
3 4
x1 = 38 + 13 x3 − 2
x
3 4
x2 = 31 + 23 x3 − 1
x
3 4
x5 = 43 3
+ 32 x3 − 7
x
3 4
x1 , x2 , x3 , x4 , x5 ≥ 0.
Hence, the objective is z = 17
3
+ 43 x3 − 53 x4 . Therefore, we can increase the objective by increasing
x3 to some t > 0. The change in the basic variables is
8 1
x1 (t) = + t
3 3
1 2
x2 (t) = + t
3 3
43 2
x5 (t) = + t.
3 3
These remain feasible for an arbitrarily large t. Hence, with the values of x1 (t), x2 (t), and x5 (t)
as above, and x3 (t) = t, x4 (t) = 0 give a feasible solution for every t > 0, with objective value
17
3
+ 43 t → ∞.
The figure below shows the original problem in the variables x1 , x2 . The thick half-line in the
picture starting from the intersection of the boundaries of the first two constraints is precisely the
set of points
8 1 1 2
(x1 (t), x2 (t)) = ( , ) + t( , )
3 3 3 3
that we determined above.
x2
. 3

6
const

5
2

4
st.
con

3 x(t)

2
s t. 1
1 con

x1
1 2 3 4 5 6

You might also like