Review Solutions, Exam 2, Operations Research

Similar documents
Farkas Lemma, Dual Simplex and Sensitivity Analysis

Part 1. The Review of Linear Programming

21. Solve the LP given in Exercise 19 using the big-m method discussed in Exercise 20.

The use of shadow price is an example of sensitivity analysis. Duality theory can be applied to do other kind of sensitivity analysis:

Standard Form An LP is in standard form when: All variables are non-negativenegative All constraints are equalities Putting an LP formulation into sta

Slack Variable. Max Z= 3x 1 + 4x 2 + 5X 3. Subject to: X 1 + X 2 + X x 1 + 4x 2 + X X 1 + X 2 + 4X 3 10 X 1 0, X 2 0, X 3 0

The Simplex Method. Standard form (max) z c T x = 0 such that Ax = b.

1 Review Session. 1.1 Lecture 2

February 17, Simplex Method Continued

Introduction to Mathematical Programming IE406. Lecture 10. Dr. Ted Ralphs

Systems Analysis in Construction

Lecture 11: Post-Optimal Analysis. September 23, 2009

(P ) Minimize 4x 1 + 6x 2 + 5x 3 s.t. 2x 1 3x 3 3 3x 2 2x 3 6

Note 3: LP Duality. If the primal problem (P) in the canonical form is min Z = n (1) then the dual problem (D) in the canonical form is max W = m (2)

min 4x 1 5x 2 + 3x 3 s.t. x 1 + 2x 2 + x 3 = 10 x 1 x 2 6 x 1 + 3x 2 + x 3 14

Review Questions, Final Exam

March 13, Duality 3

Introduction to Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Dual Basic Solutions. Observation 5.7. Consider LP in standard form with A 2 R m n,rank(a) =m, and dual LP:

3. Duality: What is duality? Why does it matter? Sensitivity through duality.

Chap6 Duality Theory and Sensitivity Analysis

Simplex Algorithm Using Canonical Tableaus

F 1 F 2 Daily Requirement Cost N N N

Variants of Simplex Method

The dual simplex method with bounds

Understanding the Simplex algorithm. Standard Optimization Problems.

OPTIMISATION 3: NOTES ON THE SIMPLEX ALGORITHM

IE 400: Principles of Engineering Management. Simplex Method Continued

Chapter 3, Operations Research (OR)

Chapter 1 Linear Programming. Paragraph 5 Duality

(b) For the change in c 1, use the row corresponding to x 1. The new Row 0 is therefore: 5 + 6

The Primal-Dual Algorithm P&S Chapter 5 Last Revised October 30, 2006

Optimisation and Operations Research

LINEAR PROGRAMMING 2. In many business and policy making situations the following type of problem is encountered:

Math Models of OR: Some Definitions

Linear programs Optimization Geoff Gordon Ryan Tibshirani

A Review of Linear Programming

Special cases of linear programming

AM 121: Intro to Optimization

Linear Programming, Lecture 4

Linear Programming Duality P&S Chapter 3 Last Revised Nov 1, 2004

1. Algebraic and geometric treatments Consider an LP problem in the standard form. x 0. Solutions to the system of linear equations

Midterm Review. Yinyu Ye Department of Management Science and Engineering Stanford University Stanford, CA 94305, U.S.A.

Sensitivity Analysis

Yinyu Ye, MS&E, Stanford MS&E310 Lecture Note #06. The Simplex Method

Lecture 5. x 1,x 2,x 3 0 (1)

Summary of the simplex method

Linear Programming: Chapter 5 Duality

The Simplex Algorithm

MVE165/MMG631 Linear and integer optimization with applications Lecture 5 Linear programming duality and sensitivity analysis

OPERATIONS RESEARCH. Linear Programming Problem

Solutions to Review Questions, Exam 1

4. Duality and Sensitivity

OPTIMISATION /09 EXAM PREPARATION GUIDELINES

CO350 Linear Programming Chapter 8: Degeneracy and Finite Termination

OPRE 6201 : 3. Special Cases

Lecture 10: Linear programming. duality. and. The dual of the LP in standard form. maximize w = b T y (D) subject to A T y c, minimize z = c T x (P)

3. THE SIMPLEX ALGORITHM

MATH 373 Section A1. Final Exam. Dr. J. Bowman 17 December :00 17:00

Worked Examples for Chapter 5

Simplex Method in different guises

Prelude to the Simplex Algorithm. The Algebraic Approach The search for extreme point solutions.

CSCI 1951-G Optimization Methods in Finance Part 01: Linear Programming

