Linear Programming Problem
Linear Programming Problem
Linear Programming Problem
where aij, bi, and cj are given constants. aij are coefficients ofdecision variables x’s,
bi are constraints values and cj are coefficients associated to objective function z
An example problem in formulated form
Example:
This should be done so that the utilization of machine hours by products x and
y should not exceed the available capacity. This can be shown as follows:
For Machine M1 0x + 2y
But the company can stop production of x and y or can manufacture any
amount of x and y. It cannot manufacture negative quantities of x and y. Hence we
have write,
Both x and y are 0 NON -NEGATIVITY CONSTRAINT
As the problem has got objective function, structural constraints, and non-
negativity constraints and there exist a linear relationship between the variables and
the constraints in the form of inequalities, the problem satisfies the properties of
the Linear Programming Problem.
Example:
INTRODUCTION
As discussed earlier, there are many methods to solve the Linear
Programming Problem, such as Graphical Method, Trial and Error method, Vector
method and Simplex Method. Though we use graphical method for solution when
we have two problem variables, the other method can be used when there are more
than two decision variables in the problem. Among all the methods, SIMPLEX
METHOD is most powerful method. It deals with iterative process, which
consists of first designing a Basic Feasible Solution or a Programme and proceed
towards the OPTIMAL SOLUTION and testing each feasible solution for
Optimality to know whether the solution on hand is optimal or not. If not an
optimal solution, redesign the programme, and test for optimality until the test
confirms OPTIMALITY. Hence we can say that the Simplex Method depends on
two concepts known as Feasibility and optimality.
The simplex method is based on the property that the optimal solution to a
linear programming problem, if it exists, can always be found in one of the basic
feasible solution. The simplex method is quite simple and mechanical in nature.
The iterative steps of the simplex method are repeated until a finite optimal
solution, if exists, is found. If no optimal solution, the method indicates that no
finite solution exists.
COMPARISION BETWEEN GRAPHICAL AND SIMPLEX METHODS
1. The graphical method is used when we have two decision variables in the
problem. Whereas in Simplex method, the problem may have any number
of decision variables.
2. In graphical method, the inequalities are assumed to be equations, so as to
enable to draw straight lines. But in Simplex method, the inequalities are
converted into equations by:
(i) Adding a SLACK VARIABLE in maximisation problem and
subtracting a SURPLUS VARIABLE in case of minimisation
problem.
Example:
Max Z = 12x1+16x2
Sub to
10x1+20x2 ≤ 120
8x1+8x2 ≤ 80
x1,x2 ≥ 0
Introduce non negative slack variables S1 and S2 to convert given LP
problem into standard form.
Sub to
10x1+20x2 + S1 = 120
8x1+8x2 + S2 = 80
x1,x2,S1,S2 ≥ 0
1 1
Cj 2 6 0 0
CB X X S S solutio
j BV 1 2 1 2 n Min ratio
1 2 120/20=
0 S1 0 0 1 0 120 6
0 S2 8 8 0 1 80 80/8=10
Zj 0 0 0 0
Cj- 1 1
Zj 2 6 0 0
1
Cj 12 6 0 0
CB s solutio
j BV x1 x2 s1 2 n Min ratio
1/ 1/2 6/(1/2)=1
16 X2 2 1 0 0 6 2
0 S2 4 0 -2/5 1 32 32/4= 8
1
Zj 8 6 4/5 0
Cj-
Zj 4 0 -4/5 0
New R2= Old R2- corresponding key element (new Key Row)
8 – 8 (1/2) = 8-4= 4
8 – 8 (1) = 8-8= 0
0 – 8 (1/20) = 0-8/20= -2/5
1 – 8 (0) = 1-0= 1
80 – 8 (6 ) =80- 48= 32
1 1
Cj 2 6 0 0
CB X X solutio Min
j BV 1 2 S1 S2 n ratio
-
16 X2 0 1 1/10 1/8 2
-
12 X1 1 0 1/10 1/4 8
1 1
Zj 2 6 2/5 1
Cj-
Zj 0 0 -2/5 -1
½ - ½ (1) = 0
1 – ½ (0) = 1
1/20 – ½ (-1/10) = 1/10
0 – ½ (1/4) = -1/8
6 – ½ (8) = 2
X1=8, x2= 2
Max Z = 12X1+16X2
12(8)+16(2) =96+32 =128
Example:
Max Z = 12x1+16x2
Sub to
10x1+20x2 ≤ 120
8x1+8x2 ≤ 80
x1,x2 ≥ 0
Introduce non negative slack variables S1 and S2 to convert given LP
problem into standard form.
Sub to
10x1+20x2 + S1 = 120
8x1+8x2 + S2 = 80
x1,x2,S1,S2 ≥ 0
Cj 12 16 0 0
CBj BV X1 X2 S1 S2 solution Min ratio
0 S1 10 20 1 0 120 120/20=6
0 S2 8 8 0 1 80 80/8=10
Zj 0 0 0 0
Cj-Zj 12 16 0 0
Cj 12 16 0 0
CBj BV x1 x2 s1 s2 solution Min ratio
16 X2 1/2 1 1/20 0 6 6/(1/2)=12
0 S2 4 0 -2/5 1 32 32/4= 8
Zj 8 16 4/5 0
Cj-Zj 4 0 -4/5 0
New R2= Old R2- corresponding key element (new Key Row)
8 – 8 (1/2) = 8-4= 4
8 – 8 (1) = 8-8= 0
0 – 8 (1/20) = 0-8/20= -2/5
1 – 8 (0) = 1-0= 1
80 – 8 (6 ) =80- 48= 32
Cj 12 16 0 0
solutio
CBj BV X1 X2 S1 S2 n Min ratio
16 X2 0 1 1/10 -1/8 2
12 X1 1 0 -1/10 1/4 8
Zj 12 16 2/5 1
Cj-Zj 0 0 -2/5 -1
½ - ½ (1) = 0
1 – ½ (0) = 1
1/20 – ½ (-1/10) = 1/10
0 – ½ (1/4) = -1/8
6 – ½ (8) = 2
X1=8, x2= 2
Max Z = 12X1+16X2
12(8)+16(2) =96+32 =128
Unbounded solution
Cj 2 3 0 0 0
4
CB S S2 solutio
j BV X1 X2 X3 1 S3 n Min ratio
0 S1 -1 -5 -9 1 0 0 2 2/-9
0 S2 3 -1 1 0 1 0 10 10/1=10
0 S3 2 3 -7 0 0 1 0 0/-7
Zj 0 0 0 0 0 0
Cj- 0 0
Zj 2 3 4 0
Cj 2 3 4 0 0 0
CB BV X1 X2 X S S S solutio Min ratio
j 3 1 2 3 n
- 1 9 92/-
0 S1 26 14 0 0 92 14
4 X3 3 -1 1 0 1 0 10 10/-1
0 S3 23 -4 0 0 7 1 70 70/-4
Zj 12 -4 4 0 4 0
Cj- - 0 -4 Solution is
Zj 10 7 0 0 Unbounded
New R1= Old R1- corresponding key element (new key row)
-1 – (-9) 3 = 26
-5 – (-9) -1 = -14
-9 – (-9) 1 = 0
1 – (-9) 0 = 1
0 – (-9) 1 = 9
0 – (-9) 0= 0
2 – (-9) 10 = 92
New R3= Old R3- corresponding key element (new key row)
2 – (-7) 3 = 23
3 – (-7) -1 = -4
-7 – (-7) 1 = 0
0 – (-7) 0 = 0
0 – (-7) 1 = 7
1 – (-7) 0 = 1
0 – (-7) 10 = 70
Max Z = 4x1+3x2
Sub to
x1 ≤ 5
x1-x2 ≤ 8
x1,x2 ≥ 0
Solutio
Cj 4 3 0 0 Min ratio
n
CBj BV X1 X2 S1 S2
0 S1 1 0 1 0 5 5/1=5
0 S2 1 -1 0 1 8 8/1= 8
Zj 0 0 0 0
Cj-Zj 4 3 0 0
Solutio
Cj 4 3 0 0 Min ratio
n
CBj BV X1 X2 S1 S2
4 X1 1 0 1 0 5 5/0 = ∞
0 S2 0 -1 -1 1 3 3/-1= -3
No variable is ready
Zj 4 0 4 0
to leave the basis
Solution is
Cj-Zj 0 3 -4 0
Unbounded
New R2= Old R2- corresponding key element (new key row)
1 – 1 (1) = 0
-1 – 1 (0) = -1
0 – 1 (1) = -1
1 – 1(0) = 1
8 – 1 (5) = 3
In case of the simplex method, the presence of multiple optimal solutions is specified
by a condition under which a Decision variable (non-basic variable) in the last
simplex table displays the optimal solution to the problem and the net amount of
contribution is zero.
After reaching the optimality, if at least one of the Decision variable (non-basic
variable) possess a zero value in Cj-Zj the multiple optimal solutions exist.
Max Z = 3X1+6X2
Sub to
X1+X2 ≤ 5
X1+2X2 ≤ 6
X1,X2 ≥ 0
Max Z = 3X1+6X2 + 0S1+0S2
Sub to
X1+X2 +S1 = 5
X1+2X2 +S2 = 6
X1,X2,S1,S2 ≥ 0
Solutio
Cj 3 6 0 0 Min ratio
n
CBj BV X1 X2 S1 S2
0 S1 1 1 1 0 5 5/1= 5
0 S2 1 2 0 1 6 6/2= 3
Zj 0 0 0 0
Cj-Zj 3 6 0 0
CBj BV X1 X2 S1 S2
Zj 3 6 0 3
Cj-Zj 0 0 0 -3
New R1= Old R1- corresponding key element (new key row)
1 – 1(1/2) =1/2
1 – 1 (1) = 0
1 – 1 (0) = 1
0 – 1 (1/2) = -1/2
5 – 1 (3) = 2
X1 = 0, X2 = 3
Max Z = 3X1+6X2
Max Z = 3(0)+6(3)
Max Z = 18
Solutio
Cj 3 6 0 0 Min ratio
n
CBj BV X1 X2 S1 S2
3 X1 1 0 2 -1 4
6 X2 0 1 -1 1 1
Zj 3 6 0 3
Cj-Zj 0 0 0 -3
New R2= Old R2- corresponding key element (new key row)
½ - ½ (1) = 0
1 - ½ (0) = 1
0 - ½(2) = -1
½ - ½(-1) = 1
3 - ½(4) = 1
X1= 4 , X2 = 1
Max Z = 3X1+6X2
DEGENERACY
Under Simplex Method, degeneracy occurs, where there is a Tie for the
minimum positive replacement ratio for selecting Leaving variable
(outgoing variable).
Cj 12 16 0 0
CBj BV X1 X2 S1 S2 solution Min ratio
0 S1 10 20 1 0 200 200/20 =10
0 S2 8 8 0 1 80 80/8 = 10
Zj 0 0 0 0
Cj-Zj 12 16 0 0
X1+4X2 ≤ 8
X1+2X2 ≤4
X1,X2 ≥ 0
X1+4X2 +S1= 8
X1+2X2 + S2= 4
X1,X2,S1,S2 ≥ 0
Solutio
Cj 3 9 0 0 Min ratio
n
CBj BV X1 X2 S1 S2
0 S1 1 4 1 0 8 8/4= 2
0 S2 1 2 0 1 4 4/2= 2
Zj 0 0 0 0
Cj-Zj 3 9 0 0
Since min ratio 2 in the last column of above table is not unique,
both the slack variables S1, and S2 may leave the basis. This is an
indication for the existence of degeneracy in the given L.P.
Problem. So we apply the procedure to resolve degeneracy (Tie).
First arrange the column S1 ,S2,X1, X2 in such a way that the initial
identity (basis) matrix appears first. Thus the initial simplex table
becomes.
Solutio
Cj 0 0 3 9 Min ratio
n
CBj BV S1 S2 X1 X2
0 S1 1 0 1 4 8 1/4
0 S2 0 1 1 2 4 0/2= 0
Zj 0 0 0 0
Cj-Zj 0 0 3 9
Which occurs for the second row. Hence S must leave the basic, and the key element is 2 as shown
2
above.
Solutio
Cj 0 0 3 9 Min ratio
n
CBj BV S1 S2 X1 X2
0 S1 1 -2 -1 0 0
9 X2 0 1/2 1/2 1 2
Zj 0 9/2 9/2 9
1- 4(0) =1
0 – 4(1/2) = -2
1- 4(1/2) = -1
4- 4(1) = 0
8- 4(2) = 0
X1= 0 X2 = 2
Max Z = 3X1+9X2
Max Z = 3(0)+ 9(2)
MAX Z = 18