Sie sind auf Seite 1von 14

Homework III Solutions

ESI 5306 Operations Research

Please DO practice these questions and then compare your results with
the given solutions.

1. (15 points) Consider the following LP:

max z = 3x1 + x2
s.t. 4x1 + x2 4
2x1 + x2 4
x1 + x2 = 3
x1 , x2 0

(a) Solve the problem graphically


(b) Solve the LP using the Big M method.
(c) Identify in each step of the algorithm the basic solution, indicate if it is fea-
sible, state the objective function value and plot the point in the graph.
(d) Is the problem unbounded, infeasible, does it has a unique optimal solution
or alternative optimal solutions?

SOLUTION:

(a) Optimal solution is D (1, 2), which is shown in the following figure,

1
(b,c) The LP standard form is as follows,

max z = 3x1 + x2
s.t. 4x1 + x2 e1 = 4
2x1 + x2 + s2 = 4
x1 + x2 = 3
x1 , x2 , e1 , s2 0

We need to add artificial variable to row 1 and row 3 (in order to have an
identity matrix in the initial tableau), and penalties on these variables, and
then the new formulation is as follows,

2
max z = 3 x1 + x 2 Ma1 Ma3
s.t. 4 x1 + x 2 e1 + a1 = 4
2 x1 + x 2 + s 2 = 4
x1 + x 2 + a 3 = 3
x1 , x 2 , e1 , s 2 , a1 , a 3 0

z x1 x2 e1 s2 a1 a3 RHS BVs
1 -3 -1 0 0 M M
0 4 1 -1 0 1 0 4
0 2 1 0 1 0 0 4
0 1 1 0 0 0 1 3

z x1 x2 e1 s2 a1 a3 RHS BVs
1 -5M-3 -2M-1 M 0 0 0 -7M
0 4 1 -1 0 1 0 4 a1=4
0 2 1 0 1 0 0 4 s2=4
0 1 1 0 0 0 1 3 a3=3

Basic solution is x1=0, x2=0, but is infeasible (point A)

x1 enters the basis and a1 leaves

z x1 x2 e1 s2 a1 a3 RHS BVs
1 0 (-3M-1)/4 (-M-3)/4 0 (5M+3)/4 0 -2M+3
0 1 1/4 -1/4 0 1/4 0 1 x1=1
0 0 1/2 1/2 1 -1/2 0 2 s2=2
0 0 3/4 1/4 0 -1/4 1 2 a3=2

Basic solution is x1=1, x2=0, but is infeasible (point B)

x2 enters the basis and a3 leaves

z x1 x2 e1 s2 a1 a3 RHS BVs
1 0 0 -2/3 0 M+2/3 M+1/3 11/3
0 1 0 -1/3 0 1/3 -1/3 1/3 x1=1/3
0 0 0 1/3 1 -1/3 -2/3 2/3 s2=2/3
0 0 1 1/3 0 -1/3 4/3 8/3 x2=8/3

Basic solution is x1=1/3, x2=8/3, but is feasible (point C), objective value is 11/3.

e1 enters the basis and s2 leaves

z x1 x2 e1 s2 a1 a3 RHS BVs
1 0 0 0 2 M M-1 5
0 1 0 0 1 0 -1 1 x1=1
0 0 0 1 3 -1 -2 2 e1=2
0 0 1 0 -1 0 2 2 x2=2

Basic solution is x1 = 1, x2 = 2, it is feasible (point D), objective function 4


value is 5.
(d) The problem is feasible and it has a unique optimal solution (1, 2, 2, 0).

3
2. (15 points) Consider the following LP:

min z = 4x1 + 4x2 + x3


s.t. x1 + x2 + x3 2
2x1 + x2 3
2x1 + x2 + 3x3 3
x1 , x2 , x3 0

(a) Solve the LP using the Big M method.


(b) Is the problem infeasible?

SOLUTION:

(a) The LP standard form is as follows,

4
Basic solution is x1=1, x2=2, it is feasible (point D), objective function value is 5.

d) The problem is feasible and it has a unique optimal solution (1, 2, 2, 0)

Problem 4.

a) LP in standard form:

