0% found this document useful (0 votes)
10 views36 pages

LP Simplex Algorithm 5

The document provides an overview of the Simplex Algorithm, a method for solving linear programming problems (LPP) with any number of decision variables. It includes examples of standard forms, constraints, and the process of manipulating the Simplex tableau to find optimal solutions. Key steps involve identifying entering and leaving variables, performing row operations, and ensuring all variables remain non-negative.

Uploaded by

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

LP Simplex Algorithm 5

The document provides an overview of the Simplex Algorithm, a method for solving linear programming problems (LPP) with any number of decision variables. It includes examples of standard forms, constraints, and the process of manipulating the Simplex tableau to find optimal solutions. Key steps involve identifying entering and leaving variables, performing row operations, and ensuring all variables remain non-negative.

Uploaded by

gcake1208
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Simplex Algorithm

General Formulation of a LPP


Simplex Method
• Algebraic Method for solving LPP
• Any number of Decision Variables (x)

Prof Sandeep Mondal, DMS, IIT(ISM), Dhanbad


Example STANDARD FORM

Maximize z  5 x1  4 x2 Maximize
Subject to the constraints,
z  5 x1  4 x2  0 s1  0 s2  0 s3  0 s4
6 x1  4 x2  24
Subject to the constraints,
x1  2 x2  6
 x1  x2  1 6 x1  4 x2  s1  24
x2  2 x1  2 x2  s2  6
 x1  x2  s3  1
x1 , x2  0
x2  s4  2
x1 , x2 , s1 , s2 , s3 , s4  0
Example
Maximize z  5 x1  4 x2 STANDARD FORM
Subject to the constraints, Maximize
6 x1  4 x2  24
z  5 x1  4 x2  0 s1  0 s2  0 s3  0 s4
x1  2 x2  6
Subject to the constraints,
1. All  x1  x2 are
constraints  1equations
with positive RHS 6 x1  4 x2  s1  24
x2  variables
(Use Slack or Surplus 2 to
make equations and if RHS is x1  2 x2  s2  6
x ,x 0
negative multiply by -1 to make it
1 2  x1  x2  s3  1
positive)
2. All variables are non-negative x2  s4  2
(for unrestricted variables
redefine using two-variables) x1 , x2 , s1 , s2 , s3 , s4  0
STANDARD FORM Maximize z  5 x1  4 x2  0 s1  0 s2  0 s3  0 s4
Subject to the constraints, 6 x1  4 x2  s1  24
x1  2 x2  s2  6
 x1  x2  s3  1
x2  s4  2

Simplex tableau x1 , x2 , s1 , s2 , s3 , s4  0

Basic Variables x1 x2 s1 s2 s3 s4 Solution


(Basis)
s1 6 4 1 0 0 0 24
s2 1 2 0 1 0 0 6
s3 -1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

s1 6 4 1 0 0 0 24
s2 1 2 0 1 0 0 6
s3 -1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0

Non-basic Variables: x1 and x2 are 0


1. If any coefficient in z-row > 0, the current solution is not optimal.
2. If not optimal, then one variable from Basic variables will be replaced by one Non-
basic variable.
3. The non basic variable with largest positive coefficient in z-row will enter the basis.
4. Compute ratio, by dividing the solution-column with the selected non-basic
column (as in 3). For negative and 0 coefficient, ratio is not computed.
5. The smallest ratio will be the variable which leaves the basis.
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

s1 6 4 1 0 0 0 24
s2 1 2 0 1 0 0 6
s3 -1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0

Largest positive coefficient in z-row


Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

s1 6 4 1 0 0 0 24 4
s2 1 2 0 1 0 0 6 6
s3 -1 1 0 0 1 0 1 -
s4 0 1 0 0 0 1 2 -
z 5 4 0 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

s1 6 4 1 0 0 0 24 4
s2 1 2 0 1 0 0 6 6
s3 -1 1 0 0 1 0 1 -
s4 0 1 0 0 0 1 2 -
z 5 4 0 0 0 0

Entering Variable: x1
Leaving Variable: s1
Minimum Ratio
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

s1 6 4 1 0 0 0 24 4
s2 1 2 0 1 0 0 6 6
s3 -1 1 0 0 1 0 1 -
s4 0 1 0 0 0 1 2 -
z 5 4 0 0 0 0

Entering Variable: x1
Leaving Variable: s1 Pivot Element

Pivot Element has to be made 1 and all the other


elements in that column will be made 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 6/6 4/6 1/6 0/6 0/6 0/6 24/6


s2 1 2 0 1 0 0 6
s3 -1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0

Divide x1 row by 6
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 1 2 0 1 0 0 6
s3 -1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0

Divide x1 row by 6
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 1 2 0 1 0 0 6
s3 -1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0

