Linear Programming
Preliminaries
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Objectives
To introduce linear programming problems (LPP) To discuss the standard and canonical form of LPP To discuss elementary operation for linear set of equations
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Introduction and Definition
Linear Programming (LP) is the most useful optimization technique Objective function and constraints are the linear functions of nonnegative decision variables Thus, the conditions of LP problems are 1. Objective function must be a linear function of decision variables 2. Constraints should be linear function of decision variables 3. All the decision variables must be nonnegative
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Example
Maximize subject to Z = 6x + 5 y 2x 3 y 5 x + 3 y 11 4 x + y 15 x, y 0 p Objective Function p 1st Constraint p 2nd Constraint p 3rd Constraint p Nonnegativity Condition
This is in general form
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Standard form of LP problems
Standard form of LP problems must have following three characteristics:
1. Objective function should be of maximization type 2. All the constraints should be of equality type 3. All the decision variables should be nonnegative
D Nagesh Kumar, IISc
Optimization Methods: M3L1
General form Vs Standard form
General form
Minimize subject to Z = 3 x1 5 x 2 2 x1 3 x 2 15 x1 + x 2 3 4 x1 + x 2 2 x1 0 x 2 unrestrict ed
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 ?
D Nagesh Kumar, IISc
Optimization Methods: M3L1
General form
General form
Transformation
Standard form
Standard form
1. Objective function
1. Objective function
Minimize
Z = 3 x1 5 x 2
Maximize
Z = Z = 3 x1 + 5 x 2
2. First constraint
2 x 1 3 x 2 15
2. First constraint
2 x1 3 x 2 + x3 = 15
3. Second constraint
3. Second constraint
x1 + x 2 3
Variables
x1 + x2 + x4 = 3
x3 and x 4 are known as slack variables
Optimization Methods: M3L1
D Nagesh Kumar, IISc
General form
General form
4.
Transformation
Standard form
Standard form
4. Third constraint 4x1 + x2 x5 = 2
Third constraint
4 x1 + x 2 2
Variable
x5 is known as surplus variable
5. Constraints for decision variables, x1 and x2
5. Constraints for decision variables, x1 and x2
x1 0
x 2 unrestricted
x 2 = x x 2 2 and x , x 0 2 2
Optimization Methods: M3L1
x1 0
D Nagesh Kumar, IISc
Canonical form of LP Problems
The objective function and all the equality constraints (standard form of LP problems) can be expressed in canonical form. This is known as canonical form of LPP Canonical form of LP problems is essential for simplex method (will be discussed later) Canonical form of a set of linear equations will be discussed next.
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Canonical form of a set of linear equations
Let us consider the following example of a set of linear equations
3 x + 2 y + z = 10
x 2 y + 3z = 6
(A0) (B0) (C0)
2x + y z = 1
The system of equation will be transformed through Elementary Operations.
10
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Elementary Operations
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.
11
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Transformation to Canonical form: An Example
Set of equation (A0, B0 and C0) is transformed through elementary operations (shown inside bracket in the right side)
x+ 2 1 10 y+ z = 3 3 3 1 A1 = A 0 3
8 8 8 y+ z = 3 3 3
1 5 17 y z = 3 3 3
(B1 = B0 A1 )
(C1 = C 0 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
Optimization Methods: M3L1
Transformation to Canonical form: Example contd.
Following similar procedure, y is eliminated from equation A1 and C1 considering B1 as pivotal equation:
x+0+ z = 4 2 A 2 = A1 B 2 3
0 + y z = 1
0 + 0 2 z = 6
3 B 2 = B1 8
1 C 2 = C1 + B 2 3
13
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Transformation to Canonical form: Example contd.
Finally, z is eliminated form equation A2 and B2 considering C2 as pivotal equation :
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)
14
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Pivotal Operation
Operation at each step to eliminate one variable at a time, from all equations except one, is known as pivotal operation. Number of pivotal operations are same as the number of variables in the set of equations. Three pivotal operations were carried out to obtain the canonical form of set of equations in last example having three variables.
15
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Transformation to Canonical form: Generalized procedure
Consider the following system of n equations with n variables
a11 x1 + a12 x 2 + LLL + a1n x n = b1 a 21 x1 + a 22 x 2 + LLL + a 2 n x n = b2 M M a n1 x1 + a n 2 x 2 + LLL + a nn x n = bn
( E1 ) (E2 ) M M ( En )
16
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Transformation to Canonical form: Generalized procedure
Canonical form of above system of equations can be obtained by performing n pivotal operations Variable x i (i = 1 L n ) is eliminated from all equations except j th equation for which a ji is nonzero. 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 =
Ej a ji
2. Subtract a ki times of ( E j ) equation from k th equation (k = 1, 2,L j 1, j + 1,L, n ) , i.e., Ek aki E j
17
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Transformation to Canonical form: Generalized procedure
After repeating above steps for all the variables in the system of equations, the canonical form will be obtained as follows:
1x1 + 0 x 2 + LLL + 0 x n = b1 0 x1 + 1x 2 + LLL + 0 x n = b2 M M 0 x1 + 0 x 2 + LLL + 1x n = bn ( E1c )
c ( E2 )
M M
c ( En )
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 Optimization Methods: M3L1
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)
a11 x1 + a12 x 2 + LLL + a1n x n = b1 a 21 x1 + a 22 x 2 + LLL + a 2 n x n = b2 M M ( E1 ) (E2 ) M M (Em )
a m1 x1 + a m 2 x 2 + LLL + a mn x n = bm
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
Optimization Methods: M3L1
Transformation to Canonical form: More general case
By performing n pivotal operations for any m variables (say, x1 , x 2 , L x m, called pivotal variables) the system of equations reduced to canonical form is as follows
1x1 + 0 x 2 + LLL + 0 x m + a1,m +1 x m +1 + LLL + a1n x n = b1 0 x1 + 1x 2 + LLL + 0 x m + a 2,m +1 x m +1 + LLL + a 2n x n = b2 M M 0 x1 + 0 x 2 + LLL + 1x m + a m,m +1 x m +1 + LLL + a mn x n = bm ( E1c )
c (E2 )
M M
c ( Em )
Variables, x m +1 , L , x n , of above set of equations is known as nonpivotal variables or independent variables.
20
D Nagesh Kumar, IISc
Optimization Methods: M3L1
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,L, m
for i = (m + 1),L, n
This solution is known as basic solution.
Pivotal variables, x1 , x 2 , L x m, are also known as basic variables. Nonpivotal variables, x m +1 , L , 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 nonnegativity criterion for all the variables
21
D Nagesh Kumar, IISc
Optimization Methods: M3L1
Thank You
22
D Nagesh Kumar, IISc
Optimization Methods: M3L1