min z = 4 x1 + 4 x 2 + x3
s.t. x1 + x 2 + x3 + s1 = 2
2 x1 + x 2 + s 2 = 3
2 x1 + x 2 + 3 x3 e3 = 3
x1 , x 2 , s1 , s 2 , e3 0

We will add artificial variables to row 3 and will change objective function:

min z = 4 x1 + 4 x 2 + x3 + Ma3
s.t. x1 + x 2 + x3 + s1 = 2
2 x1 + x 2 + s 2 = 3
2 x1 + x 2 + 3 x3 e3 + a 3 = 3
x1 , x 2 , s1 , s 2 , e3 , a 3 0

z x1 x2 x3 s1 s2 e3 a3 RHS BVs
1 -4 -4 -1 0 0 0 -M
0 1 1 1 1 0 0 0 2
0 2 1 0 0 1 0 0 3
0 2 1 3 0 0 -1 1 3

z x1 x2 x3 s1 s2 e3 a3 RHS BVs
1 2M-4 M-4 3M-1 0 0 -M 0 3M
0 1 1 1 1 0 0 0 2 s1=2
0 2 1 0 0 1 0 0 3 s2=3
0 2 1 3 0 0 -1 1 3 a3=3

x3 enters the basis and a3 leaves

z x1 x2 x3 s1 s2 e3 a3 RHS BVs
1 -10/3 -11/3 0 0 0 -1/3 -M+1 1
0 1/3 2/3 0 1 0 1/3 -1/3 1 s1=1
0 2 1 0 0 1 0 0 3 s2=3
0 2/3 1/3 1 0 0 -1/3 1/3 1 x3=1

This tableau is optimal, because all variables in row 0 have nonpositive coefficients.

(b) The problem is feasible, the optimal solution is (0, 0, 1, 1, 3, 0) and objective5
value is 1.

3. (15 points) Consider the following LP:

max z = x1 + 2x2
s.t. x1 + x2 2
2x1 + x2 1
x1 , x2 0

(a) Solve the LP graphically.


(b) Solve the LP using the Simplex Method.
(c) Argue with the final tableau that the LP is unboundend.

5
(d) Derive a direction of unboundedness from the final tableau.

SOLUTION:

(a) The problem is unbounded as is shown in the following figure.

(b) The LP standard form is as follows,

max z = x1 + 2x2
s.t. x1 + x2 + s1 = 2
2x1 + x2 + s2 = 1
x1 , x2 , s1 , s2 0

6
z x1 x2 s1 s2 RHS BVs
1 -1 -2 0 0 0
0 -1 1 1 0 2 s1=2
0 -2 1 0 1 1 s2=1

x2 enters the basis and s2 leaves

z x1 x2 s1 s2 RHS BVs
1 -5 0 0 2 2
0 1 0 1 -1 1 s1=1
0 -2 1 0 1 1 x2=1

x1 enters the basis and s1 leaves

z x1 x2 s1 s2 RHS BVs
1 0 0 5 -3 7
0 1 0 1 -1 1 x1=1
0 0 1 2 -1 3 x2=3

(c) This problem is unbounded because we have enter the variable s2 to the basis
according row 0, but ratio test fails because we get negative values.
(d) According the last tableau if we increase the variable s2 as possible, we always
satisfy constraints. We get two equalities:

x1 = 1 + s 2

x2 = 3 + s 2
This means that increasing variable s2 by one we increase variable x1 and x2
by one. Therefore, the direction is (1, 1).

4. (15 points) Consider the following LP:

max z = 5x1 + 3x2


s.t. 4x1 + 2x2 12
4x1 + x2 10
x1 + x2 4
x1 , x2 0

(a) Solve the LP graphically.


(b) Solve the LP using the Simplex Method.
(c) Identify all basic feasible solutions corresponding to each tableau of the Sim-
plex Method and find the corresponding point in the graph.
(d) Is the LP degenerate? Why?
(e) Is the LP unboundend, does it have multiple optimal solutions or is the opti-
mal solution unique? Use the final tableau to establish your answer.

7
SOLUTION:

(a)

Problem 8 (a)

(b) The standard LP form is as follows,

8
max z = 5 x1 + 3x 2
s.t. 4 x1 + 2 x 2 + s1 = 12
4 x1 + x 2 + s 2 = 10
x1 + x 2 + s 3 = 4
x1 , x 2 , s1 , s 2 , s 3 0

