You are on page 1of 6

Simplex Algorithm

Step-1: Objective Function

Maximization
Minimization

For Minimization type


Minimization

Z = - Max (- Z)

Step -2 : Whether all bi ( i = 1,2,..m) are all non- negative. If any bi is ve, then multiply
the corresponding in equation by (-1), so as to get all bi 0(i 1,2,.....m)
Step: -3: Convert all inequations to equations by introduction of slack/surplus variables. Put
the costs of these variables equal to zero.
Step: -4 Obtain an initial basic feasible solution to the problem.
X B B 1b

and put it in the first column of the simplex table


Step -5: Compute the net evaluations Z j C j C B Y j C j
Examine the sign of Z j C j
(i) If all Z j C j 0 , then the initial b.f.s XB is an optimum b.f.s.
(ii) If at least one Z j C j 0 , proceed on to next step.
Step 6: If there are more than one negative Z j C j ,then choose the most negative of them,
Let it be Z r C r for some j= r.
(i ) If all Yir 0(i 1,2,.....m) , then unbounded solution .
(ii) If at least one Yir 0(i 1,2,.....m) , then the corresponding vector Yr enters the
basis YB.

Step- 7: Compute the ratio

x Bi

,
Y

0
,
i

1
,
2
,...
m

ir
Yir

x BK
and choose the minimum of them
Ykr

Then the vector Yk leaves the basis YB .


The common element Ykr , which is in the k-th row and r-th column is the pivotal
element of the table.

Step : 8: Convert the pivotal element to unity by dividing the row by the leading (pivotal)
element itself and all other elements in its column to zeroes by making use of the
relations:

Y kj

Ykj
Ykr

Y ij Yij

: j = 1,2, n
Ykj
Ykr

.Yir

: i 1,2,.....m 1, i k

Step -9: Go to step 5 and repeat the computational procedure until either an optimum
solution is obtained or there is an indication of an un-bounded solution.

Simplex Table
CB

XB

YB

Ci
Cj

Yi
Yj

XB1
XB2
Z

C= ( C1
C2
Y1
Y2
Y11
Y21
Y12
Y22
Zj- Cj = j = 1,2,3,4

C3
Y3
Y31
Y32

C4 )
Y4
Y41
Y42

Zj Cj = CB Yj Cj : j = 1,2,3,4

Sample Problem
Max Z = 7 x1 5 x 2
S.t .

x1 2 x 2 6
4 x1 3 x 2 12
x1, x 2 0

x3 6
XB
x4 12

CB
0
0

x B1 6
6
Y11 1

YB
Y3
Y4

x B 2 12

3
Y12
4

XB
x3 6
x 4 12

C=(7 5
Y1 Y2
1 2
4* 3

Z=0

CB
0
7

YB
Y3
Y1

-7 -5

XB
X3= 3
X1= 3
Z = 21

C= 7
Y1
0
1
0

0 0)
Y3 Y4
1 0
0 1

5
Y2
5/4

1/4

0
Y3
1
0
0

0
Y4
-1/4

7/4

X1 = 3,

X2 = 0

Z = 21

Dual Simplex Algorithm


Step- 1: Obtain an initial B.F.S to the L.P.P and put the soln in the stating dual simplex table.
Step 2: Test the nature of Z j C j in the starting simplex table
(a) If all Z j C j and XBi are all non-negative for all i and j, then an optimum b.f.s.
has been obtained.
(b) If all Z j C j are non-negative and at least one basic variable, say, X Bi, is ve,
then go to step 3.
(c) If at least one Z j C j is ve , the method is not applicable to the given problem.
Step 3: Select the most negative of XBis. The corresponding basis vector then leaves the basis,
say YB. Let XBk be the most ve basis variable, so that Yk leaves YB.
Step 4: Test the nature of Ykj, j = 1,2..n.
(a) If all Ykj are non-negative , there does not exist any feasible soln to the given problem.
(b) If at least one Ykj is ve, compute the replacement ratios,

Z j C j

,Ykj 0 j 1,2,.....n
Ykj

and choose the maximum of these. The corresponding column vector, say Yr
Z r Cr
( corresponding to
), then enters the basis, say YB.
Ykr
Step 5: Test the new created dual simplex table for optimality.
Repeat the procedure until either an optimum b.f.s has been obtained ( in a
finite no. of steps) or there is an indication of the non- existence of feasible solution.

Start
Problem 1
Z1 = 63
X1 = 4.5, X2 = 3.5

Problem -3
Z3 =58
X1 = 4, X2 = 3.33

Problem -2
Z2 = 35
X1 = 5, X2 = 0

Z4 = No soln

Z5 = 55
X1 = 4, X2 = 3

Optimum Soln = Z0 = 55 : X1 = 4, X2 = 3
Problem

Branch & Bound Algorithm


Constraints in
Optimum Solution
additional (2)
Z0 X1 X2

0 x1 7,0 x 2 7

2
3

5 x1 7,0 x 2 7
0 x1 4,0 x 2 7

35 : 5 : 0

4
5

0 x1 4,4 x 2 7
0 x1 4,0 x 2 3

----55 : 4 : 3

CB
2
2
0

YB
Y1
Y2
S1

XB
4/7
12/7
-5/7
7

4
7

6:

Y1
1
0
0
0

10
3

Y2
0
1
0
0

Non- integer Original


Problem
Integer
Non- integer

9 7
:
2 2

58 : 4 :

Type of Soln

No Soln
Integer (optimal)
Y3
5/7
-1/7
-6/7
8/7

Y4
-3/14
5/14
-5/14*
2/7

S1
0
0
1
0

First operation
CB
2
2
0

Opti Soln :

YB
Y1
Y2
Y4

XB
1
1
2
4

X1 = 1, X2 = 1,

Max

Y1
1
0
0
0

Y2
0
1
0
0

Z=4.

Branch & Bound Technique


Maximum Z= 7 X1 + 9X2

X 1 3X 2 6

s.t.

7 x 1 X 2 35
0 X1, X 2 7

(1)
(2)
(4)

X 1 andX 2 are int egers.

Soln :

Y3
43/35
-1
12/5
16/35

Y4
0
0
1

S1
-3/5
1
-14/5
4/5

You might also like