Lecture 10: Linear programming duality and sensitivity 0-0

"SYMMETRIC" PRIMAL-DUAL PAIR

Summary of the simplex method

DEPARTMENT OF STATISTICS AND OPERATIONS RESEARCH OPERATIONS RESEARCH DETERMINISTIC QUALIFYING EXAMINATION. Part I: Short Questions

Duality Theory, Optimality Conditions

END3033 Operations Research I Sensitivity Analysis & Duality. to accompany Operations Research: Applications and Algorithms Fatih Cavdur

Spring 2017 CO 250 Course Notes TABLE OF CONTENTS. richardwu.ca. CO 250 Course Notes. Introduction to Optimization

The Dual Simplex Algorithm

Introduction to Mathematical Programming IE406. Lecture 13. Dr. Ted Ralphs

Sensitivity Analysis and Duality in LP

Today: Linear Programming (con t.)

Example. 1 Rows 1,..., m of the simplex tableau remain lexicographically positive

2018 년전기입시기출문제 2017/8/21~22

Linear Programming Inverse Projection Theory Chapter 3

Discrete Optimization

Gauss-Jordan Elimination for Solving Linear Equations Example: 1. Solve the following equations: (3)

OPERATIONS RESEARCH. Michał Kulej. Business Information Systems

AM 121 Introduction to Optimization: Models and Methods Example Questions for Midterm 1

Chapter 4 The Simplex Algorithm Part I

Lesson 27 Linear Programming; The Simplex Method

OPTIMISATION 2007/8 EXAM PREPARATION GUIDELINES

Chapter 4 The Simplex Algorithm Part II

Linear Programming Duality

TIM 206 Lecture 3: The Simplex Method

Simplex Method for LP (II)

Math Models of OR: Sensitivity Analysis

SAMPLE QUESTIONS. b = (30, 20, 40, 10, 50) T, c = (650, 1000, 1350, 1600, 1900) T.

Brief summary of linear programming and duality: Consider the linear program in standard form. (P ) min z = cx. x 0. (D) max yb. z = c B x B + c N x N

AM 121: Intro to Optimization Models and Methods

February 22, Introduction to the Simplex Algorithm

The Simplex Algorithm and Goal Programming

Chapter 1: Linear Programming

MATH 445/545 Homework 2: Due March 3rd, 2016

Optimization 4. GAME THEORY

CO 250 Final Exam Guide

- Well-characterized problems, min-max relations, approximate certificates. - LP problems in the standard form, primal and dual linear programs

Optimisation and Operations Research

Transcription:

Review Solutions, Exam 2, Operations Research 1. Prove the weak duality theorem: For any x feasible for the primal and y feasible for the dual, then... HINT: Consider the quantity y T Ax. SOLUTION: To use the hint, start with a feasible point in the primal and the dual. Then we know the following two equations are satisfied: Ax b A T y c In the first expression, multiply both sides by y T (this is OK since we assume x, y 0). Multiply the second expression by x T. y T Ax y T b and x T A T y x T c Noting that x T A T y = (Ax) T y = y T (Ax), we get that: c T x y T Ax b T y 2. Show that the solution to the dual is y = (c T B B 1 ) T (if the primal and dual are both feasible). Show that y is feasible. SOLUTION: y is feasible if A T y c, or, in row form, c T + y T A 0: c T + y T A = c T + (c T BB 1 )A = c T + c T BB 1 A 0 The last inequality is true since x is optimal for the primal. Show that z = w w = y T b = c T BB 1 b = z since we have an optimal tableau for the primal. 3. Solve using big-m: max z = 5x 1 x 2 st 2x 1 +x 2 = 6 x 1 +x 2 4 x 2 3 SOLUTION: We only have one artificial variable (for the equality). Here s the initial tableau- To get a BFS, we need to get rid of the M in Row 0: 5 1 M 0 0 0 2 1 1 0 0 6 1 1 0 1 0 4 5 2M 1 M 0 0 0 6M 2 1 1 0 0 6 1 1 0 1 0 4 1

