Download Exam 5

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Law of large numbers wikipedia , lookup

Addition wikipedia , lookup

Location arithmetic wikipedia , lookup

Transcript
Math 151 Linear Programming Example 5
A chair company makes two types of wooden chairs. The Classic style chair requires 10 minutes
of sanding, 30 minutes of staining, and 40 minutes of varnishing. The Contemporary style chair
requires 20 minutes of sanding, 20 minutes of staining, and 10 minutes of varnishing. Each day
the sanding facilities are available at most 140 minutes, the staining facilities are available at
most 220 minutes, and the varnishing facilities are available at most 260 minutes. Use the
simplex method to find out how many of each type of chair should be made in order to
maximize the profit if the profit is:
a) $50 on each Classic chair and $30 on each contemporary chair?
b) $50 on each Classic chair and $50 on each contemporary chair?
c) $30 on each Classic chair and $20 on each contemporary chair?
a) Answer.
Step 1. Translate the problem into algebra.
Let x = number of Classic chairs. Let y = number of Contemporary chairs. Let z = profit.
Maximize:
z = 50x + 30y
(profit)
Subject to:
10x + 20y  140
30x + 20y  220
40x + 10y  260
x0
y0
(sanding)
(staining)
(varnishing)
(implied)
(implied)
Step 2. Rewrite the objective in general form (with all variables on the left side of equal sign).
Also rewrite the constraints using slack variables and equations instead of inequalities.
Let u = unused sanding time. Let v = unused staining time. Let w = unused varnishing time.
Objective:
 50x  30y + z = 0
Subject to:
10x + 20y + u = 140 (sanding)
30x + 20y + v = 220 (staining)
40x + 10y + w = 260 (varnishing)
x0
(implied)
y0
(implied)
u0
(implied)
v0
(implied)
w0
(implied)
(maximize profit z)
Math 151 Linear Programming Example 5(a)
page two
Step 3. Write the matrix for the above system of equations (not including the implied
constraints).
y
 x

z   50  30
u  10
20

v  30
20
w  40
10
u v
w z
0 0
0
1
1 0
0
0
0 1
0
0
0 0
1
0


0 
140 

220 
260 
Step 4. Label the columns with the names of the variables from which the coefficients
(numbers) came. Label the first row with the objective variable and remaining rows with the
appropriate slack variables as shown above. On the steps that follow the labels on these last
three rows may change but the column labels and the label on the first row will remain the same.
Step 5. Put an arrow over the column variable with the lowest negative number in the first row.
This variable is the entering variable. Its column is the pivot column. Then divide numbers
(except the first number) of the last column by corresponding numbers of the pivot column.
Then put an arrow next to the row variable with the lowest positive quotient. This is the
departing variable. Its row is the pivot row. Finally circle the number that is in both the pivot
column and pivot row. This number is called the pivot entry.
 

y
 x

z  50  30

u  10
20

v 30
20


 w  40  10



0 

140  14

220  7 13
260  6 1 2
5.
u v w z
0 0
0
1
1 0
0
0
0 1
0
0
0 0
1
0
a  
6.
z
u
v

x


y
 x
  50  30

20
 10

20
 30
 1 1 4

u v
w
z
0 0
0
1
1 0
0
0
0 1
0
0
0 0 1 40 0



0 

140 

220 
13 2 
Step 6. (a) Divide the pivot row by the pivot entry to get a new pivot row. Relabel this row
with the name of the entering variable. See above.
(b) Get a new first row by multiplying the pivot row by the negative of the number in the
pivot column of the first row and adding it to the current first row. See below.
(b)
(c )
 50
 30
0 0
50
25 2
0 0 5 4 0 325


0
 
0

1

0

 35 2 0 0 5 4 1 325
10
20
1
0
0
0
140
 10  5 2 0 0  1 4 0  65


0
35 2
 
1


0 1 4 0

75
(c) Get a new second row by multiplying the pivot row by the negative of the number in
the pivot column of the second row and adding it to the current second row. See above.
Math 151 Linear Programming Example 5(a)
page three
(d) Get a new third row by multiplying the pivot row by the negative of the number in
the pivot column of the third row and adding it to the current third row.
e  x
(d )
30
20
0 1
 30  15 2 0


