Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Solutions
1 0
Solution: FALSE. Consider A = 0 1, b = [1, 0, 0]T and d = [0, 0, 1]T .
0 0
(d) Consider the system of equations Ax = b, where A is an m n matrix and b Rm is a vector.
Suppose there exists a vector y (of the appropriate dimension) such that y T A = 0 and y T b 6= 0.
Prove: Then Ax = b has no solution.
(Note: Such a vector y is called a certificate of infeasibility for Ax = b.)
Solution: PROOF: By way of contradiction, suppose that x satisfies Ax = b. Then, (left)
multiplying both sides by y T , we get y T Ax = y T b. Moreover, the LHS is zero, because (y T A)x =
[0, . . . , 0]x = 0, whereas the RHS is nonzero. Thus, we get a contradiction (0 = y T b 6= 0), and hence,
we conclude that there is no solution for Ax = b.
4 7 7 9
10
(e) Let A = 3 5 4 5 , and let b = 7 .
2 4 6 8
4
Use the vector y = [2, 2, 1]T to show that there is no solution for the system of equations Ax = b.
Solution: See the solution to part (d). The system Ax = b is infeasible; the vector y = [2, 2, 1]T is
a certificate of infeasibility because y T A = [0, 0, 0, 0] whereas y T b = 20 + 14 + 4 = 2 6= 0.
Marking Comments: [ TOTAL: 10 POINTS
(+2) Each question.
Zero points if no justification given.
]
1
Product
Cars
Dolls
Trains
Resources
Wood (square ft) Skilled
20
40
80
100
150
200
Wood may be purchased at a cost of $1 per square ft, and 10,000 square ft of wood are available for
purchase. A total of 5,000h of skilled labour are available (and have already been paid for).
WatWood also has the option to finish an unfinished product. The finishing process requires skilled
labour. The following table lists the number of additional hours of skilled labour needed to finish an
unfinished product, as well the selling price for each finished product:
Product
Cars
Dolls
Trains
Formulate an LP (linear program) that can be used to find a profit-maximizing production plan for
WatWood.
Solution:
Introduce variables x1 , x2 and x3 for the number of unfinished cars, dolls, and trains to be produced.
Let y1 , y2 and y3 be variables for the number of finished cars, dolls, and trains, respectively. Let w be a
variable for the total number of square ft of wood needed in production. The LP is
max
s.t.
y2 x2 ,
y3 x3
x1 , x2 , x3 , y1 , y2 , y3 , w 0
Marking Comments: [TOTAL: 10 POINTS
1. (+4) If the objective function is correct.
2. (+2)3 If each constraint (Skilled hours, amount of wood and non-negativity ) is correct.
]
Capacity (t)
120
130
140
CrudeCo has 3 customers, and each has a demand for a certain number of tons of crude oil:
Customer 1
100
Customer 2
50
Customer 3
200
The cost of shipping a ton of crude oil from an oil well to each customer is given in the following table:
Oil well
1
2
3
Customers
1 2
3
5 8 11
6 9 12
7 10 13
Formulate an LP that minimizes the cost of meeting customer demands subject to the other requirements.
Solution:
Let xij represent the amount of crude-oil shipped in tons from oil-well i {1, 2, 3} to customer j
{1, 2, 3}. The constraints are similar to the constraints of the transportation model; we have a demand
constraint for each of the three customers, and we have a capacity constraint for each of the three
oil-wells; we have the non-negativity constraints. In the objective function, we have terms for the shipping
costs (similar to the transportation model), and in addition, we have terms for the production cost at
the three oil-wells.
min
(customer demand)
(capacity)
Compact solution: We can rewrite this LP compactly by introducing notation for the data in the
problem. Let pi , i {1, 2, 3} denote the production cost at oil-well i, let ui , i {1, 2, 3} denote the
production capacity at oil-well i, let dj , j {1, 2, 3} denote the demand of customer j, and let cij , i
{1, 2, 3}, j {1, 2, 3} denote shipping cost from oil-well i to customer j. Then the LP is:
min
3
X
i=1
s.t.
3
X
i=1
3
X
3
3 X
3
X
X
pi (
xij ) +
cij xij
j=1
i=1 j=1
xij = dj ,
j {1, 2, 3}
(customer demand)
xij ui ,
i {1, 2, 3}
(capacity)
j=1
xij
0,
(1)
(2)
Cocoa-gunk:
We must add some constraints to handle the amount in storage. The amount at the end of month
j 1 plus the amount produced in month j must be equal to the amount that is sold in month j plus
what is left in storage at the end of month j. Thus,
zi,j1 + xij = zij + yij ,
(3)
We also need constraints for the initial amount in storage, and non-negativity:
zi,0 = 0 i {1, 2},
(4)
x, y, z 0
(5)
4
X
y1j + 3
j=1
4
X
y2j 0.1
j=1
2 X
4
X
zij
i=1 j=1
s.t.
(b) For each month j, j {1, 2, 3, 4}, let the variable sj denote the amount of secret ingredient that is
transformed into cocoa-gunk.
Then we have new constraints
sj 1000,
j {1, . . . , 4}.
(6)
Moreover, the resource constraints in the above LP (in part(a)) are modified as follows:
(7)
7
X
200xi .
i=1
We now need to ensure that there are enough workers for each day of the week. We start with
Mondays. A worker will work on Mondays if he starts work on Thu, Fri, Sat, Sun or Mon. Therefore
the constraint for Mondays reads as follows
x4 + x5 + x6 + x7 + x1 11
A worker will work on Tuesdays if he starts work on Fri, Sat, Sun, Mon or Tue. Therefore the
constraint for Tuesdays reads as follows
x5 + x6 + x7 + x1 + x2 12
Completing the constraints for the remaining days of the week similarly, we arrive at the following
LP
7
X
min
200xi
i=1
x4 + x5 + x6 + x7 + x1 11
st
x5 + x6 + x7 + x1 + x2 12
x6 + x7 + x1 + x2 + x3 13
x7 + x1 + x2 + x3 + x4 14
x1 + x2 + x3 + x4 + x5 5
x2 + x3 + x4 + x5 + x6 6
x3 + x4 + x5 + x6 + x7 7
x 0.
(b) Introduce additional variables wi for i {1, . . . , 7}, that denote the number of daily contract workers
who start work on day i of the week. Incorporating the cost of hiring the temp workers we obtain
the new objective function
min
7
X
200xi +
5
X
i=1
50wi +
i=1
7
X
30wi
i=6
The workers that are now working on Mondays are the following
regular workers who start work on Thu, Fri, Sat, Sun or Mon
temp workers who are hired to work on Mondays
Therefore the new constraint for Mondays becomes
x4 + x5 + x6 + x7 + x1 + w1 11
Completing the constraints for the remaining days of the week similarly, we arrive at the new LP
min
7
X
200xi +
i=1
st
5
X
i=1
50wi +
7
X
30wi
i=6
x4 + x5 + x6 + x7 + x1 + w1 11
x5 + x6 + x7 + x1 + x2 + w2 12
x6 + x7 + x1 + x2 + x3 + w3 13
x7 + x1 + x2 + x3 + x4 + w4 14
x 1 + x 2 + x 3 + x 4 + x 5 + w5 5
x2 + x3 + x4 + x5 + x6 + w6 6
x3 + x4 + x5 + x6 + x7 + w8 7
x 0.