Pivot in column 1, row 1: 0 7/2 5 + M 0 0 15 2 1 1/2 1/2 0 0 3 0 1/2 1/2 1 0 1 This is our optimal solution: x 1 = 3, x 2 = 0, with z = 15. 4. Solve the last problem again using the two phase method. In two-phase, here is our initial tableau: 0 0 1 0 0 0 2 1 1 0 0 6 1 1 0 1 0 4 Pivot in the first column, first row: 0 7/2 5 + M 0 0 15 2 1 1/2 1/2 0 0 3 0 1/2 1/2 1 0 1 2 1 0 0 0 6 2 1 1 0 0 6 1 1 0 1 0 4 0 0 1 0 0 0 1 1/2 1/2 0 0 3 0 1/2 1/2 1 0 1 End of Phase I. Now we have a feasible point, we can bring in our original Row 0 (and remove the artificial variable). We perform the row operations to maintain our columns of the identity. x 1 x 2 s 2 s 3 rhs 5 1 0 0 0 1 1/2 0 0 3 0 1/2 1 0 1 0 1 0 1 3 x 1 x 2 s 2 s 3 rhs 0 7/2 0 0 15 1 1/2 0 0 3 0 1/2 1 0 1 0 1 0 1 3 And this is the optimal tableau, with z = 15. 5. Use the simplex algorithm to get a tableau that is suitable for the dual simplex algorithm. In doing so, show that the problem is infeasible, but the dual is feasible. min z = 3x 1 + x 2 st x 1 2x 2 2 x 1 + x 2 3 SOLUTION: Writing this with columns of the identity in mind, we would get the tableau on the left, below. To get this in the form for the dual simplex, Row 0 needs to be all 2

non-negative. So, pivot in the first column: x 1 x 2 e 1 e 2 rhs 3 1 0 0 0 1 2 1 0 2 1 1 0 1 3 x 1 x 2 e 1 e 2 rhs 0 2 0 3 9 0 1 1 1 5 1 1 0 1 3 We can keep going- Now pivot in column 2: x 1 x 2 e 1 e 2 rhs 0 0 2 5 19 0 1 1 1 5 1 0 1 2 8 This is now feasible for the dual, but not feasible for the primal. However, we cannot pivot anywhere, so the primal remains infeasible. 6. Consider the LP and the optimal tableau with missing Row 0. max z = 3x 1 + x 2 s.t. 2x 1 + x 2 4 3x 1 + 2x 2 6 4x 1 + 2x 2 = 7 x 1 x 2 s 1 e 2 a 2 a 3 rhs 0 0 1 0 0 1 1 2 2 0 1 0 2 2 3 3 2 2 1 0 0 1 1 1 1 Find Row 0. SOLUTION: Row 0 coefficients are given by c T + c T BB 1 A where c T = [3, 1, 0, 0, M, M] and c T B = [0, 1, 3] The columns in the tableau are already the columns for B 1 A, so we can use them. Here are the Row zero coefficients: For e 2 : [0, 1, 3][0, 2, 1] T = 1 For a 2 : M + [0, 1, 3][0, 2, 1] = 1 + M For a 3 : M + [0, 1, 3][ 1/2, 3/2, 1] T = 3/2 + M Optimal z is [0, 1, 3][1/2, 3/2, 1] T = 9/2 We have zeros for x 1, x 2, s 1. Therefore, the optimal tableau is: x 1 x 2 s 1 e 2 a 2 a 3 rhs 0 0 0 1 1 + M 3/2 + M 9/2 0 0 1 0 0 1 1 2 2 0 1 0 2 2 3 3 2 2 1 0 0 1 1 1 1 3

7. Give an argument why, if the primal is unbounded, then the dual must be infeasible. SOLUTION: Suppose the dual was feasible. Then there exists a y that satisfies the constraints for the dual. But in that case, for every x in the primal, c T x b T y But we said that the primal was unbounded, so that c T x. This is a contradiction- Thus, the dual must be infeasible. 8. In solving the following LP, we obtain the optimal tableau shown: max z = 6x 1 + x 2 st x 1 + x 2 5 2x 1 + x 2 6 x 1 x 2 s 1 s 2 rhs 0 2 0 3 18 0 1/2 1 1/2 2 1 1/2 0 1/2 3 (a) If we add a new constraint, is it possible that we can increase z? Why or why not? SOLUTION: Since the feasible set decreases (that is, the new feasible set is a subset of the original feasible set), then the value of z must either decrease or stay the same, since the current solution is over a larger set. (b) If we add the constraint 3x 1 + x 2 10, is the current basis still optimal? SOLUTION: If we add an extra constraint, the set of feasible points is reduced. Therefore, if the optimal solution satisfies this constraint, then we re done (we re not adding new points). In this case, the solution is x 1 = 3, x 2 = 0 and the constraint is satisfied (and the current solution remains optimal). (c) If we add the constraint x 1 x 2 6, we can quickly see that the optimal solution changes. Find out if we have a new optimal solution or if we have made the problem infeasible. SOLUTION: If the optimal solution does not satisfy the constraint (as in this case), then we either have a new optimal solution or no feasible points. Let s add in this constraint into the tableau and see if it can be incorporated into it. Adding the constraint adds a new row and column: x 1 x 2 s 1 s 2 e 3 rhs 0 2 0 3 0 18 0 1/2 1 1/2 0 2 1 1/2 0 1/2 0 3 1 1 0 0 1 6 x 1 x 2 s 1 s 2 e 3 rhs 0 2 0 3 0 18 0 1/2 1 1/2 0 2 1 1/2 0 1/2 0 3 0 3/2 0 1/2 1 3 The last constraint can never be satisfied. Infeasible. (d) Same question as the last one, but let s change the constraint to 8x 1 + x 2 12. SOLUTION: In this case, the current optimal solution does not satisfy the constraint (therefore, the current solution is no longer optimal). We need to check 4

