Objectives Linear Programming z To introduce linear programming problems (LPP) z To discuss the standard and canonical form of LPP z To discuss elementary operation for linear set of Preliminaries 1 D Nagesh Kumar, IISc equations LP_1: Intro 2 Introduction D Nagesh Kumar, IISc LP_1: Intro Example z Linear Programming (LP) is the most useful optimization technique z Objective function and constraints are the ‘linear’ functions of ‘nonnegative’ decision variables z Thus, the conditions of LP problems are Maximize Z = 6x + 5 y ≺ Objective Function subject to 2x − 3 y ≤ 5 ≺ 1st Constraint x + 3 y ≤ 11 ≺ 2nd Constraint 4 x + y ≤ 15 ≺ 3rd Constraint x, y ≥ 0 ≺ Nonnegativity Condition 1. Objective function must be a linear function of decision variables This is in “general” form 2. Constraints should be linear function of decision variables 3. All the decision variables must be nonnegative 3 D Nagesh Kumar, IISc LP_1: Intro 4 Standard form of LP problems z D Nagesh Kumar, IISc LP_1: Intro General form Vs Standard form z Standard form of LP problems must have following three characteristics: 1. Objective function should be of maximization type General form Minimize Z = −3 x1 − 5 x 2 subject to 2 x1 − 3 x 2 ≤ 15 x1 + x 2 ≤ 3 2. All the constraints should be of equality type 4 x1 + x 2 ≥ 2 3. All the decision variables should be nonnegative x1 ≥ 0 x 2 unrestrict ed z Violating points for standard form of LPP: 1. Objective function is of minimization type 2. Constraints are of inequality type 3. Decision variable, x2, is unrestricted, thus, may take negative values also. How to transform a general form of a LPP to the standard form ? 5 D Nagesh Kumar, IISc LP_1: Intro 6 D Nagesh Kumar, IISc LP_1: Intro 1 Transformation General form z General form z 1. Objective function Minimize Z = −3 x1 − 5 x 2 2. First constraint Standard form General form Standard form z 1. Objective function Maximize 3. Second constraint x1 + x 2 ≤ 3 3. Second constraint Variables Variable Standard form Standard form 4. Third constraint 4x1 + x2 − x5 = 2 4 x1 + x 2 ≥ 2 x5 is known as surplus variable 5. Constraints for decision variables, x1 and x2 5. x1 ≥ 0 Constraints for decision variables, x1 and x2 x1 ≥ 0 x 2 = x 2′ − x ′2′ and x2′ , x′2′ ≥ 0 x2 unrestricted x1 + x2 + x4 = 3 x3 and x 4 are known as slack variables D Nagesh Kumar, IISc LP_1: Intro 8 Canonical form of LP Problems z z Third constraint 2. First constraint 2 x1 − 3 x 2 + x3 = 15 7 General form 4. Z ′ = − Z = 3 x1 + 5 x 2 2 x 1 − 3 x 2 ≤ 15 Transformation D Nagesh Kumar, IISc LP_1: Intro Canonical form of a set of linear equations The ‘objective function’ and all the ‘equality constraints’ Let us consider the following example of a set of linear equations (standard form of LP problems) can be expressed in canonical z form. 3 x + 2 y + z = 10 Canonical form of LP problems is essential for simplex method x − 2 y + 3z = 6 (B0) 2x + y − z = 1 (C0) (will be discussed later) z Canonical form of a set of linear equations will be discussed The system of equation will be transformed through ‘Elementary Operations’. next. 9 D Nagesh Kumar, IISc LP_1: Intro 10 LP_1: Intro Set of equation (A0, B0 and C0) is transformed through elementary operations (shown inside bracket in the right side) The following operations are known as elementary operations: 1. Any equation Er can be replaced by kEr, where k is a nonzero constant. 2. Any equation Er can be replaced by Er + kEs, where Es is another equation of the system and k is as defined above. Note: Transformed set of equations through elementary operations is equivalent to the original set of equations. Thus, solution of transformed set of equations is the solution of original set of equations too. D Nagesh Kumar, IISc D Nagesh Kumar, IISc Transformation to Canonical form: An Example Elementary Operations 11 (A0) LP_1: Intro 1 ⎞ ⎛ ⎜ A1 = A 0 ⎟ 3 ⎠ ⎝ 3 x + 2 y + z = 10 x+ 2 1 10 y+ z= 3 3 3 x − 2 y + 3z = 6 0− 8 8 8 y+ z = 3 3 3 (B1 = B0 − A1 ) 2x + y − z = 1 0− 1 5 17 y− z =− 3 3 3 (C1 = C0 − 2A1 ) Note that variable x is eliminated from B0 and C0 equations to obtain B1 and C1. Equation A0 is known as pivotal equation. 12 D Nagesh Kumar, IISc LP_1: Intro 2 Transformation to Canonical form: Example contd. Transformation to Canonical form: Example contd. Following similar procedure, y is eliminated from equation A1 and C1 considering B1 as pivotal equation: Finally, z is eliminated form equation A2 and B2 considering C2 as pivotal equation : 2 ⎞ ⎛ ⎜ A 2 = A1 − B 2 ⎟ 3 ⎠ ⎝ x+0+ z = 4 0 + y − z = −1 3 ⎞ ⎛ ⎜ B 2 = − B1 ⎟ 8 ⎠ ⎝ 0 + 0 − 2 z = −6 1 ⎞ ⎛ ⎜ C 2 = C1 + B 2 ⎟ 3 ⎠ ⎝ x + 0 + 0 =1 0+ y+0 = 2 0+0+ z = 3 (A 3 = A 2 − C3 ) (B3 = B2 + C3 ) 1 ⎞ ⎛ ⎜ C3 = − C 2 ⎟ 2 ⎠ ⎝ Note: Pivotal equation is transformed first and using the transformed pivotal equation other equations in the system are transformed. The set of equations (A3, B3 and C3) is said to be in Canonical form which is equivalent to the original set of equations (A0, B0 and C0) 13 D Nagesh Kumar, IISc 14 LP_1: Intro Consider the following system of n equations with n variables Operation at each step to eliminate one variable at a time, from all equations except one, is known as pivotal operation. a11 x1 + a12 x 2 + + a1n x n = b1 ( E1 ) Number of pivotal operations are same as the number of variables in the set of equations. a 21 x1 + a 22 x 2 + + a 2 n x n = b2 (E2 ) Three pivotal operations were carried out to obtain the canonical form of set of equations in last example having three variables. a n1 x1 + a n 2 x 2 + + a nn x n = bn (En ) D Nagesh Kumar, IISc 16 LP_1: Intro Transformation to Canonical form: Generalized procedure General procedure for one pivotal operation consists of following two steps, 1. Divide j th equation by a ji . Let us designate it as ( E′j ) , i.e., E ′j = 2. Subtract a ki times of ( E′j ) equation from D Nagesh Kumar, IISc j − 1, j + 1, LP_1: Intro After repeating above steps for all the variables in the system of equations, the canonical form will be obtained as follows: Variable x i (i = 1 n ) is eliminated from all equations except j th equation for which a ji is nonzero. k th equation (k = 1, 2, D Nagesh Kumar, IISc Transformation to Canonical form: Generalized procedure Canonical form of above system of equations can be obtained by performing n pivotal operations 17 LP_1: Intro Transformation to Canonical form: Generalized procedure Pivotal Operation 15 D Nagesh Kumar, IISc + 0 x n = b1′′ ( E1c ) 0 x1 + 1x 2 + + 0 x n = b2′′ ( E 2c ) 0 x1 + 0 x 2 + + 1x n = bn′′ ( E nc ) Ej a ji , n ) , i.e., Ek − a ki E ′j LP_1: Intro 1x1 + 0 x 2 + 18 It is obvious that solution of above set of equation such as xi = bi′′ is the solution of original set of equations also. D Nagesh Kumar, IISc LP_1: Intro 3 Transformation to Canonical form: More general case Transformation to Canonical form: More general case Consider more general case for which the system of equations has m equation with n variables (n ≥ m ) By performing n pivotal operations for any m variables (say, x1 , x 2 , called pivotal variables) the system of equations is reduced to canonical form as follows a11 x1 + a12 x 2 + + a1n x n = b1 ( E1 ) 1x1 + 0 x 2 + + 0 x m + a1′′, m +1 x m +1 + + a1′′n x n = b1′′ ( E1c ) a 21 x1 + a 22 x 2 + + a 2 n x n = b2 (E2 ) 0 x1 + 1x 2 + + 0 x m + a ′2′,m +1 x m +1 + + a 2′′n x n = b2′′ ( E 2c ) a m1 x1 + a m 2 x 2 + + a mn x n = bm (Em ) 0 x1 + 0 x 2 + + 1x m + a m′′ ,m +1 x m +1 + ′′ x n = bm′′ + a mn ( E mc ) It is possible to transform the set of equations to an equivalent canonical form from which at least one solution can be easily deduced 19 D Nagesh Kumar, IISc LP_1: Intro x m, Variables, x m +1 , , x n , of above set of equations is known as nonpivotal variables or independent variables. 20 D Nagesh Kumar, IISc LP_1: Intro Basic variable, Nonbasic variable, Basic solution, Basic feasible solution One solution that can be obtained from the above set of equations is xi = bi′′ xi = 0 for i = 1, ,m for i = (m + 1), ,n This solution is known as basic solution. Pivotal variables, x1 , x 2 , x m, are also known as basic variables. Nonpivotal variables, x m +1 , , x n , are known as nonbasic variables. Basic solution is also known as basic feasible solution because it satisfies all the constraints as well as non-negativity criterion for all the variables 21 D Nagesh Kumar, IISc LP_1: Intro 4