LECTURE 11 CONSTRAITS : PROBLEMS WITH OR CONSTRAINTS Example 1 Maximize Z 10 X 1 8 X 2 Subject to 4 X 1 4 X 2 60 2 X 1 5 X 2 120 X 1 0, X 2 0 Add slack or surplus variables to the constraints as needed 4 X 1 4 X 2 X 3 60 2 X 1 5 X 2 X 4 120 10 X 1 8 X 2 Z 0 Phase 1 First simplex tableau X1 X2 X3 X4 4 4 5 1 0 0 60 1 0 120 2 10 8 0 0 This tableau gives the solution: X 1 = 0 X 2 = 0 X 3 = - 60 X 4 = 120 But this is not a feasible solution since X 3 is negative. All the variables in any feasible solution must be non-negative. When a negative value of a variable appears, use row operations to transform the matrix until a solution is found in which all variables are non-negative. The difficulty is caused by the – 1 in row one of the matrix. Correct this by using row transformations to change a column that has non-zero entries (such as 1 © St. Paul’s University X 1 or X 2 columns) to one in which the first row is 1 and the other entries are 0. The choice of a column is arbitrary. Let us choose the X 1 column. Multiply the entries in the first row by 1 4 to get 1 in the top row of the column. Then use row transformations to get 0’s in the other rows of that column. X1 X2 1 1 0 3 0 2 X3 1 4 1 2 5 2 X4 0 1 R1 4 15 1 90 2 R1 R 2 0 150 10 R1 R3 The solution X 1 15 , X 2 0 , X 3 0 , X 4 90 is feasible. The process of applying row transformations to get a feasible solution is called phase 1. Phase 2 The simplex method is applied as usual to get the optimal solution in phase 2. The pivot is 1 . 2 X1 1 0 0 X2 5 2 6 17 X3 0 X4 1 2 1 0 2 5 60 180 600 X 1 60 , X 2 0 and Z 600 Procedure/Steps: 1. Set up initial simplex tableau 2. Apply row transformations to get a feasible solution i.e. phase 1. 3. Use simplex method to get optimal solutions i.e. phase 2. 2 © St. Paul’s University Example 2 Maximize Z 120 X 1 40 X 2 60 X 3 © Subject to X 1 X 2 X 3 100 400 X 1 100 X 2 280 X 3 20000 X 1 X 2 X 3 60 X 1 X 2 X 3 X 4 100 400 X 1 100 X 2 280 X 3 X 5 20000 X 1 X 2 X 3 X 6 60 120 X 1 40 X 3 60 X 3 Z 0 X3 X2 X1 1 1 1 400 160 280 1 1 1 120 40 60 X4 X5 1 0 0 0 1 0 0 0 0 100 0 20,000 60 1 0 0 X6 Solution X 1 0 , X 2 0 , X 3 0 , X 4 400 , X 5 20000 , X 6 60 . Not a feasible solution because X 6 is negative. Choose a column X2, 3rd row entry in column X2 is already 1. Using row transformation to get 0’s in the rest of the column gives: Phase 1: 3 © St. Paul’s University X1 X2 X3 X4 X5 X6 0 0 0 0 0 240 0 120 1 0 1 80 1 0 1 20 0 1 0 0 0 40 160 10400 60 1 1R3 R1 160 R3 R 2 40 R3 R 4 2400 0 Phase 2: X1 X2 X3 X4 X5 X6 0 0 0 1 0 1 1 0 0.5 0 0.004 0.667 0 1 0 0.5 0 20 0 0 0.004 1.667 0.32 13.4 40 43.3 1 R2 240 16.7 1R 2 R3 5864 80 R 2 R 4 Solutions, X 1 43.3 , X 2 16.7 , X 3 0 , X 4 40 , X 5 0 , X 6 0 Exercise 1. Maximize Z 8 X 1 10 X 2 Subject to 3 X 1 X 2 50 4 X 1 2 X 2 X 3 70 Step 1 3 1 0 50 4 2 0 1 70 8 10 0 0 0 1 4 © St. Paul’s University Step 2: Use 2nd column to complete phase 1 of the solution and give the feasible solution of the results. 0 1 1 15 2 1 2 1 0 2 35 12 0 0 5 350 1 Step 3: Use simplex method to solve. 2. An animal feed company must produce 200kg of a mixture consisting of ingredient X1 and X 2 daily. X1 costs $ 3 per kg and X 2 $ 8 per kg. No more than 80 kg of X1 can be used, and at least 60 kg of X 2 must be used. Find how much of each ingredient should be used if the company wants to minimize cost. Minimize (total cost) Z 3X 1 8 X 2 Subject to constraints X 1 X 2 200 X 1 80, X 2 60 X 1 0, X 2 0 where X1 = no. of kgs of ingredient X1 and X 2 = no. kgs of ingredient X 2 X 1 X 2 X 3 200 , X 1 X 4 80 , X 2 X 5 60 Solutions: X 1 80 , X 2 120 , S 0 MINIMIZATION PROBLEM Standard minimum form: A linear programming problem is in standard minimum form if: i) The objective function is to be minimized 5 © St. Paul’s University ii) All the variables are non-negative iii) All the constraints involve iv) The constants in the constraints are all non-negative. Standard minimum problems can be solved with the method of surplus variables presented above. To solve a minimization problem, first observe that the minimum of an objective function is the same number as the maximum of the negative of the function. Procedure: Solving nonstandard problems i) ii) iii) iv) If necessary, convert the problem to a maximum problem Add slack variables and subtract surplus variables as needed. Write the initial simplex tableau. If the solution from this tableau is not feasible, use row transformations to get a feasible solution (phase 1). v) After a feasible solution is reached, solve by the simplex method (phase 2) Example Minimize W 3 y1 2 y2 Subject to y1 3 y 2 6 2 y1 y 2 3 and y1 0, y2 0 Step 1: Change this to a maximization problem by letting Z equal the negative of the objective function. Z = -10. Then find the maximum value of Z. Z W 3 y1 2 y2 The problem can now be stated as follows: Maximize Z 3 y1 2 y2 Subject to y1 3 y 2 6 2 y1 y 2 3 and 6 © St. Paul’s University y1 0, y2 0 Step 2: For phase 1 of the solution, subtract surplus variables and set up the first tableau. Maximize Z 3 y1 2 y2 0 Subject to y1 3 y 2 y 3 6 2 y1 y 2 y 4 3 Step 3: Initial simplex tableau y1 1 2 3 y2 3 1 2 1 0 6 0 1 3 0 0 0 y3 y4 Step 4: Row transformations The solutions y1 0 , y 2 0 , y 3 6 and y 4 3 contains negative numbers. Row transformations must be used to get a tableau with a feasible solution. Let us use the y1 column since it already has a 1 in the first row. Begin by getting a 0 in the second row, and then a 0 in the third row. y1 y2 y3 y4 1 0 3 1 0 5 0 7 2 3 1 9 0 18 6 2 R1 R 2 3R1 R3 Step 5: Solution by simplex method (phase 2) The above tableau has a feasible solution. In phase 2, complete the solution as usual by the simplex method. The pivot is -5 y1 y2 1 0 0 1 0 0 7 y3 1 5 2 5 1 5 y4 3 5 1 5 7 5 3 9 5 5 27 5 3R 2 R1 1 R2 5 7 R 2 R3 © St. Paul’s University The solution is y1 3 , y 2 9 , y3 0 and y 4 0 . This solution is feasible, and the tableau has no 5 5 negative indicators. Since Z 27 obtained when y1 3 5 5 and Z = -W, then W 27 5 is the minimum value, which is and y 2 9 . 5 Exercise 1. Minimize W 2 y1 3 y2 Subject to y1 y 2 10 2 y1 y 2 16 and y1 0, y2 0 Solution y1 10 , y 2 0 , y3 0 and y 4 4 , W 20 2. A chemical manufacturer processes two chemicals, Arkon and Zenon, in varying proportions to produce three products A, B, and C. He wishes to produce at least 150 units of A, 200 units of B and 60 units of C. Each ton of Arkon yields 3 of A, 5 of B and 3 of C. Each ton of Zenon yields 5 of A, 5 of B and 1 of C. If Arkon costs $ 40 per ton and Zenon $ 50 per ton, advise the manufacture how to minimize his cost. Solution Minimize 40 X 1 50 X 2 Subject to 3 X 1 5 X 2 150 5 X 1 5 X 2 200 X 1 0, X 2 0 where X1 = no. of tons of Arkon and X 2 = no. of tons of Zenon Ans: Purchase 25 tons of Arkon Purchase 15 tons of Zenon. 8 © St. Paul’s University Total cost (25 $40) (15 $50) 1750 3. Sam, who is dieting requires tow food supplements I, and II. He can get these supplements from two different products, A and B as shown in the table. Supplement (Grams per serving) I II A 3 2 B 2 4 Sam’s physician has recommended that he include at least 15 grams of supplement I but no more than 12 grams of supplement II in his daily diet. If product A costs $ 25 per serving and product B costs $ 40 per serving, how can he satisfy his requirements most economically? DUALITY THEORY Duality is related to a connection that exists between standard maximum and standard minimum problem. Any solution of a standard maximum problem produces the solution of an associated standard minimum problem, and vice-versa. Each of these associated problems is called the dual of the other. Theorem of Duality The objective function W of a minimizing linear programming problem takes on a minimum value if and only if the objective function Z of the corresponding dual maximizing problem takes on a maximum value. The maximum value of Z equals the minimum value of W. Solving minimum problems with Duals 1. Find the dual standard maximum problem 2. Solve the maximum problem using the simplex method 3. The minimum value of the objective function W is the maximum value of the objective function Z. 9 © St. Paul’s University 4. The optimum solution is given by the entries in the bottom row of the columns corresponding to the slack variables. Example Minimize W 3 y1 2 y2 Subject to y1 3 y 2 6 2 y1 y 2 3 y1 0, y 2 0 Step 1: Get the dual maximizing problem; use the given information to write the matrix 1 3 6 2 1 3 3 2 0 Transpose to get the following matrix for the dual problem 1 2 3 3 1 2 6 3 0 Write the dual problem from this matrix as follows: Maximize Z 6 x1 3x2 Subject to x1 2 x 2 3 3x1 x 2 2 x1 0, x 2 0 Step 2: Solve this standard maximizing problem using simplex method. Slack variables 10 © St. Paul’s University x1 2 x 2 x3 3 3x1 x 2 x 4 2 6 x1 3x 2 Z 0 x1 0, x 2 0, x3 0, x 4 0 x1 x2 x3 x4 1 3 2 1 0 0 3 1 0 2 0 1 6 3 0 Simplex method gives the following final tableau: x1 0 1 0 x2 1 0 0 x3 x4 3 7 1 5 5 5 2 1 1 5 5 5 3 9 27 5 5 5 The last row of this final tableau shows that the solution of the given standard minimum problem is as follows: The minimum value of W is 27 . y 1 3 and y 2 9 . Minimum value of W, 27 5 5 5 5 is the same as maximum value of Z. Interpretation of primal-dual optimum solution 1. Slack/surplus variables in the dual problem correspond to the primal basic variables in the optimum solution. 2. The values of the elements in the index row corresponding to the columns of the slack/surplus variables with changed sign directly gives the optimum values of the basic primal variables. 3. Values for the slack variables of the primal are given by the index row under the non-basic variables of the dual solution with changed sign. 4. The value of the objective function is same for primal and dual problem. Exercise Minimize 11 © St. Paul’s University W 10 y1 8 y2 Subject to y1 2 y 2 2 y1 y 2 5 y1 0, y 2 0 Solution: y1 0 y2 5 for a minimum of 40 SENSITIVITY ANALYSIS Also referred to as post-optimality analysis. It is usually undertaken to explore the effect of changes in the LP parameters on the optimum solution. Sensitivity analysis is concerned with the extent of sensitivity of the optimum solution to an LP for change in one or more of: i) The profit or cost co-efficient of the objective function ii) The LHS coefficients of the variables in the constraints iii) The RHS quantities of the constraints Sensitivity analysis is the process of investigating to what extent the numerical parameters of a LP model can be changed before the optimum solution for a given set of parameters of a LP model can be changed, before the optimum solution for a given set of parameters is disturbed. Such post optimality analysis can be of the following types. Type I To determine the range within which each of profit (or cost) co-efficients can be varied without altering the basic variables through the optimum profit (or cost) would actually vary. Type II To indicate the extent of increase of RHS quantities without altering the existing basic variables. Type III To investigate the effect of adding or deleting constraints and/or variables on the optimum product mix. Type IV To determine the sequence of basic situations that become optimum as the changes in LP parameters are extended further and further. The dual is useful not only in solving minimum problems but also in seeing how small changes in one variable will affect the value of the objective function. For example: 12 © St. Paul’s University Suppose an animal breeder needs at least 6 units per day of nutrient A and at least 3 units of nutrient B and that the breeder can choose between 2 different feeds, feed 1 and feed 2. Find the minimum cost for the breeder if each bag of feed 1 costs $ 3 and provides1 unit of nutrient A and 2 units of B, while each bag of feed @ costs $ 2 and provides 3 units of nutrient A and 1 of B. If y1 represents the number of bags of feed 1 and y2 represents the number of bags of feed 2, then: Minimize W 3 y1 2 y2 Subject to y1 3 y 2 6 2 y1 y 2 3 y1 0, y 2 0 Final tableau as solved in pg (35) x1 0 1 0 x2 1 0 0 x3 x4 3 7 1 5 5 5 2 1 1 5 5 5 3 9 27 5 5 5 The breeder will obtain minimum feed costs by using 3 for a daily cost of 27 5 5 bag of feed 1 and 9 bag of feed 2 per day, = 5.40 dollars. The top two numbers in the right-most column give the imputed costs in terms of the necessary nutrients. From the final tableau x1 1 that a unit of nutrient A costs 1 5 5 and x2 7 = 0.20 dollars, while a unit of nutrient B costs 7 minimum daily cost $ 5.40 is obtained as follows 13 5 © St. Paul’s University 5 5 which means = 1.40 dollars. The ($ 0.20 per unit of A) (6 units of A) $1.20 ($ 1.40 per unit of B) (3 units of B) $4.20 Total $5.40 These 2 numbers from the dual $ 0.20 and $ 1.40 also allow the breeder to estimate feed costs for “small” changes in nutrient requirements. For example, an increase of one unit in the requirement for each nutrient would produce a total cost of $5.40 (6 units of A, 3 of B) $0.20 ( an extra unit of A) $1.40 ( an extra unit of B) $7.40 total per day These numbers 0.20 and 1.40 are called the shadow values of nutrients. Exercise 1. An office manager needs to purchase new filing cabinets. Ace cabinets cost $ 40 each, require 6 square feet of floor space, and 8 cubic feet of files. On the other hand, each Excello Cabinet costs $ 80, requires 8 square feet of floor space, and holds 12 cubic feet. His budget permits him to spend no more than $ 560 on files, while the office has room for no more than 72 square feet of cabinets. The manager desires the greatest storage capacity within the limitations imposed by funds and space. i) How many of each type of cabinet should he buy? Let x1 be no. of Ace Cabinets Let x2 be no. of Excello Cabinets. Maximize Z 8x1 12x2 Subject to 40 x1 80 x 2 560 6 x1 8 x 2 72 x1 0, x 2 0 Final tableau 14 © St. Paul’s University x1 x2 0 1 1 0 0 0 x3 x4 3 1 80 4 3 1 1 20 8 2 1 20 100 1 ii) What are the imputed amounts of storage for each unit cost and floor space? iii) What are the shadow values of the cost and the floor space? The final tableau of the dual problem is given as: x1 x2 0 1 1 0 0 x3 x4 1 1 2 4 1 1 20 80 0 8 3 1 1 20 100 Solution: ii) Cost: 28 sq. feet Floor space: 72 square feet iii) 1 20 ,1 2. A small toy manufacturing firm has 200 square of felt, 500 ounces of stuffing and 90 feet of trim available to make two types of toys, a small bear and a monkey. The bear requires 1 square of felt and 4 ounces of staffing. The monkey requires 2 squares of felt, 3 ounces of stuffing, and 1 foot of trim. The firm makes $1 profit on each bear and $1.50 profit on each monkey. The linear program to maximize profit is Max x1 1.5x2 Z Subject to x1 2 x 2 200 4 x1 3x 2 600 x 2 90 The final tableau is: 15 © St. Paul’s University 0 1 0.8 0.2 0 40 1 0 0.6 0.4 0 120 0 0 0.8 0.2 0 0 0.1 0.6 1 50 0 180 i) What is the corresponding dual problem? ii) What is the optimal solution to the dual problem? iii) Use the shadow values to estimate the profit the firm will make if their supply of felt increases to 210 squares. iv) How much profit will the firm make if their supply of stuffing is cut to 590 ounces and their supply of trim is cut to 80 feet? 16 © St. Paul’s University
© Copyright 2026 Paperzz