To make this element 0, do the operation,


s2 row = s2 row - x1 row
GAUSS-JORDAN ROW OPERATION
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 1-1 2-2/3 0-1/6 1-0 0-0 0-0 6-4
s3 -1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 0 4/3 -1/6 1 0 0 2
s3 -1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 0 4/3 -1/6 1 0 0 2
s3 -1 1 0 0 1 0 1
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0

To make this element 0, do the operation,


s3 row = s3 row + x1 row
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 0 4/3 -1/6 1 0 0 2
s3 -1+1 1+2/3 0+1/6 0+0 1+0 0+0 1+4
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 0 4/3 -1/6 1 0 0 2
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 0 4/3 -1/6 1 0 0 2
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
z 5 4 0 0 0 0

To make this element 0, do the operation,


z row = z row – (x1 row × 5)
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 0 4/3 -1/6 1 0 0 2
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
4– 0–
5 –
z (2/3) (1/6) 0 0 0
1×5
×5 ×5
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
s2 0 4/3 -1/6 1 0 0 2
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
z 0 2/3 –5/6 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4 6
s2 0 4/3 -1/6 1 0 0 2 3/2
s3 0 5/3 1/6 0 1 0 5 3
s4 0 1 0 0 0 1 2 2
z 0 2/3 –5/6 0 0 0

Largest positive coefficient in z-row


Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4 6
s2 0 4/3 -1/6 1 0 0 2 3/2
s3 0 5/3 1/6 0 1 0 5 3
s4 0 1 0 0 0 1 2 2
z 0 2/3 –5/6 0 0 0

Minimum Ratio
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4 6
x2 0 4/3 -1/6 1 0 0 2 3/2
s3 0 5/3 1/6 0 1 0 5 3
s4 0 1 0 0 0 1 2 2
z 0 2/3 –5/6 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
x2 0 (4/3) -1/6 1 0 0 2
×(3/4) ×(3/4) ×(3/4) ×(3/4)
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
z 0 2/3 –5/6 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
z 0 2/3 –5/6 0 0 0
Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 2/3 1/6 0 0 0 4
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
z 0 2/3 –5/6 0 0 0

To make this element 0, do the operation,


x1 row = x1 row – (x2 row × 2/3)
Simplex tableau
Basic x1 x2 s1 s2 s3 s4 Solution Ratio
Variables
(Basis)
x1 1 2/3 – 1/6 – 0– 0 0 4–
(2/3) (-1/8)×(2/3) (3/4)×(2/3) (3/2)×(2/3)
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
z 0 2/3 –5/6 0 0 0

x1 row = x1 row – (x2 row × 2/3)


Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 0 1/4 – 1/2 0 0 3
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 5/3 1/6 0 1 0 5
s4 0 1 0 0 0 1 2
z 0 2/3 –5/6 0 0 0

s3 row = s3 row – (x2 row × 5/3)


Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 0 1/4 – 1/2 0 0 3
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 0 3/8 - 5/4 1 0 5/2
s4 0 1 0 0 0 1 2
z 0 2/3 –5/6 0 0 0

s3 row = s3 row – (x2 row × 5/3)


Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 0 1/4 – 1/2 0 0 3
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 0 3/8 - 5/4 1 0 5/2
s4 0 1 0 0 0 1 2
z 0 2/3 –5/6 0 0 0

s4 row = s4 row – (x2 row × 1)


Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 0 1/4 – 1/2 0 0 3
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 0 3/8 - 5/4 1 0 5/2
s4 0 0 1/8 -3/4 0 1 1/2
z 0 2/3 –5/6 0 0 0

s4 row = s4 row – (x2 row × 1)


Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 0 1/4 – 1/2 0 0 3
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 0 3/8 - 5/4 1 0 5/2
s4 0 0 1/8 -3/4 0 1 1/2
z 0 2/3 –5/6 0 0 0

z row = z row – (x2 row × 2/3)


Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution Ratio
(Basis)

x1 1 0 1/4 – 1/2 0 0 3
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 0 3/8 - 5/4 1 0 5/2
s4 0 0 1/8 -3/4 0 1 1/2
z 0 0 –3/4 -1/2 0 0

z row = z row – (x2 row × 2/3)


Simplex tableau
Basic Variables x1 x2 s1 s2 s3 s4 Solution
(Basis)

x1 1 0 1/4 – 1/2 0 0 3
x2 0 1 -1/8 3/4 0 0 3/2
s3 0 0 3/8 - 5/4 1 0 5/2
s4 0 0 1/8 -3/4 0 1 1/2
z 0 0 –3/4 - 1/2 0 0

Since all elements in z row ≤ 0, the solution is optimal.

Optimal Solution:
x1 = 3 x2 = 3/2 z = 21

You might also like