Вы находитесь на странице: 1из 4

Math 3300

Assignment #3

Solutions

Problem 1 (2 marks)
Use the simplex algorithm to find the optimal solution to the following LP.
min z = x1 x2
s.t.
x1 x2 1
x1 + x2 2
x1 , x2 0
Solution
First convert LP to standard form:

The initial tableau is the following:

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

z x1 x2 s1 s2 rhs
BV
1 1
1 0 0
0 z=0
0 1 1 1 0
1 s1 = 1
0 1
1 0 1
2 s2 = 2
The coecients for x1 and x2 are equal, so we can pick either one to enter the basis. Choosing x1
we get the following simplex tableaus:
z x1 x2 s1 s2 rhs
BV
Ratio
1
1
1 0 0
0 z=0
#
0 1 1 1 0
1 s1 = 1
1
0
1
1 0 1
2 s2 = 2
2
z x1 x2 s1 s2 rhs
BV
Ratio
1 0
2 1 0 1 z = 1
0 1 1
1 0
1 x1 = 1
#
1
0 0 2 1 1
1 s2 = 1
2
z x1 x2 s1 s2 rhs
BV
1 0 0
0 1 2 z = 2
1
1
3
0 1 0
x1 = 32
2
2
2
1
1
1
0 0 1 2
x2 = 12
2
2

This tableau is optimal (there are no positive coecients in row 0). Thus, the optimal solution is
z = 2, x1 = 32 , x2 = 12 , s1 = 0, and s2 = 0.
If we had initially chosen x2 to enter the basis at the first step, we would have gotten the following
sequence of tableaus:
z x1 x2 s1 s2 rhs
BV
Ratio
1 1
1 0 0
0 z=0
0 1 1 1 0
1 s1 = 1
#
2 s2 = 2
2
0 1 1 0 1

Math 3300

Assignment #3

Solutions

z x1 x2 s1 s2 rhs
BV
1 0 0 0 1 2 z = 2
0 2 0 1
1
3 s1 = 3
2 x2 = 2
0 1 1 0
1
This tableau is optimal (there are no positive coecients in row 0). Thus, the optimal solution is
z = 2, x1 = 0, x2 = 2, s1 = 3, and s2 = 0.
Hence, there are multiple optimal solutions to this problem. (Note that a nonbasic variable has a
0 coecient in row 0 of each optimal tableau.)
Problem 2 (5 marks)
Use the simplex algorithm to find two optimal solutions to the following LP. Find a third optimal
solution without using the simplex algorithm.
max z = 5x1 + 3x2 + x3
s.t.
x1 + x2 + 3x3 6
5x1 + 3x2 + 6x3 15
x1 , x2 , x3 0
Solution
Applying the simplex algorithm we obtain the following sequence of tableaus:
BV
Ratio
z x1 x2 x3 s1 s2 rhs
1 5 3 1 0 0
0 z=0
0
1
1
3 1 0
6 s1 = 6
6
#
0 5 3
6 0 1 15 s2 = 15
3
z x1 x2 x3 s1 s2 rhs
BV
1 0 0 5 0
1 15 z = 15
2
9
0 0 5
1 15 3 s1 = 3
5
6
1
0 1 35
0
3 x1 = 3
5
5

This tableau is optimal; the solution is z = 15, x1 = 3, x2 = 0, and x3 = 0. (We also have s1 = 3
and s2 = 0.)
To find a second optimal solution, note that in the optimal tableau above the nonbasic variable x2
has a coecient of 0 in row 0. So we pivot x2 into the basis.
z x1 x2 x3 s1 s2 rhs
BV
Ratio
1 0
0 5 0
1 15 z = 15
9
2
1
0 0 5# 5 1 5
3 s1 = 3
6
6
3
1
0 1 5
0
3 x1 = 3
3
5
5

z x1 x2 x3 s1 s2 rhs
BV
1
0 0 5 0
1 15 z = 15
2
0 5
0 1 1 13
1 s1 = 1
5
1
1 2 0
5 x2 = 5
0
3
3
2

Math 3300

Assignment #3

Solutions

All nonbasic variables have positive coecients in row 0 of this tableau. Thus, the second optimal
solution is z = 15, x1 = 0, x2 = 5, and x3 = 0. (Also, s1 = 1 and s2 = 0.)
and x
represent the two solutions found above, where
To find a third solution, let x


