0% found this document useful (0 votes)
5 views15 pages

Lecture III (7)

Math for Economist 3

Uploaded by

agathakmnz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
5 views15 pages

Lecture III (7)

Math for Economist 3

Uploaded by

agathakmnz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 15
LECTURE 3: SOLUTION OF LPP USING SIMPLEX M 3.1. INTRODUCTION We have already looked at how we solve an LPP using the graphical method, We noted that the graphical method can not be used if we have more than 2 decision variables. In this lecture we will discuss the method of solving (LPP) using the simplex method.In addition, we will look at how a maximization/minimisation problem can be turned into a dual 3.2 LECTURE OBJECTIVES G@ MS By the end of this lecture the learner should be: Able to solve a linear programming problem u ig the simplex method. 2. Able to formulate the dual of any linear programming problem. 3.2. Solution of maximisation LPP us ing the si iplex method. In our lecture two, we were able to see how a LPP can be solved using the graphical method, In this lecture we will learn how to a LPP can be solved using the simplex method. Steps + Formulate the problem in the standard way. - C nvert the inequalities into equations through the addition of a slack variable if the inequality is of a less than type (3). + Aslack variable represents unused capacity in the constraint. E.g. 4X)+6X2<180 Labour hours constraint 4X46Xp +S) =180 8 inused capacity * It will have the coefficient of I if both X; and X2=0 or can be 0 if the labour hours are fully utilised, * Each constraint has its own slack variable. * Once the sla ck variuble is incorporated, the simplex method assigns it a value during the step by step procedure. A company can produce 2 products A and B. The profit per unit of A produced is 6 dollars while the profits per unit of B produced is 8 dollars. To produce a unit of A the company requires 30 labour hours and 20 labour hours. The machine hours required are 5 hours and 10 hours for A and B respectively. The company has a maximum of 300 and 110 labour and machine hours at its disposal. Solve the problem using the simplex method. Step 1 Formulate the problem in the standard way. + Let X= - of units of A produced and Y= no. of units of B produced. Objective funetion Profits = 6X+8Y Constraints: 6X+8Y<300 Labour hours constraint SX+10Y<110 Machine hours constraint ‘X20, Y20, non-negativity constraints Step 2: Change the constraints into equations by introducing slack variables Profi = OX48Y +08 +082 Constraints: labour hours constraint SX+10Y+S2=110 Machine hours constraint X. Y, Si, $220, non-negativity constraints Step 3: Prepare th itial simplex table Solution | Products Slack variables Solution variable |X Y SI S2 Quantity SI 30 20 1 0 300 S2 5 10 0 1 110 Z=Profit | 6 8 0 0 0 Note: The values from the table are the values from the objective function and the constraints in step 2. Zis used to represent total profits. The table shows that S1=300 and S>=I10 and profits (Z)=0. Nothing is produced hence the slacks are at their maximum values. Step Four Profits can be improved by producing the products A and B in varying quantities. Improve the profits by producing as much as possible of the product with highest profit per unit, i.e. highest value in Z row. The number of the units to be produced will be limited by one or more constraints becoming operative. E.g. in our case, product B has the highest profit. It becomes the incoming variable, + Determine the row it should be come into by dividing the solution quantity column by the corresponding values in the Y column. + 300/20=15 + 110/10=11 + Select the row with the lowest quotient. (Why: it is the one that will limit the maximum amount of product B that can be produced. + The selected row is known as the key row. It gives us the outgoing variable. + The column with the highest profit per unit is called the key column and gives us the incoming variable. + The value at the intersection of the key row and the key element is known as the pivot element/key element. This is shown in the table below: Solution | Products Products Slack variables Solution variable Fy ¥ ui 2 Quantity SI 30 20 1 0 300 S2 5 0 1 110 Z=Profit | 6 8 0 0 0 Divide all elements in the pivot row by the pivot element. + Old row 5 wo Oo 1 110 New row 05 1 0 OL 4 Enter this new row in a new simplex table Second simplex table Row no. | Solution Products Slack variables Solution variable x ¥ a a Quantity 1 SI 30 20 1 0 300 2 Y Os 0 On Wn 3 6 8 0 0 0 + The entire table is similar to the initial simplex table except that row 2 is replaced with new row 2. + This implies that we will now produce 11 units of product B. + Asa rresult of producing product B, the labour and machine hours available have reduced. In addition, the profits have also been improved. We therefore need to adjust the other two rows to reflect this change in resources and also the profits + Thi done by an iterative procedure that ensures that all the other values in the pivot column become 0. In order to ensure the equality of the row, we ensure that the entire row is altered. + New Row 1=Row 1-20row 2 + Oldrow | + 20 1 0 300 + New row | + 20 o o4 2 80 + Oldrow3 72 o 0 08 88 Third Simplex table Row | Solution Products Slack variables | Solution no. variable X Y a 2 Quantity T SI 20 0 T 2 80 2 Y 05 0 O1 i 3 Z=Profit 2 0 0 “08 | -88 + fin the Z row, in the products columns we still have a positive number, the profits can he improved further. So we need to introduce the product whose profits can still be positive. The above steps are repeated as follows: + If we introduce a unit of X, the profit will increase by 2 per unit +X becomes the incoming variable. +X column is the key column, + To identify the key row and pivot element, we divide solution quantity with corresponding values in the X column. 80/20=4 11/0.5=22 We choose the row with smallest quotient. Row 1 is chosen, 20 hecomes the pivot element. * Divide the key row values by 20, New row 1: 1 0 1/720 -0.1 4 Fourth Simplex table Row | Solution Products Slack variables Solution no. | variable X Y 31 2 Quantity 1 [St 1 0 1720 “0.1 4 2 |¥ 05 0 Or 1 3 | Z=Profit 2 0 0 08 “88 *+ Adjust the other rows in the table to ensure that all the other elements in key column are zero. + New Row 2=old row 2 - 0.5New Row + Oldrow2; 05 1 0 10 ul + Newrowl: 1 0 120 -2/20 4 + Newrow2; 0 1-140 3/20 9 + New row 3=old row 3-2newrow I + Oldrmw3: 2 0 0 -8/10 “88 + Newrowl: 1 0 1/20 -2/20 4 New row 3: 0 0 -220 -12/20 -96 Fifth Simplex table Row | Solution Products Slack variables Solution no. | variable Quantity x Y SI S2 T SI T 0 1720 “0.1 a 2 Y 0 1 “140: [320 9 3 Z=Profit 0 0 “2720 ‘| -12/20 96 + The optimal solution is producing 4 units of A and 9 units of product B. + The total profits will be: Z=6X+8Y=6"4+8"9=96 The values in the Z row and in the columns of the slack variables $; and S2 are the shadow prices of the labour hours and machine hours respectively. If we have an extra unit of labour hours, we will be able to increase the profits by 1/10 dollars while an extra unit of machine hours will increase the profits by 6/10 dollars. 3.4 DUALITYINLPP Every maximization or minimization problem in a linear programming has a corresponding minimization or maximization problem The original problem is referred to as a PRIMAL while the corresponding one is the DUAL. The relationship between the two can best be expressed through the use of parameters that they share in common, Consider a primal maximization problem generally expressed Max f(x) = C)Xy+ CX + CaX3t...+CXn sit yk, + yxy +o + inn SD y1X + Qy2Xz + + GanXy S by Oats + Ama%o ++ Apmn S Bm Ay Xz ky ZO Rewriting the above in matrix form ty Max f(x) = [CC Cn) | tn sit M1 Ge Ginppay phy 2 M2 Gan |] *2| <] by Ona Oma Ann d end Toy Xa Xp Xn 20 RULES OF TRANSFORMATION ‘The direction of optimization changes ie maximization becomes minimization and vice versa. eg. min Q * The row vector of coefficient of the objective function in the primal problem is transposed into a column vector of constants in the dual © The column vector of constants in the constants in the primal problem is transposed. into a row vector of coefficients in the obje ive function of the dual. * The matrix of coefficients in the const {nt equation of the primal problem is transposed into a matrix of coefficients in the matrix of the dual problem. © The inequality sign in the primal problem is reversed, i.e. | co My Aan Fant lZnl Ley By Lp ln BO MinQ = byzy + boty + baz sit 0412, + AgiZ2 + 43173 = Cy gyZ4 + Ga2Z2 + a2%3 > Co ig,21 + Gy92p + MaaZ3 > Ca By fp ky 20 Example Let the primal problem be Max 1 = 5X, + 3X. sit 6X, + 2X, $36 5X, + 5X, $40 2X, + 4K, < 28 XX 20 Rewriting into matrix 2 maxr = |S aif ‘| 9. st El=le 6 2 55 24 The dual will be, 2 Min Q = [36 40 28]|7 23. bs alee) 25 all |ols % 22 %20 In the linear form, minQ = 362; + 40z) + 2825 st 62, + 5zz + 22525 2az + Sz + 42,25 41 % %20 3.5 SUMMARY This lecture has looked at how you can solve LPP using the simplex method. It can be used for problems involving more than 2 decision variables. .Formulation of dual from the primal has also been learnt. NOTE Se Shadow prices are obtained only for the completely utilized resources. Duality in LPP is important especially if you want to use maximization instead of minimization problem. 3.6 ACTIVITIES Solve the LPP problems in lecture 2 using the simplex. method and check whether the answers obtained are similar. 3.7 FURTHER READING © References . Gupta S.K. Cozzolino J.M. (1975) Fundamentals of Operations Research for Management. . Lucey T. Quantitative techniques . Monga G.S: Mathematics and statistics for Economists, second revised edition. 4, Tulsian and Pandey V. Quantitative Techniques, Theory and Problems. wp 3.8 SELF-TEST QUESTIONS 3 Use the simplex method to solve the following: Z=0X+8Y + Subject to: + 2X+3YS16 4AX+2Y<16 x, Y20

You might also like