0
25 2
0
0
z
220
0  3 4 0  195
 

u


v
0 1 3 4 0
25
x
y

 0  35 2
 0 35 2

 0 25 2
1
14

u v
w
z
0 0
54
1
1 0
1 4 0


325 
75 

25 
13 2 
0 1 3 4 0
0 0
1 40
0
(e) Put the new rows together to form the new matrix.
Step 7. We repeat steps 5 and 6 above until there are no negative numbers in the first row.
i.e. Put an arrow over the column variable with the lowest negative number in the first row.
This variable is the entering variable. Its column is the pivot column. Then divide numbers
(except the first number) of the last column by corresponding numbers of the pivot column.
Then put an arrow next to the row variable with the lowest positive quotient. This is the
departing variable. Its row is the pivot row. Finally circle the number that is in both the pivot
column and pivot row. This number is called the pivot entry.



x
y


z 0  35 2

u  0 35 2
 v  0 25 2 

x  1
14
7.
u v
w
z
0 0
54
1
1 0
1 4 0
0 1 3 4 0
0 0
1 40
0
8.



325 

75  4 2 7

25  2
13 2  26
a  
z
u

y
x


y
x
 0  35 2

 0 35 2

1
0
1
14

u
v
w
z
0
0
54
1
1
0
1 4
0



325 

75 

2 
13 2 
0 2 25  3 50 0
0
0
1 40
0
Step 8. (a) Divide the pivot row by the pivot entry to get a new pivot row. Relabel this row
with the name of the entering variable. See above.
(b) Get a new first row by multiplying the pivot row by the negative of the number in the
pivot column of the first row and adding it to the current first row. See below.
(b)
0
(c )
 35 2 0
0
54
1 325
0
35 2
1
0
0 7 5  21 20 0
35
0






0
0 75
0
0
1 7 5
0
35 2

0


15

1 360
1 4
0
75
 35 2 0  7 5 21 20 0  35




45
0
40
(c) Get a new second row by multiplying the pivot row by the negative of the number in
the pivot column of the second row and adding it to the current second row. See above.
Math 151 Linear Programming Example 5(a)
page four
(d) Get a new fourth row by multiplying the pivot row by the negative of the number in
the pivot column of the fourth row and adding it to the current fourth row.
e   x
(d )
0
 1 4 0  1 50 3 200 0  1 2
z
1
14
0
0
1 40
0 13 2
u







y
1
0
0  1 50
1 25
0
6
x

0
0

0
1

y u
v
w
z
0 0
75
15
1
0 1
7 5
45
0
1
2 25
0
0 0  1 50
 3 50 0
1 25
0


360 
40 

2 
6 
(e) Put the new rows together to form the new matrix.
Step 9. Since the z row contains no negative numbers, we are finished doing row operations. In
our final matrix, the variables z, u, y, and x are considered explicit because they are listed at the
beginning of rows. Their values are 360, 40, 2, and 6 respectively and appear in the last
column. The variables v and w are considered implicit and have value zero because they are
not listed at the beginning of rows.
Final answer. Maximum profit of $360 occurs when 6 Classic and 2 Contemporary chairs are
made, sanding facilities have 40 minutes slack time, and the staining and varnishing facilities
have no slack time.
Optional note. We can use each new matrix to compute the value of z at a corner point by
setting the implicit variables equal to zero. Thus:
Step
3
6e
8e
Explicit (Row)
Variables
z = 0, u = 140,
v = 220, w = 260
z = 325, u = 75,
v = 25, x = 6 1 2
Implicit (Other)
Variables
x = 0, y = 0
Corner Point (x, y)
z
(0, 0)
0
v = 0, y = 0
6 12 , 0
325
z = 360, u = 40,
y = 2, x = 6
v = 0, w = 0
(6, 2)
360
Thus with the simplex method we are evaluating z at some but not all of the corner points. The
simplex method is designed so that the value of z increases on each step and stops when we
reach a maximum.
Note that the simplex method gives us only one solution even if the problem to which it is
applied actually has more than one solution.