3
0


= 0 ,
= 5 .
x
x
0
0

Then for any 0 1,


x + (1 )
x is also a solution. If we take = 0.5, then a third solution
is



3
3
0

2
0.5 0 + 0.5 5 = 52
0
0
0
That is, a third solution is x1 = 32 , x2 = 52 , and x3 = 0.

Problem 3 (8 marks)
Suppose we have obtained the tableau in the table below for a maximization problem. State the
conditions on a1 , a2 , a3 , b, c1 , and c2 that are required to make the following statements true:
(a)
(b)
(c)
(d)

The current solution is optimal, and there are alternative optimal solutions.
The current basic solution is not a basic feasible solution.
The current basic solution is feasible, but the LP is unbounded.
The current basic solution is feasible, but the objective function value can be improved by
replacing x6 as a basic variable with x1 .
z x1 x2 x3 x4 x5 x6 rhs
1 c1 c2 0 0
0 0 10
0
4 a1 1 0 a2 0
b
0 1 5 0 1 1 0
2
0 a3 3 0 0 4 1
3

Solution
(a) b 0 is necessary for the solution to be feasible. If c1 = 0 and c2 0, we can pivot in x1 to
obtain an alternative optimum. Likewise, if c2 = 0, c1 0, and a1 > 0, we can pivot in x2 to obtain
an alternative optimum. And lastly, if c1 0, c2 0, and a2 > 0, we can pivot in x5 to obtain an
alternative optimum.
(b) The current basic solution is not feasible if b < 0.
(c) The current basic solution is feasible if b 0. If c2 < 0 and a1 0, the LP is unbounded (since
we can make x2 as large as desired).
(d) b 0 is necessary for the solution to be feasible. For x1 to improve the objective function, we
need c1 < 0. (this ensures that increasing x1 will increase z), For x1 to replace x6 , we need row 3
to win the ratio test, which requires a33 4b .
3

Math 3300

Assignment #3

Solutions

Problem 4 (10 marks)


During each 6-hour period of the day, the Bloomington Police Department needs at least the number
of policemen shown in the table below. Policemen can be hired to work either 12 consecutive hours
or 18 consecutive hours. Policemen are paid $4 per hour for each of the first 12 hours a day they
work and are paid $6 per hour for each of the next 6 hours they work in a day. Formulate an LP
that can be used to minimize the cost of meeting Bloomingtons daily police requirements.
Time Period
12am 6am
6am 12pm
12pm 6pm
6pm 12am

Number of Policemen
Required
12
8
6
15

Solution
We denote the time period 12am 6am as shift 1, 6am 12pm as shift 2, 12pm 6pm as shift 3,
and 6pm 12am as shift 4. Let xi = the number of policemen who work for 12 hours and begin
during shift i, yi = the number of policemen who work for 18 hours and begin during shift i.
Bloomingtons objective is to minimize cost. The policemen who work for 12 hours get paid
$4/hr 12 hr = $48,
while those who work for 18 hours get paid
$48 + $6/hr 6 hr = $84.
The total number of policemen who work 12 hours during a day is x1 + x2 + x3 + x4 , while
y1 + y2 + y3 + y4 policemen work for 18 hours. Thus, the total cost involved is
48(x1 + x2 + x3 + x4 ) + 84(y1 + y2 + y3 + y4 )
The policemen who work during shift 1 obviously includes those who start work during that shift
(x1 and y1 ), but it also includes those who start during shift 4 and work for 12 hours (x4 ), and those
who start during shifts 3 and 4 and work for 18 hours (y3 and y4 ). Therefore, to meet requirement
1 we must have
x1 + x4 + y1 + y3 + y4 12.
Applying similar reasoning to the other shifts gives the remaining constraints.
Hence, the LP is:
min z = 48(x1 + x2 + x3 + x4 ) + 84(y1 + y2 + y3 + y4 )
s.t.
x1 + x4 + y1 + y3 + y4 12
x1 + x2 + y1 + y2 + y4 8
x2 + x3 + y1 + y2 + y3 6
x3 + x4 + y2 + y3 + y4 15
x1 , x2 , x3 , x4 , y1 , y2 , y3 , y4 0
4

Вам также может понравиться