Professional Documents
Culture Documents
LPP
LPP
Venkateswarlu
vit
Dr. B. Venkateswarlu
vit
A set (or region ) is convex if only for any two points on the set. The line segment
joining those points lies entirely in the set. Thus, the collection of feasible solutions in a
L.P.P. form a convex set.
Eg:
CONVEX POLYGON:
A convex polygon is a convex set formed by the intersection of a finite number of
closed planes.
GRAPHICAL SOLUTION PROCEDURE:
STEP 1: Consider each inequality constraint as equation.
STEP 2: Take one variable (say x) in a given equation equal to zero and find the value
of other variable (say y) by solving that equation to get one co-ordinate [say (0,y)] for
the equation.
STEP 3: Take the second variable (say y) as zero in the equation and find the value of
first variable (say x) to get another co-ordinate [say (x,0)] for the equation.
STEP 4: Shade the appropriate areas as given by the constraints. If the constraint is
< type, shade the area below the line. If the constraint is >, shade the area above
the line. If the constraint is = type, do not shade any area and the line itself is the
region.
STEP 5: Repeat step 2 to 4 for other constraints.
STEP 6: Identify the feasible region by locating the area satisfying all constraints i.e.,
common with all the constraint areas. This region will have the optimum solution. If
there is no common area possible then the solution is infeasible.
STEP 7: Put the co-ordinates of each of such vertex in the objective function. Choose
that vertex which achieves the most optimal solution (i.e. in the case of maximization,
the vertex that gives the maximum value of z and in the case of minimization, the vertex
that gives the minimum value of z) solution can be obtains in the following manner.
Vertex
Number
1
2
.
.
.
n
Coordinates Of Vertices Of
Common Shaded Feasible Region
(x1, y1)
(x2,y2)
.
.
.
(xn,yn)
Optimum
Value Of Z
Z1 =
Z2 =
.
.
.
Zn =
NOTE: 1. It is better to leave 3 units at the bottom and also at the left side so that your
graphical solution will be clearly represented.
2. Divide the scale approximately on x axis and y-axis such that you can represent all its
values.
3. It is always better to have same scale on both axis.
Dr. B. Venkateswarlu
vit
SLACK VARIABLES:
n
-----------(1)
j 1
then the
j 1
The value of those variables can be interpreted as the amount of unused resources.
Eg: 2x1 + 3x2 4 (1)
5x1 + 4x2 6 (2)
(1) =>
=>2x1 +3x2 +x3 = 4
(2) =>
=> 5x1+4x2 +x4 = 6
here x3 and x4 are slack variables.
SURPLUS VARIABLES:
n
aij x j
j 1
bi
where i=k+1
--------------(2)
i=k+1..
j 1
variables. The value of these variables can be interpreted as the amount over and
above the required level.
Eg:
2x1 + 4x2 5
(1)
3x1 + 4x2 4
(2)
(1)=>
2x1 + 4x2 +x3 = 5
(2)=>
3x1 + 4x2 x4 = 4
Dr. B. Venkateswarlu
vit
a12
a22
.
.
.
.
am2
.....
......
.....
.....
.....
.....
.....
a1n
a2n
.
.
.
.
amn
b1
b2
.
B .
.
.
bm
NOTE:
(1) The minimization of a function z is equivalent to the maximization of the negative
expression of this function
i.e., min (z) = - max (-z)
= - max (z) where z= -z
(2) An inequality in one direction can be converted into an inequality in the opposite
direction by multiplying both sides by -1
eg: 5x1+4x2 2
=>
-5x1-4x2 -2
(3) An equality constraint can be expressed as two inequalities
Eg: 2x1+3x2 =5
=>
2x1+3x2 5
2x1+3x2 5
NOTE: Whenever
stack/surplus variables are introduced in the constraints, they
should also appear in the objective function with zero coefficients
Dr. B. Venkateswarlu
vit
SIMPLEX METHOD:
BASIC SOLUTION: Given a system of m linear equations with n variables (m<n). The
solution obtained by setting (n-m) variables equal to zero and solving for the remaining
m variables is called a basic solution.
The m variables are called basic variables and they form basic solution. The
(n-m) variables which are put to zero are called as non-basic variables.
NOTE:
n!
,
(n m)! m!
x3 =2/3
are non degenerate basic solutions
x1= 2, x2=1,
x3 = 0
Dr. B. Venkateswarlu
vit
C1
C2
C3
..
CB
B.V
xb
x1
x2
x3
xn+1
xn+2
xn+3
CB1
xn+1
b1
a11
a12
a13
..
CB2
xn+2
b2
a21
a22
a23
CB3
xn+3
b3
a31
a32
a33
Body matrix
Zj
Unit matrix
Z0
Z1
Z2
Z3
..
Zj -Cj
Z1- C1
Z2- C2
Z3- C3
...
Where Cj row denotes the coefficients of the variables in the objective function
CB column denotes the coefficients of the basic variables in the objective.
B .v column denotes the basic variables
XB values of the basic variables
(zj -cj) denotes the net evaluations
zj = CB xj
Z j C j C B x j C j , where z0 = CB XB j=1 to n
j 1ton
STEP 5: Compute the net evaluations (zj - cj), j=1, 2, n by using the relation.
Zj - cj = CB Xj-Cj
STEP 6: Examine the sign of (zj - cj), j=1 to n
Case 1: If all (zj cj) 0 then the current basic possible solution xB is an
optimum basic feasible solution.
CASE 2: If atleast one (zj cj) 0, then proceed onto the next step.
STEP 7: (To find the entering variable) or (key column). If there are more than one
negative (zj cj), then choose the most negative of them. Let it be (zr cr) for
same j = r
CASE 1: If all xir 0 (i=1,2,3,.m) then there is an unbounded solution to the
given L.P.P.
CASE 2: If atleast one xir 0 (i=1,2,..m)then the corresponding vector xr
enters the basis in basic variable column.
6
Dr. B. Venkateswarlu
vit
Dr. B. Venkateswarlu
vit
STEP 2: Introduce the positive artificial variables A1,A2,..An to the left hand side of all
constraints of or = type. The purpose of introducing artificial variables is just to
obtain an initial basic feasible solution .How ever, addition of these artificial variables
causes violation of the corresponding constraints. Therefore we would like to get rid of
these variables and could not allow them to appear in the final solution. To achieve this
we assign a very large penalty (-m for maximization and +m for minimization problems,
where M>0) as the coefficients of the artificial variables in the objective function.
STEP 3: Solve the modified L.P.P. by using simplex method. While making iterations,
using simplex method, one of the following three cases may arise.
CASE 1: If no artificial variable remains in the basis and the optimality condition is
satisfied, then the current solution is the optimal basic feasible solution.
CASE 2: If atleast one artificial variable appeared in the basis at zero level (i.e., with
zero value of xB column )and the optimality condition is satisfied, then the current
solution is an optimum basic feasible solution.
CASE 3: If atleast one artificial variable appears in the basis at non-zero level (i.e. with
positive value in xB column) and the optimality condition is satisfied, then the original
problem has no feasible solution. The solution satisfies the constraints but does not
optimize the objective function since it contains a very large penalty M and is called
pseudo-optimal solution.
[NOTE: While applying simplex method, whenever an artificial variable happens to
leave the basis, we drop that artificial variable and omit all the elements (entries)
corresponding to its column from the simplex table.]
TWO PHASE SIMPLEX METHOD:
The two-phase method is another method to solve a given problem in which
some artificial variables are involved. The solution is obtained in two phases as follows:
Phase 1: In this phase, the simplex method is applied to a specially constructed
auxiliary linear programming problem leading to a final simplex table containing a basic
feasible solution to the original problem.
Dr. B. Venkateswarlu
vit
Step 1: Assign a cost -1 to each artificial variable and a cost zero to all other variables
(in place of their original cost) in the objective function. Thus the new objective function
is Z * = -A1-A2-A3- . . . . . . An, where Ais are the artificial variable.
Step 2: Construct the auxiliary LPP in which the new objective function Z* is to be
maximized subject to the given set of constraints .
Step 3: Solve the auxiliary LPP by simplex method until either of the following three
possibilities arise.
Case 1: Max (Z*)<0 and atleast one artificial variable appears in the optimum
basis at a non-zero level .In this case the given LPP does not possess any
feasible solutions, stop the procedure.
Case 2: Max (Z*)=0 and atleast one artificial variable appears in the optimum
basis at zero level .In this case proceed to phase-2.
Case 3: Max (Z*)=0 and no artificial variable appears in the optimum basis. In
this case proceed to phase-2.
Phase 2: Use the optimum basic feasible solution of phase-1 as a starting solution for
the original L.P.P. .Assign the actual costs to the variables in the objective function and
a zero cost to every artificial variable that appears in the basis at the zero level. Use
simplex method to the modified simplex table at the end of phase-1 an optimum basic
feasible solution is obtained.
NOTE 1: In phase-1, the iterations are stopped as soon as the value of the new
objective function becomes zero because this is the maximum value. There is no need
to continue till the optimality is reached if the value becomes zero earlier than that.
NOTE 2: The new objective function is always of maximization type regardless of
whether the original problem is of maximization or minimization type.
NOTE 3: Before staring phase 2, remove all artificial variables from the table which
were non-basic at the end of phase -2.
Dr. B. Venkateswarlu
vit
10
Dr. B. Venkateswarlu
vit
11
Dr. B. Venkateswarlu
vit
ym
am1
am2
am3
.
c1
c2
c3.
b1
b2
b3
xn
a 1n
a 2n
a 3n
R.H.S. of
primal
constraints
amn
cn
bm
12
Dr. B. Venkateswarlu
vit
13
Dr. B. Venkateswarlu
vit
14
Dr. B. Venkateswarlu
vit
ASSIGNMENT PROBLEMS:
The assignment problem is a particular case of TP in which the objective is to assign a
number of tasks (or) jobs (or) sources (or) origins to an equal number of facilities machines (or)
destinations at a minimum cost (or) at a maximum profit. Suppose that we have m jobs to be
performed on m machines (one job to one machine) and our objective is to assign the jobs to
the machines at the minimum cost (or max profit) under the assumption that each machine of
each job can perform each machine.
The assigned problem can be stated in the form of m*n matrix.
1. Let c ij = cost of assigning ith job to jth machine
a ij=Supply capacity of souece (job) where ai= 1 for all values of i
bj= Demand of destination, where bj=1 for all values of j.
CONDITION TO BE SATISFIED IN ASSIGNMENT PROBLEM:
Number of rows(m) should be equal to number of columns (n).
CASE 1: If m < n add dummy rows accordingly so that m=n the cell values are taken as zero.
CASE 2: If m > n add dummy columns accordingly so that m=n the cell values are taken as
zero.
The assignment model is represented in a matrix form as follows:
1
2
3
. J
..n
C11
C12
C13
..cij
..c1n
A1=1
C21
C22
C23
.c2j
..c2n
A2=1
C31
C32
C33
.c3j
.c3n
A3=1
Ci1
Ci2
Ci3
.cij
.cin
Ai=1
Cm1
Cm2
Cm3
cmj
..cmn
Am=1
B1=1
B2=1
B3=1
Bj=1
Bn=1
UNIT II : THE ASSIGNMENT METHOD (OR) HUNGERIAN METHOD OR FAST FOOD
TECHNIQUE :
An efficient method for solving as assignment problem as developed by the Hungarian
mathematician D.konig is summarized below.
STEP 1: Determine the cost table from the given problem
CASE 1: If the number of sources is equal to the number of destinations, go to step 3.
CASE 2: If the number of sources is not equal to the number of destinations, go to step2.
STEP 2: Add a dummy source or dummy destination, so that the cost table becomes a square
matrix. The cost entries of dummy source/destination are always zero.
STEP 3: Locate the smallest element in each row of the given cost matrix and then subtract the
same from each element of that row.
STEP 4:In the reduced matrix obtained in step 3,locate the smallest element of each column
and then subtract the same from each element of that column. Each column and each
row now have atleast one zero.
STEP
a)
b)
c)
d)
15
Dr. B. Venkateswarlu
vit
CASE 1: If the number of assignment is equal to n (the order of the cost matrix), an optimum
solution is reached.
CASE 2: If the number of assignments is less than n (the order of matrix), go to next step.
STEP 7: Draw the minimum number of horizontal and\or vertical lines to cover all the zeros of
the reduced matrix this can be conveniently done by using a simple procedure.
a) Mark () rows that do not have any assigned zero.
b) Mark () columns that have zeros in the marked rows.
c) Mark () rows that have assigned zeros in the marked columns.
d) Repeat (b) and (c) above until chain of marking is completed.
e) Draw lines through all the unmarked rows and marked columns. This gives us the
desired minimum number of lines.
STEP 8: Develop the new revised cost matrix as follows.
a) Find the smallest element of the reduced matrix not covered by any of the lines.
b) Subtract this element from all the uncovered elements and add the same to all the
elements lying at the intersection of any two-line s.
STEP 9: Go to step(6) and repeat the procedure until an optimum solution is obtained.
MULTIPLE OPTIMAL SOLUTIONS:
In an assignment problems the facilities are assigned to jobs on a one-one basis using
Hungarian method.
While making an assignment in the reduced assignment matrix, it is possible to have two or
more ways, to strike of a certain number of zeros.
This indicates that there are more than the required number of independent zero elements. In
such cases, there will be multiple optimal solution with the same total cost of assignment.
UNBALANCED ASSIGNMENT PROBLEMS:
If the number of rows is not equal to number of columns in the cost matrix of the given
assignment problem, then the given assignment problem is said to be unbalanced.
First convert the unbalanced A.P into a balanced one by adding dummy rows or dummy
columns with zero cost elements in the cost matrix, depending upon whether m<n or m>n and
then solved by the Hungarian method.
RESTRICTIONS OR PROHIBITED IN ASSIGNMENT PROBLEMS:
Sometimes due to certain reason, a particular resource (say a man or machine) cannot be
assigned to perform a particular activity (say job). In such cases, the cost of performing that
particular activity by a particular resource is considered to be very large. (Written as M or
infinity) so as to prohibit the entry of this pair of resource activity into the final solution.
MAXIMIZATION IN A.P:
Step 1: When an A.P involves maximizing objective function, such a problem may be solved by
converting it into a minimization problem in either of the following two cases:
CASE 1: Locate the largest pay of element in the assignment table and then subtract all
the elements of the elements of the table from this largest element.
STEP 2: The transferred assignment problem so obtained can be solved by using Hungarian
method.
16
Dr. B. Venkateswarlu
vit
ASSIGNMENT PROBLEM
1. Supply at any source (machine) will be
one i.e., ai=1.
2.Demand at any destination may be any
positive quantity bj.
3.One or more source to any number of
destinations.
4.Travelling salesman problem and crew
assignment are its extension.
5.There will not be any Degeneracy in this
problem.
17
Dr. B. Venkateswarlu
vit
TRANS-SHIPMENT PROBLEMS:
A Transportation problem in which available commodity frequently moves from
one source to another source (or) destination before reaching its actual destination is
called a Transshipment problem. Such a problem cannot be solved as such by the
usual Transportation algorithm, but slight modification is required before applying it to
the transhipment problem.
TRANSPORTATION
TRANSSHIPMENT
S1
D1
S1
D1
S2
D2
S2
D2
NOTE: The total number of units transported is N, then add this N at supply and
demand at each source as well as destination. Then the problem is solved as
usually with the rules of T.P.
18
Dr. B. Venkateswarlu
vit
19