z x1 x2 s1 s2 s3 RHS BVs
1 -5 -3 0 0 0 0
0 4 2 1 0 0 12 s1=12
0 4 1 0 1 0 10 s2=10
0 1 1 0 0 1 4 s3=4

x1 enters basis and s2 leaves

z x1 x2 s1 s2 s3 RHS BVs
1 0 -7/4 0 5/4 0 25/2
0 0 1 1 -1 0 2 s1=2
0 1 1/4 0 1/4 0 5/2 x1=5/2
0 0 3/4 0 -1/4 1 3/2 s3=3/2

x2 enters basis and s1 leaves

z x1 x2 s1 s2 s3 RHS BVs
1 0 0 7/4 -1/2 0 16
0 0 1 1 -1 0 2 x2=2
0 1 0 -1/4 1/2 0 2 x1=2
0 0 0 -3/4 1/2 1 0 s3=0

s2 enters basis and s3 leaves

z x1 x2 s1 s2 s3 RHS BVs
1 0 0 1 0 0 16
0 0 1 -1/2 0 2 2 x2=2
0 1 0 1/2 0 -1 2 x1=2
0 0 0 -3/2 1 2 0 s2=0

(c) Basic feasible solutions: A (0, 0, 12, 10, 4); B (2.5, 0, 2, 0, 1.5); C (2, 2, 0, 0,
0)
(d) Yes, because one of the basic variable in optimal solution equals to zero.
(e) LP is not unbounded. It has unique optimal solution (2, 2, 0, 0, 0).

9
5. (20 points) Consider the following LP:
max z = 3x1 + 2x2
s.t. 2x1 + x2 100
x1 + x2 80
x1 40
x1 , x2 0
In order to bring the problem into standard form, we have to add the slack variables
s1 , s2 and s3 . The optimal tableau is given in the following table:

z x1 x2 s1 s2 s3 RHS Basic Variable


1 0 0 1 1 0 180 z = 180
0 1 0 1 -1 0 20 x1 = 20
0 0 1 -1 2 0 60 x2 = 60
0 0 0 -1 1 1 20 s3 = 20

(a) Show that as long as the objective function coefficient of variable x1 is between
2 and 4, the current basis remains optimal. Find the optimal solution if the
objective function coefficient of variable x1 has value 3.5.
(b) Show that as long as the objective function coefficient of variable x2 is between
1.5 and 3, the current basis remains optimal.
(c) Show that if the RHS of the first constraint varies between 80 and 120, then
the current basis remains optimal. Find the new optimal solution if the RHS
of the first constraint changes to 90.
(d) Another variable x3 is added to the LP. The coefficient of x3 in the first
constraint is 1, in the second constraint is 2 and in the third constraint is 0.
What is the optimal solution if the objective function coefficient is 3.5?

SOLUTION:

(a) By adding a new top row and a new left most column, the tableau is as follows,
d1 d2 0 0 0
Basic z x1 x2 s1 s2 s3 RHS
0 z 1 0 0 1 1 0 180
d1 x1 0 1 0 1 -1 0 20
d2 x2 0 0 1 -1 2 0 60
0 s3 0 0 0 -1 1 1 20
Now, to compute the new entries of the Z-row in the optimal tableau, multiply
the elements of its column by the corresponding elements in the leftmost
column, add them up, and subtract the top row elements from the sum. The
new element in the z-row is as follows,

10
Basic z x1 x2 s1 s2 s3 RHS
z 1 0 0 1 + d1 d2 1 d1 + 2d2 0 180 + 20d1 + 60d2
Then, in order to keep optimality, we need to let the entries corresponding to
the variables in the Z-row stay nonnegative. If we are allowed to change the
coefficient of x1 by d1 individually, we need to have

1 + d1 0

1 d1 0
which means that 1 d1 1, and it is equivalent to have the coefficient
between 2 and 4. When the coefficient equals to 3.5, and then d1 = 1/2 and
objective value is 190.
(b) If we are allowed to change the coefficient of x2 by d2 individually, we need
to have
1 d1 0
1 + 2d1 0
which means that 1/2 d1 1, and it is equivalent to have the coefficient
between 1.5 and 3.
(c) If we are allowed to change the right hand side of the first constraint by D.
We will have the new solution as follows (How? Write the coefficients back
into equations),

