MATH 373 Section A1 Final Exam Dr. J. Bowman 17 December 2018 14:00 17:00 Name (Last, First): Student ID: Email: @ualberta.ca Scrap paper is supplied. No notes or books are permitted. All electronic equipment, including calculators, is prohibited. Make certain that cell phones are turned off. Check that you have 8 pages. This exam consists of 5 questions, for a total of 25 points. If anything is unclear, please ask!
1. Consider the linear programming problem minimize x 1 + 2x 2 subject to x 1 + x 2 1, 2x 1 + 3x 2 2, x 1 2x 2 2, x 1, x 2 0. (a) Without using the simplex method, show that the problem must have an optimal solution. It is easy to find a feasible solution, such as x = (0, 0). The optimal cost is seen to be bounded since the first inequality implies that x 1 1, so that x 1 + 2x 2 1. Since the problem is neither infeasible nor unbounded, it must have an optimal solution. (b) Put this problem into standard form. For convenience, we first multiply the third constraint by 1 and then put the problem into standard form: 1 1 minimize x 1 + 2x 2 subject to x 1 + x 2 + x 3 = 1, 2x 1 + 3x 2 + x 4 = 2, x 1 + 2x 2 + x 5 = 2, x 1, x 2, x 3, x 4, x 5 0. (c) Use the simplex method to find an optimal solution and the optimal value for this problem. Starting from the obvious basic solution (0, 0, 1, 2, 2), with B(1) = 3, B(2) = 4, B(3) = 5, and the identity basis matrix, we perform one iteration of the simplex method: 2 x 1 x 2 x 3 x 4 x 5 0 1 2 0 0 0 x 3 = 1 1 1 1 0 0 x 4 = 2 2 3 0 1 0 x 5 = 2 1 2 0 0 1 x 1 x 2 x 3 x 4 x 5 1 0 3 1 0 0 x 1 = 1 1 1 1 0 0 x 4 = 0 0 1 2 1 0 x 5 = 3 0 3 1 0 1 An optimal solution is thus (1, 0, 0, 0, 3), which corresponds to the solution x = (1, 0) of the original problem, with optimal cost 1.
(d) Is your optimal solution degenerate? Justify your answer. The optimal solution is degenerate since the basic variable x 4 is 0. Alternatively, in the original problem, we see that there are two variables but three active constraints (including x 2 = 0). (e) Verify that the complementary slackness conditions hold for your optimal solution. The dual problem is 1 2 minimize p 1 + 2p 2 2p 3 subject to p 1 + 2p 2 + p 3 1, p 1 + 3p 2 2p 3 2, p 1 0, p 2 0, p 3 0. Since the third primal constraint isn t active, we require p 3 = 0. Also, since x 1 0, the first dual constraint must be active: p 1 + 2p 2 = 1. For example, we could take p 1 = 0 and p 2 = 1/2, so that 3p 2 = 3/2 < 2. Thus, x = (1, 0) and p = (0, 1/2, 0) are feasible solutions to the primal and dual problems, respectively, that satisfy the complementary slackness conditions. They are therefore both optimal solutions.
2. Use an appropriate version of Farkas lemma to determine whether or not the following system of inequalities is consistent: Consider the primal and dual problems x 1 + 2x 2 x 3 9, 2x 1 x 2 + x 3 5, x 1 0, x 3 0. 3 maximize 0 x subject to x 1 + 2x 2 x 3 9, 2x 1 x 2 + x 3 5, x 1 0, x 3 0. minimize 9p 1 5p 2 subject to p 1 + 2p 2 0, 2p 1 p 2 = 0, p 1 + p 2 0, p 1, p 2 0. From the second dual constraint we see that p 2 = 2p 1. The other constraints are then 5p 1 0 and p 1 0. The dual cost reduces to p 1, which approaches as p 1. The dual problem is thus unbounded, which means that the primal problem is infeasible. That is, the original constraints are inconsistent.
3. The number of servers required at a 24-hour truck stop during each four-hour time interval is given in the following table: 03:00-07:00 07:00-11:00 11:00-15:00 15:00-19:00 19:00-23:00 23:00-03:00 2 10 14 8 10 3 The servers report for duty at the beginning of one of these time intervals and their shifts last eight hours (two time intervals). Let x i be the number of servers who start their shift at the beginning of the ith time interval, where i = 1,..., 6. Use the complementary slackness theorem to prove that x = (0, 14, 0, 8, 2, 2) is a feasible solution that minimizes the total number of servers required each day. The linear programming problem is 4 minimize x 1 + x 2 + x 3 + x 4 + x 5 + x 6 subject to x 1 + x 6 2, x 1 + x 2 10, x 2 + x 3 14, x 3 + x 4 8, x 4 + x 5 10, x 5 + x 6 3, x 1, x 2, x 3, x 4, x 5, x 6 0. The dual problem is maximize 2p 1 + 10p 2 + 14p 3 + 8p 4 + 10p 5 + 3p 6 subject to p 1 + p 2 1, p 2 + p 3 1, p 3 + p 4 1, p 4 + p 5 1, p 5 + p 6 1, p 1 + p 6 1, p 1, p 2, p 3, p 4, p 5, p 6 0. For the primary problem, we see that all constraints are satisfied but the second and sixth constraints are not active. Complementary slackness then requires that p 2 = p 6 = 0. For the dual problem, we see that the second, fourth, fifth, and sixth constraint must be active (because the corresponding x i is nonzero). Thus p 3 = 1, p 4 + p 5 = 1, p 5 = 1, p 1 = 1. We deduce that p 4 = 0 and observe that the dual solution p = (1, 0, 1, 0, 1, 0) also satisfies the remaining first and third constraints and so is feasible. Since the complementary slackness conditions are satisfied, we know that both the primal and dual solutions are optimal.
4. If a general linear programming problem in standard form has a non-degenerate basic feasible solution that is optimal, prove that the dual problem has a unique optimal solution. Hint: consider complementary slackness. Let x be a non-degenerate basic optimal solution to the primal problem. Since the primal problem has an optimal solution, the dual has an optimal solution p. Let B(1),..., B(m) be a set of basic indices corresponding to x and consider the complementary slackness condition 4 (c j p A j )x j = 0, j = B(1),..., B(m). Since x is nondegenerate, we know that x j > 0 for each basic variable x j, so that c j = p A j, j = B(1),..., B(m). The is just the system of equations c B = p B, which has a unique solution p = c B B 1 since the basis B = {A j : j = B(1),..., B(m)} is invertible.
5. A breakfast cereal is required to contain at least 10% protein and not more than 70% carbohydrate by weight. The manufacturer wants to blend four grains G 1, G 2, G 3, and G 4 to achieve these requirements. The nutrient content of the grains per weight is given in the following chart: G 1 G 2 G 3 G 4 % carbohydrate 80 80 70 60 % protein 5 15 20 25 cost (cents per kg) 40 80 120 160 (a) Use the simplex method to determine what weight of each grain the manufacturer should use in order to minimize the overall cost to produce 1kg of cereal. What is the minimal cost? Use units of cents and kilograms. Hint: to find a basic feasible solution, first use the equality constraint to express the weight of grain G 4 in terms of the others weights. This allows you to eliminate one variable (the weight of grain G 4 in one kilogram of the cereal) and also one constraint, greatly simplifying the problem! Let x i be the weight of grain G i in 1 kg of cereal. The linear programming problem is 6 minimize 40x 1 + 80x 2 + 120x 3 + 160x 4 subject to 80x 1 + 80x 2 + 70x 3 + 60x 4 70, 5x 1 + 15x 2 + 20x 3 + 25x 4 10, x 1 + x 2 + x 3 + x 4 = 1, x 1, x 2, x 3, x 4 0. We first use the equality constraint to eliminate x 4 = 1 x 1 x 2 x 3. For example, the cost can be expressed as (40 160)x 1 + (80 160)x 2 + (120 160)x 3 + 160. To use the simplex tableau, we will subtract the fixed cost 160 from this amount, to be added back in at the end: minimize 120x 1 80x 2 40x 3 subject to 20x 1 + 20x 2 + 10x 3 10, 20x 1 10x 2 5x 3 15, x 1, x 2, x 3 0. Next we put the problem into standard form, introducing slack variables x 5 and x 6 : minimize x 5 + x 6 subject to 20x 1 + 20x 2 + 10x 3 + x 5 = 10, 20x 1 + 10x 2 + 5x 3 + x 6 = 15, x 1, x 2, x 3, x 5, x 6 0. We notice that the basic indices B(1) = 5, B(2) = 6 give us a basic feasible solution with identity basis matrix:
x 1 x 2 x 3 x 5 x 6 0 120 80 40 0 0 x 5 = 10 20 20 10 1 0 x 6 = 15 20 10 5 0 1 One iteration of the simplex method then bring us immediately to the optimal solution: x 1 x 2 x 3 x 5 x 6 60 0 40 20 6 0 x 1 = 1/2 1 1 1/2 1/20 0 x 6 = 5 0 10 5 1 1 Recalling that x 4 = 1 x 1 x 2 x 3, the optimal solution is x = (1/2, 0, 0, 1/2, 0, 5). If we now add back in the fixed cost 160 to the optimal cost 60 from the tableau, we deduce the actual optimal cost to be 100 cents. Thus, the optimal recipe is a mixture of 1/2 kg of G 1 and 1/2 kg of G 4, which will cost $1 per kg. (b) By how much would the price of grain G 3 have to drop for the blend you found in part (a) to be no longer optimal? Suppose that c 3 changes to c 3 δ. Optimality requires that c 0. Since x 3 is a nonbasic variable, c B does not change and hence the only reduced cost that will change is c 3. To violate optimality, we require that 1 0 > c 3 δ + c B B 1 A 3 = c 3 δ. That is, the blend given in part(a) would no longer be optimal once the price of G 3 drops by more than c 3 = 20 cents. At that point the requirements could be achieved for lower cost by making the cereal out of G 3 only.