whether we have a new optimal solution or if we have made the problem infeasible. First eliminate x 1 as we did before: x 1 x 2 s 1 s 2 s 3 rhs 0 2 0 3 0 18 0 1/2 1 1/2 0 2 1 1/2 0 1/2 0 3 8 1 0 0 1 12 8R 2 +R 3 R 3 x 1 x 2 s 1 s 2 s 3 rhs 0 2 0 3 0 18 0 1/2 1 1/2 0 2 1 1/2 0 1/2 0 3 0 3 0 4 1 12 We pivot using the dual simplex to try to make the solution feasible. Using the ratio test, pivot in the x 2 column: x 1 x 2 s 1 s 2 s 3 rhs 0 0 0 1/3 2/3 10 0 0 1 7/6 1/6 0 1 0 0 1/6 1/6 1 0 1 0 4/3 1/3 4 And now we re feasible and optimal again! (Notice that z decreased). (e) If I add a new variable x 3 so that: max z = 6x 1 + x 2 + x 3 st x 1 + x 2 + 2x 3 5 2x 1 + x 2 + x 3 6 Does the current basis stay optimal? Answer two ways- One using the optimal tableau, and the second using the dual. SOLUTION: Using the optimal tableau, we price out the new variable. The new column will be B 1 a 3, or [ ] [ ] [ ] 1 1/2 2 3/2 = 0 1/2 1 1/2 The new Row 0 value will be c 3 + c T B B 1 a 3. Notice that the order given in the optimal tableau for the basic variables is {s 1, x 1 }, so c T B = [0, 6]: [ ] 3/2 1 + [0, 6] = 1 + 3 = 2 > 0 1/2 Using the dual, the addition of the new variable adds a new constraint to the dual: 2y 1 + y 2 1 with the current dual being y 1 = 0, y 2 = 3. In this case, the new constraint is satisfied, so the dual remains optimal (and so does the primal). 5

9. Solve the following mixed constraint problem using a combination of the simplex and the dual simplex. min z = x 1 +x 2 st x 1 +x 2 3 x 2 6 2x 1 +x 2 18 SOLUTION: Change to a max, then multiply the second row by 1 to get the tableau: x 1 x 2 s 1 e 2 s 3 1 1 0 0 0 0 1 1 1 0 0 3 0 1 0 1 0 6 2 1 0 0 1 18 We use the regular simplex method first- pivot on the 2 in the lower left: x 1 x 2 s 1 e 2 s 3 0 3/2 0 0 1/2 9 0 3/2 1 0 1/2 12 0 1 0 1 0 6 1 1/2 0 0 1/2 9 Now we perform one iteration of the dual simplex method- We use Row 2, then column x 2 : x 1 x 2 s 1 e 2 s 3 0 0 0 3/2 1/2 0 0 0 1 3/2 1/2 3 0 1 0 1 0 6 1 0 0 1/2 1/2 6 We are now optimal: x 1 = x 2 = 6, with z = 0. Side Remark: What is the solution to the dual? On the one hand, it looks like y = [0, 3/2, 1/2] T. We can verify that using w, but be careful- In order for our theory to work out, the problem needed to be in normal form, so we would actually need to multiply the first and last constraints by 1. In that case, w = 3y 1 + 6y 2 18y 3, and our y values work. On the other hand, if we use our shortcuts to build the dual from the mixed constraints, then we get w = 3y 1 + 6y 2 + 18y 3, where y 1, y 3 are negative. From the optimal Row 0, we would then need to multiply y 1, y 3 by 1 to get the solution to the dual. 10. The Complementary Slackness Theorem says, among other things, that s j y j = 0. If s j > 0, why should y j = 0? (Explain in words) SOLUTION: In the normal form, if s j > 0, then the j th constraint has unused resources (the slack is what is still available). Therefore, it doesn t matter if we add more resources, since we re not using what we have. The shadow price (and therefore also y j ) is then 0. 11. Be able to prove that each of our shortcut formulas for sensitivity analysis works. 6