(x1 , x2 , s3 ) = (20 + D, 60 D, 20 D)

In order to keep all of the elements to be nonnegative, 20 D 20. If D =


10, the new solution is (x1 , x2 , s3 ) = (20 + D, 60 D, 20 D) = (10, 70, 30),
which gives the optimal objective value 170 (plugging in the new solution in
the objective function).

6. (10 points) Find the Dual of the following LP

max z = 4x1 x2 + 2x3


s.t. x1 + x2 5
2x1 + x2 7
2x2 + x3 6
x1 + x3 = 4
x1 0, x2 , x3 unrestricted

SOLUTION:

11
The Dual of the above LP is as follows,
max w = 5y1 + 7y2 + 6y3 + 4y4
s.t. y1 + 2y2 + y4 4
y1 + y2 + 2y3 = 1
y3 + y4 = 2
y1 , y2 0, y3 0, y4 unrestricted

7. (15 points) Consider the following LP:


max z = 3x1 + 4x2 + x3 + 5x4
s.t. x1 + 2x2 + x3 + 2x4 5
2x1 + 3x2 + x3 + 3x4 8
x1 , x2 , x3 , x4 0

(a) Find the Dual of the LP.


(b) Compute the optimal solution of the Dual (e.g. via Simplex Method, graphi-
cally, or via observation).
(c) Find the primal solution using Complementary Slackness.

SOLUTION:

(a) The dual is as follows,


min w = 5y1 + 8y2
s.t. y1 + 2y2 3,
2y1 + 3y2 4,
y1 + y2 1,
2y1 + 3y2 5,
y1 , y2 0.

(b) It is easy to see that constraints, 2y1 + 3y2 4 and y1 + y2 1 are redundant,
the easiest way to solve it might be graphical method, which give us the
optimal solution (y1 , y2 ) = (1, 1).
(c) First, we write out the complementarity slackness,
(x1 + 2x2 + x3 + 2x4 5)y1 = 0,
(2x1 + 3x2 + x3 + 3x4 8)y1 = 0,
(y1 + 2y2 3)x1 = 0,
(2y1 + 3y2 4)x2 = 0,
(y1 + y2 1)x3 = 0,
(2y1 + 3y2 5)x4 = 0.

12
Then we can plug in the optimal values of y1 and y2 , and then we have the
following,
(x1 + 2x2 + x3 + 2x4 5) = 0,
(2x1 + 3x2 + x3 + 3x4 8) = 0,
x2 = 0,
x3 = 0.
Then we solve the above equation, which gives the optimal solution of the
primal problem (x1 , x2 , x3 , x4 ) = (1, 0, 0, 2).
8. (15 points) Consider the following LP
P: max zP = 3x1 + x2 + 2x3
s.t. x2 + 2x3 3,
x1 + 3x3 1,
2x1 3x2 2,
x1 , x2 , x3 0.

(a) Find the dual of the LP.


(b) Show that the dual and the primal have the same feasible region.
(c) Use Weak & Strong Duality to show that the optimal objective function value
for the LP and its dual must be 0.

SOLUTION:

(a) The dual is as follows,


D: min zD = 3y1 y2 2y3
s.t. y2 2y3 3,
y1 3y3 1,
2y1 + 3y2 2,
y1 , y2 , y3 0.

(b) By multiplying 1 on both sides of the constraints in the above problem,


(remember that multiplying negative number on inequality and the inequality
sign will change direction), we can get the new dual problem as follows,
D: min zD = 3y1 y2 2y3
s.t. y2 + 2y3 3,
y1 + 3y3 1,
2y1 3y2 2,
y1 , y2 , y3 0.

13
Hence, we can conclude the primal and dual have the same feasible region.
(c) Because they have the same feasible region and opposite objective functions,

zP (x) = zD (x), x F R,

where F R denotes the shared feasible region. By weak duality, zP zD , we


have
zP 0 zD .
By strong duality, we conclude that the optimal objective function value of
both primal and dual are 0.

14

Das könnte Ihnen auch gefallen