AM 121 Introduction to Optimization: Models and Methods Fall, 2014
Transcription
AM 121 Introduction to Optimization: Models and Methods Fall, 2014
AM 121 Introduction to Optimization: Models and Methods Example Questions for Midterm 1 Prof. Yiling Chen and David Parkes Fall, 2014 Here are some practice questions to help to prepare for the midterm. The midterm will not contain as many questions. 1. (Standard forms) (a) Convert the following problem into standard inequality form. (Hint, the standard form is a maximization.) min 2x1 − 4x2 s.t. 5x1 − 3x2 2x1 4.5x1 + 2x2 x1 , x2 ≥ −1 ≤7 = 20 ≥0 (b) Convert the following problem into standard equality form. Be sure to note any slack, excess or artificial variables that you introduce. Introduce as few additional variables as possible. min 3x1 − x2 + 5x3 s.t. x1 − 2x2 2x1 + x3 7x1 − 2x2 + 5x3 x1 , x2 , x3 ≥4 ≥2 = −5 ≥0 2. (Simplex method) Solve the following linear program using the simplex method. Do this by hand (since you will have to on the actual midterm). Choose as an entering variable the one with the lowest reduced cost (or reduced cost that is the most negative). max 2x1 − x2 + x3 s.t. 3x1 + x2 + 2x3 ≤ 70 x1 − x2 + 2x3 ≤ 10 x1 , x2 , x3 ≥ 0 1 3. (Conceptual) (a) Consider the following tableau for a maximization problem. Give conditions on the unknowns a1 , a2 , a3 , b and c (which can also be negative) that are required to make the following statements true: (i) The current basic solution is optimal (ii) The current basic solution is optimal and there are (definitely) alternative optimal solutions (iii) The LP is unbounded (in this part, assume that b ≥ 0) (iv) The current basic solution is not feasible. (v) The current basic solution is feasible but the objective value can be improved by bringing x1 into the basis and removing x4 . z +cx1 −x1 +a2 x1 +a3 x1 +2x2 +a1 x2 −4x2 +3x2 +x3 +x4 +x5 = = = = 10 4 1 b (b) Fill in the blanks: (i) We should expect there to be less rows than columns in an linear program in standard equality form because (ii) The convexity of the polyhedron that corresponds to the feasible solution space for a linear program is a crucial property in being able to solve linear programs efficiently because 4. (Graphical sensitivity) Consider the LP max 4x1 + x2 s.t. 3x1 + x2 ≤ 6 5x1 + 3x2 ≤ 15 x1 , x2 ≥ 0 The optimal solution is z = 8, x1 = 2, x2 = 0. Use the graphical approach to answer the following questions: (a) Determine the range of values of c1 (coefficient of x1 ) for which the current basis remains optimal. 2 (b) Determine the range of values of c2 (coefficient of x2 ) for which the current basis remains optimal. (c) Determine the range of values of b1 (RHS of first constraint) for which the current basis remains optimal. (d) Determine the range of values of b2 (RHS of second constraint) for which the current basis remains optimal. 5. (Quick fire) Just answer ‘true’ or ‘false.’ No need to explain. 1. True or False: For an LP to be unbounded, the LP’s feasible region must be unbounded. 2. True or False: A tableau is dual feasible when the reduced costs are all nonnegative. 3. True or False: The method for deciding the variable to leave the (primal) basis in the dual simplex method is defined to mimic the method for deciding the variable to leave the basis in the primal simplex method. 4. True or False: The dual simplex method is useful because it can typically recover in only a few pivots an optimal solution to an LP that has been slightly modified by introducing a new constraint. 5. True of False: Artificial variables are slack variables that are introduced for the purpose of establishing an initial basic feasible solution. 6. True or False: The optimal dual value that corresponds to a binding primal ≤ constraint (in a maximization problem) is necessarily strictly positive. Suppose there is no degeneracy. 7. True or False: Bland’s theorem ensures that no variable will enter a tableau more than once when the smallest subscript rule is used for pivoting. 6. (Modeling) You have decided to enter the candy business. You are considering producing two types of candies: Slugger Candy and Easy Out Candy, both of which consist solely of sugar, nuts and chocolate. At present, you have in stock 100 oz of sugar, 20 oz of nuts, and 30 oz of chocolate. The mixture used to make Easy Out Candy must contain at least 20% nuts. The mixture used to make Slugger Candy must contain at least 10% nuts and 10% chocolate. Each ounce of Easy Out can be sold for 25¢ and each ounce of Slugger for 20¢. Formulate a mathematical model for an LP that will enable you to maximize your revenue from candy sales. Describe the elements of your model. 7. (Duality) Consider an LP with two decision variables x1 , x2 ≥ 0 and an objective function max 2x2 3 (a) Define two inequality (≤) constraints, each involving both x1 and x2 , such that the LP is unbounded. (b) Define the dual of the problem and plot it to show that it is infeasible. (c) State the duality theorem that requires that the dual is infeasible when the primal is unbounded. 8. (Duality) (a) Use the duality definition for the standard inequality form to find the dual of the following: max 4x1 + x2 + 3x3 s.t. 2x1 + x2 + x3 ≤ −1 x1 + x2 + 2x3 ≤ 2 x1 , x2 , x3 ≥ 0 (b) Transform the resulting program into a maximization problem and again find the dual. (c) What do you notice? 9. (Sensitivity with AMPL) Zales Jewelers uses rubies and sapphires to produce two types of rings. A Type 1 ring requires 2 rubies, 3 sapphires, and 1 hour of jeweler’s labor. A Type 2 ring requires 3 rubies, 2 sapphiers, and 2 hours of jeweler’s labor. Each Type 1 ring sells for $400; type 2 sells for $500. All rings can be sold. At present, Zales has 100 rubies, 120 sapphires, and 70 hours of jeweler’s labor. Extra rubies can be purchased at a cost of $100 per ruby. Market demand requires that the company produce at least 20 Type 1 rings and at least 25 Type 2. Let x1 = number of Type 1 rings produced, x2 = number of Type 2 rings produced, and r denote the number of rubies purchased. To maximize profit, Zales should solve the following LP: max 400x1 + 500x2 − 100r s.t. 2x1 + 3x2 − r 3x1 + 2x2 x1 + 2x2 x1 x2 x1 , x2 , r ≤ 100 ≤ 120 ≤ 70 ≥ 20 ≥ 25 ≥0 (1) (2) (3) (4) (5) An LP has been formulated in AMPL and this is the solution vector found with corresponding objective value: x1 = 20; x2 = 25; r = 15; z = 19, 000 In addition, the following sensitivity information was generated by AMPL/CPLEX: 4 : _varname _var.rc _var.down _var.current _var.up 1 x1 0 300 400 1e+20 2 x2 0 -1e+20 500 700 3 r 0 -200 -100 0 ; : 1 2 3 4 5 _conname _con.dual constraint1 100 constraint2 0 constraint3 200 constraint4 0 constraint5 -200 _con.down _con.current -1e+20 100 110 120 70 70 -1e+20 20 22.5 25 := _con.up 115 1e+20 73.3333 20 25 ; := Use the AMPL output to answer the following questions: (a) Suppose that instead of $100, each ruby costs $190. Would Zales still purchase rubies? What would be the new optimal solution to the problem? (b) Suppose that Zales were only required to produce at least 23 Type 2 rings. What would Zales’ profit now be? (c) What is the most that Zales would be willing to pay for another hour of jeweler’s labor? (d) What is the most that Zales would be willing to pay for another sapphire? (e) Zales is considering producing Type 3 rings. Each Type 3 ring can be sold for $550 and requires 4 rubies, 2 sapphiers and 1 hour of jeweler’s labor. Should Zales produce any Type 3 rings? (Hint: you will need to do a small amount of hand calculation here) 10. (Degeneracy) (a) Describe the condition that makes a tableau degenerate. (b) Consider the following tableau for a maximization problem. Write down the current basis, current basic solution and current objective value. z 1 + x1 2 1 + x1 2 −x1 −2x2 +x3 +x2 3 + x4 2 1 + x4 2 −x4 = 3 = 1 +x5 = 0 (c) Perform two pivots. After each pivot write down the new basis, the new basic solution, and the new objective value. When choosing an entering variable, select the one with the smallest reduced cost. What do you notice? (d) What is the general problem that can be caused by degeneracy in the simplex method and what is a solution? 5 11. (Pivoting) Consider the following tableau for a maximization problem: z +x1 −2x2 +2x2 +x2 −2x2 +2x3 −x3 −x3 −2x3 −3x5 −x5 +x5 −3x5 +x4 = = = = +x6 5 4 2 6 (a) List all pairs (xr , xk ) such that xk could be the entering variable and xr could be the leaving variable. (b) List all pairs if the “most negative reduced cost” rule for choosing the entering variable is used. (c) List all pairs if the smallest subscript rule is used for choosing the entering and leaving variables. 12. (Sensitivity) Consider the following LP and its optimal tableau (where x4 and x5 are the slack variables for the two constraints): max 3x1 + x2 − x3 s.t. 2x1 + x2 + x3 ≤ 8 4x1 + x2 − x3 ≤ 10 x1 , x2 , x3 ≥ 0 z 1 + x4 2 1 − x4 2 +2x4 +x3 −x3 +x1 +x2 +3x3 1 + x5 2 1 + x5 2 −x5 = 9 = 1 = 6 In answering the following you might find the following relations between an original problem in standard equality form and the optimal tableau useful: b = A−1 B b y T = cTB A−1 B T cj = cTB A−1 B Aj − cj = y Aj − cj , ∀j ∈ B 0 The basis is B = {1, 2} and AB = 2 1 4 1 A−1 B = 1 − 12 2 2 −1 Using the optimal tableau or these equations, answer the following questions: 6 (a) What is the optimal solution to the dual of this LP? (b) Find the range of values of b2 (the RHS on the second constraint) for which the current basis remains optimal. If b2 = 12 what is the new optimal solution? (c) Find the range of values of c3 (the objective function coefficient on the third variable) for which the current solution remains optimal. (d) Find the range of values of c1 (the objective function coefficient on the first variable) for which the current basis remains optimal. (Note: it is more important you understand how to solve this problem than to actually solve it here. It’s good algebra practice, so we won’t stop you, but don’t expect us to give this much algebra on the midterm itself.) 13. (Dual simplex) In solving the following LP max 6x1 + x2 s.t. x1 + x2 ≤ 5 2x1 + x2 ≤ 6 x1 , x2 ≥ 0 we obtain the optimal tableau z +x1 +2x2 1 + x2 2 1 + x2 2 +x3 +3x4 1 − x4 2 1 + x4 2 = 18 = 2 = 3 where x3 and x4 are the slack variables introduced for the two constraints. (a) Find the optimal solution to this LP if we add the constraint 3x1 + x2 ≤ 10. (b) Solve the LP with the additional constraint x1 − x2 ≥ 6. (Hint: you will need to introduce a new row into the tableau.) (c) Find the optimal solution if we add the constraint 8x1 + x2 ≤ 12 to the original LP. 7