Ex2 Sol10
Ex2 Sol10
Mean 73.925, median 76, top quartile 87, high 99, low 12.
1. (10 points) I am planning a vacation once the spring semester is over. There are many tasks
that have to be completed before I can go. Fortunately, I can get help from family and friends.
The following are the tasks that would have to be undertaken before the vacation:
C-1
A-2 2
4 E-7
1
B-3 dummy-0
F-5
D-8 5 6
3
1
9 3 4 1
75 25 100
6 1 5 0
0 75 100
25
7 8 2 1
100 100
75 75 125 25
Formulate a Balanced Transportation Problem to minimize the total cost of meeting the energy
needs. Give your formulation in terms of a cost and requirement table.
Common mistakes: Confusing Electricity supply (unlimited) and demand (20), having supply
be infinite instead of giving a large number, such as 60, forgetting to balance the problem.
4. (15 points) Consider the following Linear Programming problem:
max z = −4x1 − x2
s.t. 4x1 + 3x2 ≥6
x1 + 2x2 ≤3
3x1 + x2 =3
x1 , x2 ≥0
2
(a). What is the dual of the LP?
(b). The final tableau for the given LP is given below. e1 is the excess variable of the first constraint,
s2 the slack variable of the second constraint, and a1 , a3 the artificial variables of constraints 1,3.
The final tableau was found using the big M method. What is the optimal solution to the dual?
Make sure to state the objective value and the value of all dual variables.
z x1 x2 e1 s2 a1 a3 RHS
1 0 0 0 1/5 M M-7/5 -18/5
0 0 1 0 3/5 0 -1/5 6/5
0 1 0 0 -1/5 0 2/5 3/5
0 0 0 1 1 -1 1 0
3
The zero’s can be covered by 4 lines, for example rows 3,4,5 and col1. The smallest uncovered
element is 2, we subtract 2 from uncovered elements and add 2 to elements that are double covered:
Now we get 5 zero’s each in a different row and col: Magic Kingdom-Monday, Epcot-Thursday,
Hollywood Studios-Wednesday, Animal Kingdom-Friday and Typhoon Lagoon-Tuesday.
6. (20 points) Tiffany is planning her summer vacation, in which she will visit several different
exciting cities. She is trying to choose which cities to visit. The table below shows the number of
days she feels she must devote to each city, the cost of visiting the city and the “enjoyment” she
will get out of visiting the city:
city 1 2 3 4 5 6 7
enjoyment 17 10 15 19 7 13 9
days to visit 4 1 3 2 2 1 4
cost $170 $210 $320 $240 $500 $120 $90
Cities 2 and 3 are mutually exclusive (she should not visit both). Cities 2,4,5 each have terrific
zoo, so Tiffany insists on visiting at least one of them. City 6 is on her way to city 7 so if she visits
city 7 she should also visit city 6.
Tiffany wishes to maximize her enjoyment, however she has only 10 days and $750 to spend.
Formulate an integer programming problem. (Do NOT solve - just formulate!)
(a). Define the variables: xi = 1 if Tiffany goes to city i and 0 if not. Common mistake: Let xi be
city i.
(b). What is the objective function? (Max or Min?)
max z = 17x1 + 10x2 + 15x3 + 19x4 + 7x5 + 13x6 + 9x7
(c). What are the constraints?
4
0 days 1 day 2 days
Magic Kingdom 0 3 5
Epcot 0 1 2
Hollywood studios 0 3 4
Animal Kingdom 0 2 2
To solve the problem using Dynamic Programming define fi (s) = the maximum fun achievable in
stages i and above and number of days s. We let Magic Kingdom be stage 1, Epcot stage 2 etc.
f4 (0) = 0, f4 (1) = 2, f4 (2) = f4 (3) = f4 (4) = 2, f3 (0) = 0, f3 (1) = max{0 + 2, 3 + 0} = 3,
f3 (2) = max{0 + 2, 3 + 3, 4 + 0} = 5,f3 (3) = f3 (4) = max{0 + 2, 3 + 2, 4 + 2} = 6, f2 (0) = 0,
f2 (1) = max{0+3, 1+0} = 3, f2 (2) = max{0+5, 1+3, 2+0} = 5, f2 (3) = max{0+6, 1+5, 2+3} = 6,
f2 (4) = max{0 + 6, 1 + 6, 2 + 5} = 7,
f1 (4) = max{0 + 7, 3 + 6, 5 + 5, } = 10,
2 days in Magic Kingdom, 0 days in Epcot and 1 day each in Hollywood Studios and Animal
Kingdom.
Common mistake: Calculating f1 (2) instead of 4. Giving an answer with no (or incorrect) work.