Gregory Nelson Operations Research Homework 4 Linear Programming *************************************************************************** 5.1: maximize x1 − 2x2 subject to x1 + 2x2 − x3 + x4 >= 0 4x1 + 3x2 + 4x3 − 2x4 <= 3 −x1 − x2 + 2x3 + x4 = 1 x2, x3 >= 0 . Since it is not in standard form, we can transform it into standard form in 4 steps: First, rewrite x1 + 2x2 − x3 + x4 >= 0 as -x1 - 2x2 + x3 - x4 <= 0 and rewrite −x1 − x2 + 2x3 + x4 = 1 as −x1 − x2 + 2x3 + x4 <= 1 −x1 − x2 + 2x3 + x4 >= 1 i.e. −x1 − x2 + 2x3 + x4 <= 1 x1 + x2 - 2x3 - x4 <= -1 Second, substitute the free variable x1 as x1a –x1b where x1a >= 0 and x1b >= 0 i.e. let x1 = x1a –x1b where x1a >= 0 and x1b >= 0. Thirdly, substitute the free variable x4 as x4a –x4b where x4a >= 0 and x4b >= 0 i.e. let x4 = x4a –x1b where x4a >= 0 and x4b >= 0. Finally, now we transform the original problem into the following standard form: maximize x1a – x1b – 2x2 subject to -x1a + x1b - 2x2 + x3 - x4a + x4b <= 0 4x1a- 4x1b + 3x2 + 4x3 – 2x4a + 2x4b <= 3 -x1a +x1b – x2 + 2x3 + x4a -x4b <= 1 x1a – x1b + x2 – 2x3 - x4a +x4b <= -1 x1a, x1b, x4a, x4b, x2, x3 >= 0. The dual of this program is: minimize 0y1 + 3y2 + y3 - y4 subject to -y1 + 4y2 - y3 +y1 - 4y2 + y3 + y4 >= 1 –y4 >= -1 -2y1 + 3y2 - y3 + y4 >= -2 y1 + 4y2 + 2y3 - 2y4 >= 0 - y1 – 2y2 + y3 - y4 >= 0 y1 + 2y2 - y3 + y4 >= 0 y1, y2, y3, y4 >= 0. The dual of this program above can be further simplified by: (i) merging the following two inequalities corresponding to the free variable x1 -y1 + 4y2 - y3 + y4 >= 1 +y1 - 4y2 + y3 –y4 >= -1 as an equality constraint -y1 + 4y2 - y3 + y4 = 1 (ii) merging the following two inequalities corresponding to the free variable x4 - y1 – 2y2 + y3 - y4 >= 0 y1 + 2y2 - y3 + y4 >= 0 as an equality constraint -y1 – 2y2 + y3 - y4 = 0 (iii) substituting y3 – y4 by a free unbounded variable y3`. This ends in the following the dual program: minimize 0y1 + 3y2 + y3` subject to -y1 + 4y2 - y3` -2y1 + 3y2 -y3` y1 + 4y2 + 2y3` -y1 – 2y2 + y3` =1 >= -2 >= 0 =0 y1, y2 >= 0. Note that alternatively you can use Table 5.1 to get the same result above. *************************************************************************** 5.5: Given the problem: maximize 2x1 + 8x2 − x3 − 2x4 subject to 2x1 + 3x2 + 6x4 <= 6 −2x1 + 4x2 + 3x3 <= 1.5 3x1 + 2x2 − 2x3 − x4 <= 4 x1, x2, x3, x4 >= 0. We arrive at following dictionary: l = 3.5 − 0.25w1 + 6.25x2 − 0.5w3 − 1.5x4 x1 = 3.0 − 0.5w1 − 1.5x2 − 3.0x4 w2 = 0.0 + 1.25w1 − 3.25x2 − 1.5w3 + 13.5x4 x3 = 2.5 − 0.75w1 − 1.25x2 + 0.5w3 − 6.5x4. a) Dual problem: minimize 6y1 + 1.5y2 + 4y3 (equivalent to maximize -6y1 - 1.5y2 - 4y3) subject to 2y1 – 2y2 + 3y3 >= 2 3y1 + 4y2 + 2y3 >= 8 0y1 + 3y2 – 2y3 >= -1 6y1 + 0y2 – y3 >= -2 y1, y2, y3, y4 >=0 b) In the dictionary shown, x1, w2, and x3 are basic variables, w1, x2, w3, x4 are non-basic variables. c) The primal solution corresponding to the given dictionary is: For basic variables x1 = 3.0, w2 = 0, x3 = 2.5 while for nonbasic variables w1=0, x2=0, w3=0, x4=0. This solution is feasible because all basic variables set to a positive number and the nonbasics are zero. This solution is also degenerate since the basic variable w2 = 0. d) Corresponding dual dictionary: m= -3.5 – 3.0z1 – 0y2 – 2.5z3 y1 = .25 + .5z1 – 1.25y2 + .75z3 z2 = -6.25 + 1.5z1 – 3.25y2 + 1.25z3 y3 = .5 + 0z1 + 1.5y2 - .5 z3 z4 = 1.5 + 3.0z1 – 13.5y2 + 6.5z3 e) The dual solution is: For basic variables y1 = .25, z2 = -6.25, y3 = .5, z4 = 1.5 while for nonbasic variables z1=0, y2=0, z3. This solution is not feasible because z2 is a negative value. f) The primal/dual solutions does satisfy the complementary slackness property because for all 1<=i<=3 and 1<=j<=4 we have yi * wi =0 and xj * zj = 0. However, this does not mean we have reached optimality since the dual solution is not feasible. g) The current primal solution is not optimal. h) For the next primal pivot, x2 will enter and w2 will leave if we use the largest coefficient rule. This pivot is degenerate because the new set of basic variables ends in the same solution with x2=0 and w2 = 0 still and the solution quality does not improve. *************************************************************************** 5.16: Linear program: Minimize c1*x1 + c2*x2 + c3*x3 + … + cn*xn Subject to a11*x1 + a12*x2 + a13*x3 + … + a1n*xn >= b1 a21*x1 + a22*x2 + a23*x3 + … + a2n*xn >= b2 a31*x1 + a32*x2 + a33*x3 + … + a3n*xn >= b3 … am1*xn + am2*xn + am3*xn + … + amn*xn >= bm x1, x2, x3, …, xn >= 0. Equivalent to the following program in standard form Maximize -c1*x1 - c2*x2 - c3*x3 + … - cn*xn Subject to -a11*x1 - a12*x2 - a13*x3 - … - a1n*xn <= -b1 -a21*x1 - a22*x2 - a23*x3 - … - a2n*xn <= -b2 -a31*x1 - a32*x2 - a33*x3 - … - a3n*xn <= -b3 … -am1*xn - am2*xn - am3*xn - … -amn*xn <= bm x1, x2, x3, …, xn >= 0. The dual to the linear program above: Minimize -b1*y1 - b2*y2 - b3*y3 + … - bm*ym Subject to -a11*y1 - a21*y2 - a31*y3 - … - am1*yn >= -c1 -a12*y1 - a22*y2 - a32*y3 - … - am2*yn >= -c2 -a13*y1 - a23*y2 - a33*y3 - … - am3*yn >= -c3 -a1n*yn - a2n*yn + a3n*yn - … - amn*yn >= -cn y1, y2, y3, …, yn >= 0. Equivalent to the following program in standard form Maximize b1*y1 + b2*y2 + b3*y3 + … + bm*ym Subject to a11*y1 + a21*y2 + a31*y3 + … + am1*yn <= c1 a12*y1 + a22*y2 + a32*y3 + … + am2*yn <= c2 a13*y1 + a23*y2 + a33*y3 + … + am3*yn <= c3 a1n*yn + a2n*yn + a3n*yn + … +amn*yn <= cn y1, y2, y3, …, yn >= 0. Scenarios (1): Imagine you want to open up a restaurant near MIT and wonder how you should price the food items you are going to sell to that MIT student to maximize your total profit and compete with other foods current on his list. One way to do this is to price each nutrient per unit first and then simply price a food item based on the unit prices and the units of nutrients the food item contains. So how should you price the nutrients to compete and maximize your profit? Note that if the j th constraint (a1j*y1 + a2j*y2 + a3j*y3 + … + am1*yn <= c1) is not satisfied, the student can buy food item j to some extent instead of entirely buying from you to meet the nutrient need with less money spent. Another way to look at this is that if you also want to sell food item j, your price will be higher than what food item j current costs and cannot compete in the market. So the n constraints are there to ensure that the MIT student has no financial incentive to buy any regular food instead of just buying new food items you will offer. (2): Imagine you are a salesperson try to sell m kinds of food pills, each kind corresponding to each of the m nutrients and each unit of the food pill provides one unit of the corresponding nutrient. You want to maximize your profit by setting a unit price to each kind of food fills and sell them to the MIT student to fulfill his nutrient need. Note that if the j th constraint (a1j*y1 + a2j*y2 + a3j*y3 + … + am1*yn <= c1) is not satisfied, the student can buy food item j to some extent instead of entirely buying from you to meet the nutrient need with less money spent. So the n constraints are there to ensure that the MIT student has no financial incentive to buy any regular food instead of just relying on your food pills alone.