Change in a NBV SOLUTION: We ll only prove the formula that doesn t use the dual. In that case, the only change to the initial Row 0 is in c so that the new Row 0 is: (c T + e T i ) + c T BB 1 A = c T + c T BB 1 A e T i This means that the only thing that changes is in the i th position, and there we take the old i th coefficient from Row 0 and subtract. Change in a BV SOLUTION: We ll assume the BV has coordinate i in the initial Row 0, and has coordinate j in c B. Then the change is given by: Expanding this, (c T + e T i ) + (c T B + e T j )B 1 A ( c T + c T BB 1 A) e T i + (B 1 A) j where the first term is Row 0 from the final tableau, and the last term is the j th row of the final tableau. The middle term only effects the BV in the i th position, so if we say that the BVs sum to zero, we can drop the middle term and take the sum for the NBVs. Change in RHS SOLUTION: The RHS of the table changes from b to b + e i so that the RHS of the final tableau becomes B 1 (b + e i ) = B 1 b + (B 1 ) i where the subscript denotes the i th column of B 1. Change in a column corresponding to a NBV. SOLUTION: We could do this by not using the dual. In that case, the new column in the final tableau and the new Row 0 entry of the final tableau would be: B 1 a i, and c i + c T BB 1 a i > 0 And we might notice that this last expression is the constraint from dual (except for the = ): y T a i c i Adding a new activity (column). SOLUTION: Basically the exact same computations as in the previous problem. 12. Consider the LP below: max z = 2x 1 +2x 2 st x 1 +x 3 +x 4 1 x 2 +x 3 x 4 1 x 1 +x 2 +2x 3 3 x 0 7

(a) Write out the dual. min w = y 1 +y 2 +3y 3 st y 1 +y 3 2 y 2 +y 3 2 y 1 +y 2 +2y 3 0 y 1 y 2 0 y 0 (b) Show that x = [1, 1, 0, 0] T and y = [1, 1, 1] T are feasible for the original and dual problems, respectively. SOLUTION: With the expectation of needing the values of the slacks, we put x into the primal and y into the constraints of the dual: x 1 x 2 x 3 x 4 s 1 s 2 s 3 1 1 0 0 0 0 1 e 1 e 2 e 3 e 4 y 1 y 2 y 3 0 0 4 0 1 1 1 (c) Show that for this pair of solutions, if x j > 0 then the corresponding slack in the dual is 0. SOLUTION: Yes- check the table from the previous answer. (d) Show that y is not an optimal solution to the dual. SOLUTION: Notice if we compute z, w, we know that something is off, but we don t know if the problem is with the primal or the dual. If we look at the solution to the first part, we see that the variables x i satisfy the Complementary Slackness conditions (x i e i = 0), but that y does not- The problem therefore, must be with the dual. Given s 3 > 0 from the primal, then y 3 = 0. Keeping e 1 = e 2 = e 4 = 0, we see that y 1 = y 2 = 2, and that would given z = w = 4. Therefore, y = [1, 1, 1] T was not optimal for the dual. (e) Does this contradict the Complementary Slackness Theorem? 13. Prove or disprove using Complementary Slackness: The point x = [0, 3, 0, 0, 4] T is an optimal solution to the LP: max z = 5x 1 +4x 2 +8x 3 +9x 4 +15x 5 st x 1 +x 2 +2x 3 +x 4 +2x 5 11 x 1 2x 2 x 3 +2x 4 +3x 5 6 x 0 SOLUTION: This is similar to the last one. We can fill in the values of the slack variables as well: x 1 x 2 x 3 x 4 x 5 s 1 s 2 0 3 0 0 4 0 0 e 1 e 2 e 3 e 4 e 5 y 1 y 2 8

We know that e 2, e 5 both must be zero: y 1 2y 2 = 4 2y 1 + 3y 2 = 15 y 1 = 6, y 2 = 1 And checking the other dual conditions to get the values of e i : e 1 = 2 e 2 = 0 e 3 = 3 e 4 = 1 e 5 = 0 So this y (derived from the solution to the primal) is infeasible. Thus, x from the primal is NOT the optimal solution. Chapter 6 Review Problems: Solutions are written up separately. 9