LPP - Simplex Method
LPP - Simplex Method
LPP - Simplex Method
SOUMENDRA ROY
INTRODUCTION
• When the number of variables and/or number
of constraints increase, it becomes difficult to
visualize the convex polyhedron representing
the solution space, called Simplex and the
graphical method cannot be successfully
employed in such cases.
• It is developed by George B. Dantzig in 1947 is
an iterative and an efficient method for
solving LPP
BASIC TERMS
• STANDARD FORM: A linear programme in which
all of the constraints are written as equalities.
The optimal solution of the standard form of a
linear programme is the same optimal solution
of the original formulation of the linear
programme.
• SLACK VARIABLE: Variable added to a
constraint to convert it to an equation (=).
– A slack variable represents unused resources
– A slack variable contributes nothing to the
objective function value.
BASIC TERMS
• SURPLUS VARIABLE: Variable subtracted from a
constraint to convert it to an equation (=).
– A surplus variable represents an excess above a
constraint requirement level.
– Surplus variables contribute nothing to the
calculated value of the objective function.
• BASIC SOLUTION(BS): This solution is obtained by
setting any n variables (among m+n variables) equal to
zero and solving for remaining m variables, provided
the determinant of the coefficients of these variables is
non-zero. Such m variables are called basic variables
and remaining n zero valued variables are called non
basic variables.
BASIC TERMS
• BASIC FEASIBLE SOLUTION(BFS):
It is a basic solution which also satisfies the non
negativity restrictions.
BFS are of two types:
Degenerate BFS: If one or more basic variables
are zero.
Non-Degenerate BFS: All basic variables are non-
zero.
• OPTIMAL BFS: BFS which optimizes the objective
function.
BASIC TERMS
• TABLEAU FORM:
The form in which a LP must be written prior to
setting up the initial simplex tableau
When a LP is written in this form, its matrix contains
corresponding to basic variables, and the values of
these basic variables given by the quantity column
A further requirement is that the entries in the
quantity column be ‘greater than or equal to’ zero
• SIMPLEX TABLEAU: A table used to keep track of
the calculations made at each iteration when the
simplex solution method is employed
BASIC TERMS
• ZJ ROW: (∑CBXi) The numbers in this row under each variable
represents the total contribution of outgoing profit when
one unit of a non-basic variable is introduced into the basis
in place of a basic variable
• CJ – ZJ ROW:
The row containing the net profit (or loss) that will result
from introducing one unit of the variable indicated in that
column in the solution
Numbers in index row are also known as shadow prices
Thus a positive or negative number in the index row
indicates an algebraic reduction (or increment) in the
objective function if one unit of the variable at the head of
that column, were introduced in the basis
BASIC TERMS
• KEY COLUMN:
The column with the largest positive number in the net
evaluation row of maximization problem or the largest negative
numbers in the net evaluation row in a minimization problem
It indicates which variable will enter the solution next
• KEY ROW
The row corresponding to the variable that will leave the basis
in order to make room for the entering variable
The departing variable will correspond to the smallest positive
ratio found by dividing the quantity column values by the key
column values for each row
• KEY NUMBER: The element at the intersection of the key row
and key column
COMPUTATIONAL ASPECT OF SIMPLEX METHOD
• STEP 1: Formulate the LP model of the real world
problem
• STEP 2: Express the mathematical model of LP
problem in the standard form by adding slack
variables in the L.H.S. of the constraints and assign a
zero co-efficient to these in the objective function
• STEP 3: Design the Initial Feasible Solution
• STEP 4: Set up the Initial Simplex Tableau
a. The first row called the objective row of the simplex
table indicates the values of Cj which are the
coefficients of the (m+n) variables in the objective
function
COMPUTATIONAL ASPECT OF SIMPLEX METHOD
b. (i) The first column labeled CB also known as objective
column lists the coefficients of the current basic variables
in the objective function
(ii) The second column labeled the basic variables point
out the basic variables and are the slack variables
(iii) The third column labeled solution values indicates the
resources or the solution values of the basic variables
c. The body matrix consists of the coefficients of the decision
variables in the constraint set
d. The identity matrix in the initial simplex tableau
represents the coefficients of the slack variables that have
been added to the original inequalities to make them
equations
COMPUTATIONAL ASPECT OF SIMPLEX METHOD
e. To find an entry in the Zj row under a column, we
multiply the entries of that column by the
corresponding entries of CB column and add the
products i.e. Zj = Σ CB.aij
f. The final row labeled Cj – Zj called the net evaluation
row is used to determine whether or not the current
solution is optimal
g. A plus value in the net evaluation indicates a greater
contribution can be made by bringing the variable for
that column into the solution
h. A negative value indicates the amount by which
contribution would decrease if one unit of the variable
for that column were brought into the solution
INITIAL SIMPLEX TABLEAU
Cj (Contribution per unit) c1 c2 … cn 0 0 0 0 Minimum
Ratio
CB Basic Value of Coefficient Matrix Identity Matrix
Variables (B) Basic
Variables x1 x2 … xn s1 s2 ….. sm
b (=
XB)
0 s1 b1 a11 a12 … a1n 1 0 ….. 0
0 s2 b2 a21 a22 … a2n 0 1 ….. 0
: : : : : … :
: : : : : :
: : : : : :
0 sm bm am1 am2 … amn 0 0 ….. 1
Contribution loss Zj = Σ CB.aij 0 0 … 0 0 0 ….. 0
per unit
Net Contribution Cj - Zj c1 c2 … cn 0 0 ….. 0
per unit
COMPUTATIONAL ASPECT OF SIMPLEX METHOD
• STEP 5: Test the solution for optimality
• STEP 6: Revision of the Current Simplex Tableau
i. Determine which variable to enter into the solution matrix
next
ii. Determine the departing variable or variable to be replaced
iii. Identify the key number
• STEP 7: Evaluate (update) the new solution
i. Compute new values for the key row
ii. Compute new values for each remaining rows
iii. New entries in the CB column and xB column are entered in the
new table of the current solution
iv. Test for optimality
• STEP 8: Revise the Solution
DUALITY
INTRODUCTION
• Another type of LP problem, called the dual
problem of the original problem
• According to the duality theorem: “For every
maximization (or, minimization) problem in linear
programming, there is a unique similar problem of
minimization (or maximization) involving the same
data which describes the original problem”
FORMULATION OF LPP
• Max. Z = c1x1 + c2x2 + ….. + cnxn (Objective Function)
Subject to
a11x1 + a12x2 + ……. + a1nxn ≤ b1
a21x1 + a22x2 + ……. + a2nxn ≤ b2
: : :
: : : (Constraints)
am1x1 + am2x2 + …. + amnxn ≤ bm
and x1, x2, …., xn ≥ 0 (Non-negativity Restriction)
Then the corresponding dual LP problem is expressed as:
• Min. Z = b1y1 + b2y2 + ….. + bnyn (Objective Function)
Subject to
a11y1 + a21y2 + ……. + am1ym ≥ c1
a12y1 + a22y2 + ……. + am2ym ≥ c2
: : :
: : : (Constraints)
a1ny1 + a2ny2 + …. + amnym ≥ cn
RULES FOR CONSTRUCTING THE DUAL FROM THE
PRIMAL
1. The number of variables in the dual problem is equal to the
number of constraints in the original problem. The number of
constraints in the dual problem is equal to the number of
variables in the original problem.
2. Coefficients of the objective function in the dual problem come
from the right – hand side of the original problem.
3. If the original problem is a max. model, the dual is a min. model.
If the original problem is a min. model, the dual is a max. model.
4. The coefficients for the first constraint function for the dual
problem are the coefficients of the first variable in the constraints
for the original problem, and similarly for the other constraints
5. The right – hand sides of the dual constraints come from the
objective function coefficients in the original problem.
RULES FOR CONSTRUCTING THE DUAL FROM THE PRIMAL
6. The sense of the ith dual constraint is ‘=‘ if and only if the i th
variable in the original problem is unconstrained in sign.
7. If the original problem is a max. (min.) model, then after
applying rule 6, assign to the remaining dual constraints a sense
the same as (opposite to) the corresponding variable in the
original problem.
8. The ith variable in the dual variable is unconstrained in sign if
and only if the ith constraint in the original problem is an
equality.
9. If the original problem is a max. (min.) model, then after
applying rule 8, assign to the remaining dual variables a sense
opposite to (the same as) the corresponding constraint in the
original problem.
10.The dual of the dual problem is the original LPP itself.
ILLUSTRATION
Primal Problem Dual Problem
Min. Z = 6,000x1 + 4,000x2 Max G = 12y1 + 20y2 + 18y3
+ 40Y4
Subject to constraints Subject to constraints
4x1 + x2 ≥ 12 4y1 + 9y2 + 7y3 + 10y4 ≤ 6,000
9x1 + x2 ≥ 20 y1 + y2 + 3y3 + 40 y4 ≤ 4,000
7x1 + 3x2 ≥ 18 y1 ≥ 0, y2 ≥ 0, y3 ≥ 0, y4 ≥ 0
10x1 + 40x2 ≥ 40
x1 ≥ 0, x2 ≥ 0
PRIMAL PROBLEM
Variables x1 x2 Relation Constraints
Y1 4 1 ≥ 12
DUAL Y2 9 1 ≥ 20
PROBLEM
Y3 7 3 ≥ 18
Y4 10 40 ≥ 40
Relation ≤ ≤ Max. Z
Constraints 6,000 4,000 Min. G