Professional Documents
Culture Documents
OPERATIONS RESEARCH
0.1 Introduction
The tern Operations Research was introduced in 1940 in United Kingdom. The new
science came into existence in a military context. During World War II, military management
called on scientists from various disciplines and organised them into teams to assist in solving
strategic and tractical problems, i.e., to discuss, evolve and suggest ways and means to
improve the execution of various military operations. This new approach to systematic and
scientific study of the operations of the system was called Operations Research or Operational
Research (OR).
Let X = (x1, x2, …, xn) be an ordered n-type and R n X
X x1 , x 2 ,..., x n
. If X
and Rn satisfies some postulates suggested, then we say x is an n-dimensional vector and Rn is
an n-dimensional vector space.
Definition:
Let V be a set such that X, Y, Z V and a, b, ¡ , then the following postulates hold
(i) X+YV
(ii) X+Y=Y+X
(iii) (X+Y) + Z = X + (Y+Z)
(iv) There exists an element 0 V, called the null vector or zero vector such that
X + 0 = X.
(v) There exists an element -XV, called additive inverse such that X + (-X) = 0.
(vi) aXV
(vii) a (X+Y) = aX + aY
(viii) (a+b) X = aX + bX
(ix) ab (X) = a (bX)
School of Distance Education, University of Calicut
(x) 1. X = X (1 is the identity in the Real field)
Then V is called a vector space and its elements are called vectors.
Eg: let X = (x1, x2 … xn) be an ordered n-tuple of real members and Rn be the set of all such
n-tuples. If we define the sum of the n-tuples as
and the product with the real number a as aX = (ax1, ax2 … axn)
Then Rn is a vector space, where zero vector 0 = (0,0 … 0)
Linear Dependence
If, however, this is so only if ai = 0 i. Then the vectors are said to be linearly independent.
Definition: V is said to be of dimension m, if there exists at least one set of m linearly
independent vectors in V, while every set of m + 1 vectors in V is linearly dependent. The
linearly independent set is called a basis of V.
m
ie., a 0 X a i Yi 0 where a 0 0.
i 1
ie., any vector of V can be expressed as a linear combination of the linearly independent
vectors Yi 's.
Note: The set of linearly independent vectors spanning a vector space is not unique. So basis
of a vector is not unique. But once the basis is chosen, every vector of V has unique linear
combination of vectors of the chosen basis.
Euclidean Space
(i) X, Y Y, X
(ii) X Z, Y X, Y Z, Y , Z V
(iii) aX, Y a X, Y ; a R
(iv) X, X 0 if X 0; X, X 0, if X 0
Two non-zero vectors are said to be orthogonal if their inner product is zero.
Definition: A vector space with an inner product defined on it is called a Euclidean space.
n-tuples X, Y R n . . Let,
Then the n-tuples are called vectors and R n is called a Eucledean space.
Norm of a Vector
For measuring the size of a vector norm is defined. There are many ways of defining a
norm. The following are the properties which all the various definitions of norms must
possess.
Operations Research 7
School of Distance Education, University of Calicut
Definition: Let X, Y be vectors, then any real number X , satisfying (i), (ii) and (iii),
where
(i) X 0, X 0 X 0
(ii) aX a X , a R
X X'X
1
2
The Euclidean norm of an n-vector X is defined as
1
x12 x 22 ... x 2n
2
, usually denoted as X .
where a ij ; i 1,2,... m and j 1,2,...n are real numbers. We can represent (1) in matrix
notation as AX = B, where
and b1 b2 ... bm
T
Let Pj , j 1, 2,...n denote the column vectors of A and Qi , i 1,2,...,n denote the
row vectors of A.
Operations Research 8
School of Distance Education, University of Calicut
Q1 Q2 ...Qm
T
XB
(2)
X=0 (*)
which is called trivial solution.
If A is singular, there can be infinitely many non-trivial solution to AX 0.
non-singular if A 0.
Consider the system of linear equations as given is (1) the system is said to be consistent if it
has a solution, otherwise it is inconsistent.
(1) can be represented as Q1 Q2 ... Qm X B as in (2) where Q1 ,Q2 ,...,Qm are the row
T
vectors of the matrix A. Let r of these vectors Q1 ,Q2 ,...,Qr are linearly independent, where r
< m.
Q1 b1 Q1 b1
Q Q
or
2 X b 2 is equivalent to 2 X b2
Qm bm Qr br
Operations Research 9
School of Distance Education, University of Calicut
Theorem: Ar is non-singular if and only if the column vectors P1 , P2 ,..., Pr are linearly
independent.
possible to express any one of P1 , P2 ...Pr , (Say Pm) as a linear combination of P1 , P2 ...Pr
0,0,...,0
T
. Then the A r 0, This would contradict the assumption that A r is non-
singular.
Conversely,
let P1 P2 ...Pr are linearly independent. Then there do not exists values 1 , 2 ,..., r not
1
ie., P1P2 ... Pr 0
2
(3)
r
it means the only possible solution of the above system (3) in r unknowns 1 , 2 , ..., r is the
But it is not unique, though there be at least one set of m linearly independent vectors
out of n and the maximum number of sets of m linearly independent vectors out of n is n Cm .
Operations Research 10
School of Distance Education, University of Calicut
For each choice of m linearly independent sets of vectors P1 , P2 , ..., Pm of A, there is
an infinity of solutions to the system of equations corresponding to arbitrary values of
x m1 , x m2 ... x n . In particular we may put x m1 a m2 ... x n 0 and get the
corresponding solution.
The corresponding linearly independent column vectors are called the BASIC
VECTORS or BASIS.
A set K E n is said to be convex, if the convex linear combination of any two points
X 1X1 2X2 ... mXm is called the convex linear combination of points
Xi , i 1,2,...,m.
Theorem 1. For a set K to be convex it is necessary and sufficient that every convex linear
combination of points in K belongs K.
Definition 1. The convex hull of a set S is the intersection of all convex sets of which S is a
subset. Convex hull of S in denoted by [S]
Set S = [S] =
Operations Research 11
School of Distance Education, University of Calicut
Definition: A point X of a convex set K is an extreme point or vertex of K, if it is not possible
to find two points X1 and X 2 such that X 1 X1 X2 , 0 1.
Convex Polyhedron
The set of all convex combinations of a finite number of points Xi , i 1,2,...,m is
the convex polyhedron spanned by these points.
The convex polyhedron is a convex set.
Hyper planes, Half spaces and Polytopes
Let X E n , C 0 a constant row-n-vector and R. Then we define.
f X C11 x12 C22 x 22 ... Cnn x n2 C12 x1x 2 C13x1x13 C23x 2 x 3 ...
... where Cij R, i, j 1,2...n
is called a quadratic form in the n variables x1 , x 2 ,... x n . If we substitute a ii for cii and
a ij a ji 12 Cij , i j,
the quadratic form can be put as
Operations Research 12
School of Distance Education, University of Calicut
f x a x a 22 x ... a nn x a11x1x 2 a 21x 2 x 2 ...
2
11 1
2
2
2
n
n n
a ijx i x j X 'AX
i 1 j 1
where X is the column vector x1 x 2 x 3 ...x n ' and A is the real symmetric matrix.
1 2 3 x1
can be put as x1 x 2 x 3 2 2 5 x
2 2
3 5
2 7 x 3
Definition: A quadratic form X'AX is said to be positive definite
If X'AX 0 for all X 0.
It is said to be positive semi definite if X'AX 0 for all X 0 and there is at least
*******************
Operations Research 13
CHAPTER 1
EXTREMA OF FUNCTIONS
Definition: 1.1
One can easily see that f(X) is continuous at X0 if and only if X X0 implies f(X)
f(X0). If f(X) is continuous at every point in S, we say f(X) is continuous in S.
Let xj = [0, 0, …, xj, 0, …, 0]' be an n-vector in En with all its components zero
except the jth which is xj,
Definition: 1.2
Definition: 1.3
If f(X) has continuous partial derivatives with respect to each of its variables, it is said
to be differentiable.
f X ΔX f X ΔX f X 1
2
ΔX H X ΔX e X ,ΔX ΔX
' ' 2
Where e X , ΔX 0 as ΔX 0 , and,
2 f 2 f 2 f
x 2 x1x2
L
x1xn
1
2 f 2 f 2 f
L
H X x2 x1 x22 x2 xn
L L L L
2 f f
2
2 f
x x xn x2
L
xn2
n 1
Definition: 1.4
Let f(X) be a differentiable function and Y be a unit vector in En. The directional
lim f ( X tY ) f ( X )
derivative of f(X) in the direction of Y is defined as
t 0 t
f X tY f X tY f x + terms in t 2
'
lim f ( X tY ) f ( X )
= Y' f(X)
t 0 t
f
The unit vector in the direction of the gradient vector is , and so the rate of change of
| f |
i.e. |Y' f| | f| . This means that the rate of change of f(X) in the direction of the gradient
vector is greater than the rate in any other direction. Thus f(X) is increasing fastest in direction
Operations Research 15
School of Distance Education, University of Calicut
of f and decreasing fastest in the direction of - f . The directions f and - f are
respectively called directions of steepest ascent and steepest descent.
Definition: 1.5
Definition: 1.6
The word extremum is used to indicate either maximum or minimum. The mathematical
analysis involved in discussing maximum of a function is same as in a minimum. A
minimization problem can be easily converted into a maximization problem using the relation
Max f x Min f X
Let X En and f(X) be a real valued function with second order partial derivatives.
Setting X = X0 and X0 + X0 = X , we may write the Taylor‟s as
f X f X 0 ΔX 0 f 0 1
2 0 0 0 0
ΔX H X ΔX e X ,ΔX 0 X 0
' ' 2
(1.1)
Operations Research 16
School of Distance Education, University of Calicut
that ( X0) f0 = 0. Since in the unconstrained case the components of X0, namely
'
This is the necessary condition that f(X0) may be an extremum. From (1.1) the sign of
f(X) – f(X0) for all X in N can be made depend upon the sign of the quadratic expression
Defenition: 1.7
The function f(Y, Z) is said to have a saddle point at (Y0, Z0) if f(Y0, Z) f(Y0, Z0)
f(Y, Z0) for all (Y, Z) in the neighbourhood of (Y0, Z0).
Suppose in (1.1) the quadratic expression ( X0)'H0( X0) is indefinite, that is, the
quadratic expression can take both positive and negative values depending upon the choice of
X0. Then By a suitable transformation of the form X0 = B U0 where B is a suitable n n
matrix, the indefinite quadratic form ( X0)'H(X0)( X0) can be written as
C1 0 0
C2 0
.
.
.
'
ΔU 0 Cm ΔU 0
Cm 1
.
.
0 .
0 0 Cn
Y0
Write U0 =
Z 0
becomes,
The sign of f(X) – f(X0) now depends upon the sign of the above expression.
Notice that for Y0 0, Z0 = 0, f(X) - f(X0) 0 and for Y0 = 0, Z0 0, f(X) – f(X0) 0
.
f
= 0 2x1 + 4x2 + 4x3 = 0
x1
f
= 0 4x1 + 8x2 + 16x3 = 0
x2
f
= 0 4x1 + 16x2 + 8x3 = 0
x3
2 f 2 f 2 f
x1 x1x2 x1x3
2
1 2 2
2 f 2 f 2 f
H X 2 2 4 8
x2x3 x2 2 x2x3
2 8 4
2 f 2 f 2 f
x3x1 x3x2 x32
The principal minors are 2, 0 and –32. Hence H(X) is indefinite. Therefore, f(X) has a saddle
point at X = (0, 0, 0)'
gi(X) = 0 , i = 1, 2, …, m (C1)
Operations Research 18
School of Distance Education, University of Calicut
for all X in some nonempty subset S1 of S, where each gi(X) is also a real valued function.
Defenition: 8
f(X) is said to have a relative extremum at X0 subject to the constraint (C1) if there
exists a - neighbourhood N of X0 such that f(X) f(X0) (maximum) or f(X) f(X0)
(minimum) for every X S1 N. In either case X0 is a point of constrained extremum of
f(X).
Theorem : C1
Let X En and gi(X), i = 1, 2, …, m be 'm' real valued functions in some
neighbourhood of X0 in S En. Also let
gi X 0 0, i 1, 2,L , m (C2)
g1 g 2 L g m
Also let the Jacobian 0 at X0.
( x1 x2 L xm )
Then there exists a neighbourhood N of xm1,0 , xm 2,0 ,..., xn,0 and functions 1, 2, …, m
Theorem: C2
Let X S En and f(X) be a real valued differentiable function. Also let
gi(X) = 0 , i = 1, 2, …, m (C3)
Where each gi is a real differentiable function and for each X in S the m x n matrix
gi
x j , i = 1, 2, …, m , j = 1, 2, …, n (C4)
is of rank m. Further let f(X) has a relative extremum at X0 subject to the constraints. Then
there exists real numbers i , i = 1, 2, …, m, such that X0 is a stationary point of the function
Operations Research 19
School of Distance Education, University of Calicut
m
F(X) = f(X) + i g i ( X ) (C5)
i 1
Proof:-
g1 , g 2 ,..., g m
0 (C6)
x1 , x2 ,..., xm
f f gi
x1 + x 2+ … + xn = 0 i = 1, 2, …, m (C7)
x1 x2 xn
g i g i gi
x1 + x 2+ … + xn = 0, i = 1, 2, …, m (C8)
x1 x2 xn
n f g1 gm
x λ1
xj
... λ m xj = 0
x j
(C9)
j 1 j
f g gm
λ1 1 ... λ m = 0 , j = 1, 2, …, m (C10)
xj xj xj
Operations Research 20
School of Distance Education, University of Calicut
f
g1 g 2 g m 1 x
x . . . 1
x1 x1 f
1 2
. . . . . . x2
.
or . . . . . . = - .
.
. . . . . . .
g1 g 2 g m . .
. . . f
xm xm xm m
xm
Using (C6) the above sets of equations will have a unique solution 1, 2 , …, m .
Therefore, (C9) reduces to
n f g gm
λ1 1 ... λ m xj = 0
x j
j m 1 xj xj
f g gm
λ1 1 ... λ m = 0 for j = m+1, …, n (C11)
xj xj xj
f g gm
λ1 1 ... λ m = 0 , j = 1, 2, …, n
xj xj xj
F(X )
ie = 0 , j = 1, 2, …, n, at X0
xj
Remark:
The function F(X) is usually referred to as Lagrangian function and the parameters
1, 2 , …, m are called Lagrangian multipliers.
F(X )
The solution x 1,0 , x2,0 ,...xn,0 ,...λ1 , λ 2 ,...λ m obtained by solving
xj
= 0,
Operations Research 21
School of Distance Education, University of Calicut
Example:
Maximize f(X) = | X |2 , X E3
x12 x2 2 x32
Subject to g1(X) = -1=0
4 5 25
g2(X) = x1 + x2 – x3 = 0
The associated Lagrangian function is
x2 x 2 x 2
F X x12 x22 x32 λ1 1 2 3 1 λ 2 x1 x2 x3
4 5 25
F x
= 0 2x1 + 1 1 + 2 = 0
x1 2
F 2
= 0 2x2 + 2 x2+ 2 = 0
x2 5
F 2
= 0 2x3 + 1 x3- 2 = 0
x3 25
2 2 5 2 25 2
x1 = , x2 = , x3 =
1 4 21 10 21 5
But g2(X) = x1 + x2 – x3 = 0
2 5 25
2 + + =0
1 4 21 10 2 1 50
g1(X) = 0
2 0
2 5 25
4 + 2 10 + 2 5 = 0
1 1 1
At λ1 10, x1 1 λ 2 , x2 1 λ 2 , x3 5 λ13
3 2 6
6 5
Hence 2 = .
19
Operations Research 22
School of Distance Education, University of Calicut
2 5 3 5 3 5
Thus the stationary points are , , 2
and |X| = 10
19 19 19
75
At 2 = - we get the stationary point as
17
40 35 5 75
, , and so |X| = 17
646 646 646
75
Hence the required minimum values are 10 and .
17
1.3 Convex functions
Definition: 9
A subset K En is said to be convex if for any two points X1, X2 K, the point
X = X1 + (1- ) X2 also belongs to K for every , 0 1.
Definition: 10
A P
M R N
X1 X X2
Notice that x1 and x2 are any two points and x is such that X = (1 - )X1 + X2 for some ,
0 1.
Operations Research 23
School of Distance Education, University of Calicut
From the figure PR = f(X) , AM = f(X1) , BN = f(X2) and CR = (1 - ) f(X1) +
f(X2)
PR CR
Theorem: D1
Let X En and f(X) = X'AX be a quadratic form. If X'AX is positive semi definite,
then it is a convex function.
Proof:-
The aim of the next theorem is to establish the fact that if f(X) is a convex set, then
any relative minimum point will be a global minimum.
Theorem: D2
Operations Research 24
School of Distance Education, University of Calicut
Also if this minimum is attained at more than one point, then the minimum is attained at the
convex linear combination of all such points.
Proof:-
Let f(X) have a relative minimum at X0. Let X1 K. Then for any > 0 it is possible
to choose , 0 < < 1, such that there exists X = X0 + (1 - )X1, lying in the -
neighborhood of X0. By the definition of relative minimum, with X in this neighborhood.
f(X0) f(X)
ie f(X0) f( X0 + (1 - )X1)
f(X0 ) + (1 - )f(X1)
(1 - )f(X0) (1 - ) f(X1)
f(X0) f(X1)
To prove the second part, let Y0 be another point where the minimum is attained. Then
f(X0) = f(Y0)
Take X = X0 + (1 - ) Y0
f(X0) + (1 - ) f(Y0)
This means that minimum is attained at all convex linear combination of X0 and Y0. This
proves the theorem.
Theorem: D3
X1 = X2 + (1 - )X3 , 0 1
Operations Research 26
School of Distance Education, University of Calicut
Theorem: D4
Let f(X) be a convex differentiable function defined in a convex domain K En. Then
f(X0) , X0 K is a global minimum if and only if
Proof:-
f(X) f(X0)
f( X + (1 – ) X0) f(X0)
f X 0 (X X 0 ) f (X 0 )
0
(X – X0)' f(X0) 0
(X – X0)' f(X0) 0
f(X) f(X0)
A general programming problem can be written in the following manner. Let f(X) be
a function whose optimum value is to be obtained under certain limitations. The limitations
are usually expressed through a set of inequalities called constraints. Typically constraints can
be written as
gi(X) 0 , i = 1, 2, … m.
Operations Research 27
School of Distance Education, University of Calicut
Thus a programming problem can be written as
Subject to gi(X) 0 , i = 1, 2, … m.
Theorem: E1
Proof:-
gi(X3) = gi ( X1 + (1 - )X2)
gi (X1) + (1 - ) gi (X2)
0
*******************
Operations Research 28
`
CHAPTER 2
LINEAR PROGRAMMING
Optimise f ( x ) = c1x1 + c2 x2 + … + cn x n
Subject to a 11 x1 + a 12 x 2 + … + a 1n x n b 1
a 21 x1 + a 2 2 x 2 + … + a 2 n x n b 2
……………………………………. (1)
a m1 x1 + a m 2 x 2 +… + a mn x n b m,
Where x 1 , x 2, …, x n 0.
OR,
Optimise f ( x ) = c1x1 + c2 x2 + …+ cn x n
n
A linear constraint of the form a
j 1
ij xij bi can be converted into an equality by
adding a new non-negative variable to the left hand side of the inequality. Such a variable
carries a numerical value, which is the difference between the right and left hand side of the
inequality and is known as a slack variable. In a similar way the non-negative variable
n
subtracted from LHS of the inequality of the form a
j 1
ij x j bi for converting it into a
Using the slack variables xn+1, xn+2, …, xm+n, the optimization problem gives in (1) can be
rewritten into,
Optimize,
subject to
xi 0 , i = 1, 2, …, m+n
subject to AX = B (2)
X 0
Operations Research 30
School of Distance Education, University of Calicut
a11 a12 . . . a1n 1 0 0 . . . 0
a 0 1 0 . . . 0
21 a22 . . . a2 n
A= . . . . . . . . . . . . .
. . . . . . . . . . . . .
am1 am 2 . . . amn 0 0 . . . . .1
B = [b1 b2 … bm] T
X = [x1 x2 … xn ]T.
In this system of equations, if any of „n-m‟ variables are given the value zero, the
remaining system of „m‟ equations in „m‟ unknown may have a unique solution.
This solution along with the assumed zeros is a solution of AX = B. It is called a Basic
Solution. The „m‟ variables remaining in the system after „n-m‟ variables have been put equal
to zero are called the Basic Variables or simply a Basis. The rest of the variables may be
called non-basic. Since the unique solution of „m‟ equations in „m‟ variables may also contain
zeros, a basic solution contains at least „n-m‟ zeros.
If the number of zeros in the basic solution is „n-m‟ then the solution is called a non-
degenerate basic solution and if it is greater than n-m , the solution is said to be
degenerating.
In a basic solution if all values of xj‟s are 0, then the solution is called ‘Basic
Feasible Solution’.
Operations Research 31
School of Distance Education, University of Calicut
A Basic Feasible solution which optimize the objective function f(X) is called an
Optimum solution. In order to find a set of „m‟ basic variables out of n variables of the
system of linearly independent set of equations AX = B, it requires only to identify m linearly
independent column vectors of the matrix A.
Where,
AX = B can be written as
The m x n matrix on the LHS is non singular because the basic vectors which are the
columns of this matrix are linearly independent. Pre multiplying both sides by its inverse, we
get,
x1
x b1 a 1,m 1 x m 1 . . . a 1,n x n
2
. b 2 a 2,m 1 x m 1 a 2,n x n
= ... ... ... :
.
. ... ... ... :
b a a m.n x n
m m , m 1 x m 1 . . .
xm
Operations Research 32
School of Distance Education, University of Calicut
or
x 1 a 1,m 1 x m 1 . . . a 1,n x n b1
x 2 a 2,m 1 x m 1 a 2,n x n b 2
... ... ... : ….(4)
... ... ... :
x m a m ,m 1 x m 1 . . . a m.n x n b m
Equations (4) which are equivalent to (3) are called the canonical form of the equations
( b1 b1 , , … , b1 , 0, 0, … 0)
In an LPP if f(X) = c1x1 + c2x2 + … + cmxm + … +cnxn is the objective function associated
with the constraints of the form (3),
After eliminating the basic variables from the objective function using (4) we get
m n
f(X) = bi ci +
i 1
c x
j m 1
j j
m
Where c j = cj - c
i 1
i a ij , j = m +1, m + 2, …, n
In the system of equations AX = B of (1) the columns corresponding to the m variables, x n+1,
xn+2,.…, xn+m are clearly seen as linearly independent and these variables can be taken as the
basic variable for an initial feasible solution.
Theorem:
The set SF of feasible solutions, if not empty, is a closed convex set (polytope) bounded
from below and so has at least one vertex.
Operations Research 33
School of Distance Education, University of Calicut
Proof:-
SF is the intersection of the hyper planes gi(X) = 0, i = 1, 2,…..,m and the set
H = {X | X 0]. All these are closed convex sets and bounded from below. Hence SF is a
closed convex set bounded from below, and so has at least one vertex (By theorem).
Alternatively,
Let X1 and X2 be two feasible solutions, then X1 0 , X2 0 and AX1 = B and AX2 = B
ie X = (1 - )X1 + X2 ; 0 1
= (1- )B + B = B
Theorem:
OR, equivalently, If a set of vectors P1, P2, …, Pm can be found that are linearly independent
such that
Proof:-
Clearly X = [ 1, 2, … , m , 0 0 … 0] SF
Operations Research 34
School of Distance Education, University of Calicut
X = X1 + (1 - )X2 , 0 < < 1
0 = xj1 + (1 - )xj2 , j = m + 1, m + 2, …n
(3) – (1)
In converse,
Theorem:
Operations Research 35
School of Distance Education, University of Calicut
Proof:
Then since X SF , X 0
Since X is solution of AX = B,
As r > m , the vectors P1, P2, … Pr are not linearly independent. So there exists 1,
2, … r not all zero such that,
Multiplying (2) by c
c 1P1 + c 2P2 + …
+ c rPr = 0 (3)
X1 = [ 1 + c 1, 2 + c 2 , … r + c r , 0, 0, … 0]‟
and X2 = [ 1 - c 1, 2 - c 2 , … r - c r , 0, 0, …0]‟
Operations Research 36
School of Distance Education, University of Calicut
are feasible solutions.
X = ½ X1 + ½ X2
ie, X is a convex linear combination of X1 and X2. This means X is not a vertex,
which contradicts our assumption.
Theorem:
Proof:-
p
X0 =
r 1
r Pr ;
r
r = 1, r 0
Since f(X) is linear , f(X0) = f r X r = r f (Xr ) r f ( X k ) = f(Xk)
r r
Operations Research 37
School of Distance Education, University of Calicut
where f(Xk) is the least of the values f(Xr) , r = 1, 2,…….. p,
f(X0) = f(Xk)
Theorem:
If f(X) is minimum at more than one of the vertices of SF, then it is minimum at all
those points which are the convex linear combinations of these vertices.
Proof:-
k
Then, Y =
r1
r Xr ,
r
r =1 , r 0
1) Graphical Approach:
Example:
5x1 + 2x2 10
3x1 + 8x2 12
x1 0 , x2 0
In a graph, the region satisfying each of constraint inequalities are shaded and the
common region for all of the constraint inequalities are found out.
This is the solution region, which form a convex set and the objective function attains
its optimum at a vertex of this set of feasible solution.
Y
7
6
5 (0, 5)
4
3x1+4x2=12 3
2
E D
1
C
A
B
(0, 0) 1 2 3 4
4x1+5x2=10
5x1+2x2=10
The set of feasible solution is ABCDE which is a convex set. The vertices are A(0, 0), B(2, 0),
E(0, 1.5), and D and E can be found out by solving the line joining at these points.
4x1 + 5x2 = 10
30 10
the vertex C = ,
17 17
Operations Research 39
School of Distance Education, University of Calicut
3x1 + 8x2 = 12
20 18
the vertex D = ,
17 17
At B(2 , 0) , f(x) = 10
30 10 180
At C , , f(x) =
17 17 17
20 18 154
At D , , f(x) =
17 17 17
30 10
Among these f(x) is maximum at C ,
17 17
180
the maximum value of the function =
17
30 10
x1 = and x2 =
17 17
Unfortunately, the graphical method cannot be used with more than two, or possibly
three variables. Hence it comes the importance of simplex method.
The algebraic procedure of solving an LPP through Simplex Method is at first illustrated
through an example.
Operations Research 40
School of Distance Education, University of Calicut
Maximize f(x) = 4x1 + 5x2
Subject to x1 - 2x2 2
2x1 + x2 6
x1 + 2x2 5
-x1 + x2 2
x1 0 , x2 0
Step I
The problem is changed into minimization problem Max f(x) = Minimizing (x) ,
where (x)= -f(x).
Add slack variables to the constraint inequalities and state problem in the general form as
follows,
Subject to
x1 – 2x2 + x3 = 2
2x1 + x2 + + x4 =6
x1 + 2x2 + x5 = 5
-x1 + x2 + x6= 2
xi 0 , i = 1, 2, ……….. 6
where x3 , x4, x5, x6 are the slack variables.
Step II
Since the problem is with four constraint equations in six unknowns, for getting an initial
basic feasible solution, the variable x3, x4, x5 and x6 having linearly independent column
vectors are taken as basic variables and the other two variables x1 and x2 are equating to zero.
Operations Research 41
School of Distance Education, University of Calicut
First Iteration Table
Cj -4 -5 0 0 0 0
CB yB xB P1 P2 P3 P4 P5 P6 Ratio
0 x3 2 1 -2 1 0 0 0 2/-2
0 x4 6 2 1 0 1 0 0 6/1
0 x5 5 1 2 0 0 1 0 5/1
0 x6 2 -1 1 0 0 0 1 2/1
=0 -4 -5 0 0 0 0 Cj - Zj
where Zj = PjT CB
Step III
From the iteration table all the Cj – Zj , j = 1, 2, ……..6 values are positive the current
solution is optimal. But here the Cj – Zj values corresponds to the variables x1 and x2
ie; C1 – Z1 and C2 – Z2 are negative. So the current solution is not optimal. Hence, the
variable corresponds to the maximum negative values of Cj – Zj is taken as the basic variable
and one of the current basic variables is to be removed. In our case the variable x 2 enters to
basic variable set (basis). To determine the outgoing variable from the basis, find the ratios of
xB values to the corresponding value of the vector P2, the variable corresponds the minimum
positive value of these ratios goes out from the basis. Here the ratios are (2/-2 , 6/1 , 5/1 , 2/1).
Among these the minimum positive value 2/1 corresponds to the variable x6. So x6 goes out .
Step IV
Introducing the new variable x2 to basis and eliminating x2 from the first three
equations with the help of last using some elementary transformations, we get the second
iteration table as
Operations Research 42
School of Distance Education, University of Calicut
Cj -4 -5 0 0 0 0
CB yB xB P1 P2 P3 P4 P5 P6 Ratio
0 x3 6 -1 0 1 0 0 2 6/-1
0 x4 4 3 0 0 1 0 -1 4/3
0 x5 1 3 0 0 0 1 -2 1/3
-5 x2 2 -1 1 0 0 0 1 2/-1
= -10 -9 0 0 0 0 5 Cj - Zj
Since all Cj – Zj‟s for j = 1, 2, … 6, are not all 0 the current solution is not optimal.
As the methods described in the first iteration, here x1 enters to basis and x5 goes out.
Cj -4 -5 0 0 0 0
CB yB xB P1 P2 P3 P4 P5 P6 Ratio
19 / 3
0 x3 19/3 0 0 1 0 1/3 4/3
4/3
0 x4 3 0 0 0 1 -1 1 3/1
1/ 3
-4 x1 1/3 1 0 0 0 1/3 -2/3
2/3
7/3
-5 x2 7/3 0 1 0 0 1/3 1/3
1/ 3
= -13 0 0 0 0 3 -1 Cj - Zj
C6 – Z6 is negative. The current solution is not optimal x6 enters to basis and x4 goes out.
Operations Research 43
School of Distance Education, University of Calicut
Fourth iteration table
Cj -4 -5 0 0 0 0
CB yB xB P1 P2 P3 P4 P5 P6
0 x3 7/3 0 0 1 -4/3 5/3 0
0 x6 3 0 0 0 1 -1 1
-4 x1 7/3 1 0 0 2/3 1/3 0
-5 x2 4/3 0 1 0 -1/3 2/3 0
= -16 0 0 0 1 2 0 Cj Z j
But x3, x4, x5 and x6 are slack variables, Hence the solution of the problem is
Steps:
Operations Research 44
School of Distance Education, University of Calicut
8. Form the simplex table with the revised basis.
9. Go to step 5.
2.4 Degeneracy
In simplex method, the least of a set of non-negative ratios decides the outgoing
variable at a particular iteration. It may happen that two or more ratios are equal and the least.
In that case a tie occurs as to which variable to drop. One can arbitrarily decide in favour of
one, but then it turns out that the variables which tied with it and continue to remain in the
basis also become zero. In other words, one or more of the basic variables too have zero
value. Such a case is called degenerate. In degeneracy, the basis, theoretically, changed, but
the value of the objective function remains the same. Geometrically, it may be interpreted as
the case of two coincident vertices. We change from one to the other vertex but substantially
remain where we are. In most cases we go ahead with our iterations and finally reach a basis
with improved value for the objective function, and finally get the optimal solution. But in
some cases after many iterations we arrive back at the degenerate basis from which we
started. Such cases are termed as cyclic degeneracy.
While solving LPP, when the constraints are of ' ' type and all the constants on the
right hand sides of the inequalities are non negative, it is easy to reach an initial basic feasible
solution. But if there is „greater than‟ constraint with non-negative right-hand side or „less
than‟ constraint with negative right-hand side, then a basic feasible solution cannot be
obtained right away.
To overcome this difficulty we first put the constraints so that the right-hand side
constants are all non-negative. Then we introduce the necessary slack variables. To get a basic
feasible solution of this system we formulate an auxiliary LP Problem whose one basic
feasible solution can be obtained straight away with the help of artificial variables introduced.
The optimal solution of this auxiliary problem gives a basic feasible solution to the original
problem.
While using this method, in first phase the auxiliary problem is solved using simplex
method and then the original problem is solved in second phase, with the initial basic solution
obtained from the optimal solution of the problem solved in the first phase.
Subject to 2x1 + x2 + x3 = 6
x1 + 2x2 + x4 = 5
x1 + x2 -x5 = 1
x1 + 4x2 - x6 = 2
x1, x2, x3 , x4, x5, x6 0.
To get a starting basic feasible solution to the problem we are formulating an auxiliary
problem by introducing two artificial variables x7 and x8 to the third and fourth constraint
equations, the new problem is to,
Minimize g(X) = x7 + x8
Subject to 2x1 + x2 + x3 = 6
x1 + 2x2 + x4 = 5
x1 + x2 - x 5 + x7 = 1
x1 + 4x2 –x6 + x8 = 2
xi 0 , i = 1, 2,…,8
Here we got a problem with four equations and eight unknowns. Keeping x 3, x4, x7 and x8 as
basic variables, we get an initial basic feasible solution to the problem as x1 = 0 , x2 = 0 , x3 =
6 , x4 = 5 , x5 = 0 , x6 = 0 , x7 = 1 , x8 = 2 and g(X) = 0.
Operations Research 46
School of Distance Education, University of Calicut
The simplex table is as follows:
Cj 0 0 0 0 0 0 1 1
CB yB xB P1 P2 P3 P4 P5 P6 P7 P8 ratio
0 x3 6 2 1 1 0 0 0 0 0 6/1
0 x4 5 1 2 0 1 0 0 0 0 5/2
0 x7 1 1 1 0 0 -1 0 1 0 1/1
0 x8 2 1 4 0 0 0 -1 0 1 2/4
g=3 -2 -5 0 0 1 1 0 0 Cj - Zj
Since the current solution is not optimal, the variable x2 enters to and x8 leaves from the basis,
then the new simplex table is,
Cj 0 0 0 0 0 0 1 1
CB yB xB P1 P2 P3 P4 P5 P6 P7 P8 ratio
11
0 x3 11/2 7/4 0 1 0 0 ¼ 0 -¼ 2
7
4
4
0 x4 4 ½ 0 0 1 0 ½ 0 -½ 1
2
1
1 x7 ½ ¾ ¾ 0 0 -1 ¼ 1 -¼ 2
3
4
1
0 X2 ½ ¼ 1 0 0 0 -¼ 0 ¼ 2
1
4
g=½ -¾ 0 0 0 1 -¼ 0 5/4 Cj - Zj
Cj 0 0 0 0 0 0 1 1
CB yB xB P1 P2 P3 P4 P5 P6 P7 P8
0 x3 13/3 0 0 1 0 7/3 -1/3 -7/3 1/3
0 x4 11/3 0 0 0 1 2/3 1/3 -2/3 -1/3
0 x1 2/3 1 0 0 0 -4/3 1/3 4/3 -1/3
0 x2 1/3 0 1 0 0 1/3 -1/3 -1/3 1/3
g=0 0 1 0 0 0 0 1 1 Cj - Zj
Operations Research 47
School of Distance Education, University of Calicut
Since all cj – Zj‟s are 0, Solution is optimal
In simplex table we are removing the columns of artificial variables, ie, P7 and P8.
Giving the original cost coefficients as given in our original problem, but accepting the
variable remaining in the optimal solution as the basis for the original problem and containing
the simplex method.
Cj 4 5 0 0 0 0
CB yB xB P1 P2 P3 P4 P5 P6
0 x3 13/3 0 0 1 0 7/3 -1/3
0 x4 11/3 0 0 0 1 2/3 1/3
4 x1 2/3 1 0 0 2/3 -4/3 1/3
5 x2 1/3 0 1 0 0 1/3 -1/3
Cj Z j
g = 13/3 0 0 0 0 11/3 1/3
Here all Cj – Zj‟s are non-negative. So current solution is optimal for the original problem.
Hence the solution of our problem is
It is also possible to solve an LPP in one phase even after introducing artificial
variables. One such method is called Big M-method. In this method the original objective
function f is replaced by
m
F = f+M x
i 1
ni
where xn+i are the artificial variables and M is an arbitrary large number as compared to the
coefficients in f. The modified objective function F is minimized subject to the constraints of
Operations Research 48
School of Distance Education, University of Calicut
the original problem. It can be shown that, if in the optimal solution of the modified problem
all the artificial variables are zero, then that is also the optimal solution of the original
problem. But in the optimal solution of the modified problem if all the artificial variables are
not zero, the conclusion is that the original problem is not feasible. If the modified problem is
found to have an unbounded minimum, then the original problem to, if feasible, is unbounded.
xi 0 , i = 1, 2, …, n
as shown in the canonical form of equations, if we assume x1, x2, … xm are the basic
variables, the objective function f(X) can be expressed in terms of non basic variables x m+1,
xm+2, … xn as follows
m n
f(X) = bi Ci +
i 1
C
j m 1
j xj
m
where C j = Cj - C a
i 1
i ij , j=m+1,m+2,…n
This type of expression for f(X) in terms of non-basic variable is necessary at every iteration
of the simplex method.
It is possible to get the expression for objective of function in terms of non-basic variables
directly from the original equations (2) as follows:
Let us multiply each of the equations in (2) by constants 1, 2, ….. m and add them to
(1)
Operations Research 49
School of Distance Education, University of Calicut
m m m
(C1 + a i1 i )x2 + (C2 + a i 2 i )x2 + … +(Cn + a in i )xn
i 1 i 1 i 1
m
= f+ bi i
i 1
Choose 1, 2, … m such that the coefficients of x1, x2, … xm become zero, That is,
choose i such as,
m
a ij i = - Cj ; j = 1, 2, … m (3)
i 1
m m m
(Cm + 1 + a im 1 i )xm+1 + (Cm+2 + a im 2 i )xm+2 + …+(Cn + a in i )
i 1 i 1 i 1
m
= f+ bi i
i 1
n m m
f= C j x j -
j m 1
bi i , where C j = Cj + a ij i , j = m+ 1 , m+ 2, … n
i 1 i 1
(4)
A0' = - C0 '
π = [ 1, 2, … m]'
π = -[ A0' ] - 1 C0'
π' = - C0 A0 -1
Operations Research 50
School of Distance Education, University of Calicut
The vector is called the multiplier vector and its components are the simplex multipliers.
at any stage the inverse of A0, the matrix of basic vectors at that stage, is
To calculate
needed. Having calculated i for for any basis the value of the objective function for that
basis is given by
m
f = - b i i
i 1
because the remaining terms in equation (4) contains the non basic variables x m+1, xm+2,… xn,
which are assumed as zero.
Revised simplex method not working out the entire simplex tableau but calculating only the
values required in the following essential steps.
(ii) Let one of these coefficients, say C r be negative. So we choose xr to be brought into
the basis. The numbers air , i 1, ... m, in the column of xr as in the canonical form
illustration are now directly computed.
bP min bi
(iii) Let = , air > 0
aPr i a i r
So we replace xp by xr to get the new basis. The matrix of the new basis is obtained directly.
The steps are repeated till an optimal solution attains.
Operations Research 51
School of Distance Education, University of Calicut
-1
(i) Let A0 be the matrix of a feasible basis. A0 is computed. Then the multiplier vector
is determined by ' = - C0 A0- 1. Using , calculate C j , j = m + 1 , …, n ,
m
C j = Cj + ai j i
i 1
a1 r a1r b1 b1
a b
a2 r 2r b2 2
. . .
= A0
-1 , and . = A0-1
. . . .
. . . .
a m r amr b m bm
(iii) The new basis is obtained by replacing xp by xr. The matrix A0 for this new basis is
obtained from the old A0 by replacing in the latter the column vector Pr by Pp. The old
matrix is denoted by A0p and the new by A0r
Operations Research 52
School of Distance Education, University of Calicut
1 0 . . . 1 p . . 0
0 1 . . . 2 p . . 0
. . . . . . . . .
A0p-1 A0r . . . . . . . . .
=
0 0 . . . pp . . 0
. . . . . . . . .
. . . . . . . . .
0 0 . . . mp . . 1
1 p a1r a1 r
a
2p 2r a2 r
. . .
. . .
a pr
Where pp = A0p-1
= apr
. . .
. . .
. . .
amr
mp am r
1 0 . . a1r / a p r . . . 0
0 1 . . a 2r / a p r . . . 0
. . . . . . . . .
Let Ep =
. . . . . . . . .
0 0 . . 1/ a p r . . . 0
. . . . . . . . .
. . . . . . . . .
0 0 . . a mr / a p r . . . 1
Ep A0p- 1 A0r = I
Hence Aor- 1 Aop Ep-1 = I
A0r- 1 = Ep A0p-1
Knowing a i r , Ep is computed and this implies the A0r- 1 , the inverse of the matrix of the new
basis.
To every LPP there corresponds another LPP called its dual. The original problem is
called the primal.
Operations Research 53
School of Distance Education, University of Calicut
Let a general LPP is stated as
Minimize f(X) = CX
Subject to AX B
X 0
when we call the above problem as Primal LP Problem, its dual is defined as the following LP
Problem.
Y B Y
'
Maximise
Y 0
The correspondence between the primal in the standard form and its dual:
Primal Dual
n n variable n constraints
m m constraints m variables
cj , j=1,2,…n Cost coefficients constraint constants
bi , i=1,2,…,m Constraint constants cost coefficients
Variables x j 0 , j=1,…,n yi 0, i 1,..., m
n n
Constraints a ij x j bi
j1
a
i 1
ij yi b j
Objective function n m
Minimise c j x j Maximise bi yi
j1 i 1
Operations Research 54
School of Distance Education, University of Calicut
Let a primal L P Problem is stated as:
To write the given primal problem in the standard form, we consider x 3, the
unrestricted variable as x3 = x4 – x5 where x4, x5 0. Multiply both sides of the equation,
3x1 – x2 + 2x3 7 by –1 , to reverse the inequality, and the equation -4x1 + 3x2 + 8x3 = 10,
is expressed as a combination of two inequalities,
minimize f = CX
Operations Research 55
School of Distance Education, University of Calicut
AX B
X 0
Where C = [1 -3 -2 +2]
1 4 0 0
3 1 2 2
A =
4 3 8 8
4 3 8 8
Maximize = B' Y
A' Y C'
Y 0
where , Y = [y1 , y2 , y3 , y4]
which can be stated as:
Maximize = 12y1 – 7y2 – 10y3 + 10y4
Subject to y1 – 3y2 + 4y3 – 4y4 1
- 4y1 + y2 – 3y3 + 3y4 -3
0y1 – 2y2 - 8y3 – 8y4 -2
0y1 + 2y2 + 8y3 – 8y4 2
y1 , y2 , y3 , y4 0
here we can take (y3 – y4) as y5, which is unrestricted. Then the problem becomes,
Operations Research 56
School of Distance Education, University of Calicut
Duality Theorems
Theorem:
Proof:-
Minimize f = CX
Subject to AX B
X 0
Operations Research 57
School of Distance Education, University of Calicut
Theorem:
The value of the objective function f(X) for any feasible solution of the primal is not
less than the value of the objective function (Y) for any feasible solution of the dual.
Proof:-
Minimize f(X) = CX
Subject to AX B
X 0
……………………………………………………………
…………………………………………………………………..
Operations Research 58
School of Distance Education, University of Calicut
Multiply the primal constants by y1, y2, … ym respectively, and the dual constraints by x1, x2,
… xn respectively and add which implies two equations,
(a11x1y1 + a12x2 y1 + … + a1nxn y1 – xn+1 y1) + (a21x1 y2 + a22x2 y2+ … + a2nxn y2 – xn+1 y2) +
… + (am1x1 ym + am2x2 ym + … + amnxn ym – xm+n ym)
= b1 y1 + b2 y2 + … + bm ym = (Y) (1)
and
(a11y1 x1 + a21 y2 x1 + … + am1 ym x1 + ym+1 x1) + (a12 y1 x2 + a22 y2 x2+ … + am2ymx2 +
ym+2x2) + … + (a1ny1xn + a2n y2 xn + … + amn ym xn + ym+n xn)
= c1x1 + c2x2 + … + cnxn = f(X) (2)
(2) – (1)
x1ym+1 + x2 ym+2 + … + xnym+n + y1xn+1 + y2xn+2 + … + ymxn+m
= f(X) - (Y)
since (x1, x2, … xn+m )and (y1, y2, …, ym+n) are the set of feasible solution, ie , xi 0 and
yi 0 , i = 1, 2, … m+n.
L H S is 0
f(X) - (Y) 0
f(X) (Y)
There for it satisfies, the inequality Min f(X) Max (Y) also.
The optimum value of f(X) of the primal, if it exists, is equal to the optimum value of
(Y) of the dual.
Proof:
Minimize f(X) = CX
Subject to AX B
X 0
Let (x1, x2, … xn, xn+1, … xn+m ) be the optimal solution of the problem. Since it has
to be basic feasible solution, and there are only m constraint equations, at least n of the
numbers in the set of optimal solution are zero.
Multiply the constraint equations with 1, 2, … m respectively and adding all the
equations with the objective function, we get,
m n m
ibi a ij i
m
i x n i
i 1 j 1
f(X) + = (Cj + i 1 )xj - i 1
(1)
since 1, 2, … m are the simplex multipliers corresponding to the optimal solution,
m
Min f(X) = - bi i
i 1
and - i 0, i = 1, 2, … m
m
a ij i
- i 1 Cj ; - i 0
(2)
(2) implies (- 1, - 2, …,- m) is the solution of the dual L P Problem
Maximize (Y) = B'Y
Subject to A'Y C'
Y 0
Corresponding to this solution (- 1, - 2, … - m) , the value of
m
(Y) = - bi i = Min f(X)
i 1
Operations Research 60
School of Distance Education, University of Calicut
Min f(X) Max (Y)
m
Min f(X) = (Y) , satisfies only when - bi i is the maximum value of
i 1
(Y)
Min f(X) = Max (Y)
The negative of the simplex multipliers for the optimal solution of the primal are the
values of the variables for the optimal solution of the dual; and in similar the simplex
multipliers for the optimal solution of the dual are the values of the variables for the optimal
solution of the primal.
Theorem:
If the primal problem is feasible, then it has an unbounded optimum if and only if the
dual has no feasible solution, and vice versa.
Proof:-
Let the primal have and unbounded optimum. It means f(X) has no lower bound ie, for
any number we consider, we can find a solution to the primal where the optimal value of
primal is less than the number considered. Then if possible, let the dual have a feasible
solution. Then we can find a number as the value of the dual objective function ,
corresponding to this feasible solution. But we have for any feasible solution of the primal, the
objective function f(X) is greater than or equal to the objective function (Y) of the dual for
any of its feasible solution.
Hence in the case of unbounded optimum for primal and existence of feasible solution for the
dual, is contradictory. So the dual has no feasible solution when the primal having an
unbounded optimum.
In converse, let the dual is infeasible, and when primal is feasible, then to prove the primal has
an unbounded minimum.
Operations Research 61
School of Distance Education, University of Calicut
Thus, when a bounded minimum exists for primal then the dual also should have a
feasible solution which contradict the assumption that dual is infeasible.
(i) a primal variable xj is positive, then the corresponding dual slack variable ym+j is zero;
and
(ii) if a primal slack xn+i is positive, then the corresponding dual variable yi is zero and
vice versa
Proof:-
Let (x1, x2, … xm, xm+1, … xn+m) and (y1, y2, … ym, … ym+n) are the set of feasible
solution of the primal and the dual respectively.
Then we have
It follows that in a term like xjym+j , if xj > 0 then ym+j = 0 , and if ym+j > 0 , then xj = 0 Also
in term like yi xn+i , if xn+i > 0 then yi = 0 and if yi > 0 , then xn+i = 0
The complementary slackness condition can play well in solving some L P Problems.
For example;
The dual problem contains two variables and hence by solving graphically the solutions of the
problem obtained as
Introducing slack variables x5, x6 to the primal constraints and the surplus variables y3, y4, y5
and y6 to dual constraints we can get the following equations
and
2y1 + 2y2 – y3 = 3
2y1 + y2 – y4 = 2
y1 + 2y2 – y5 = 1
3y1 + 2y2 – y6 = 4
Since in the optimal solution of the dual, y1 = 1.2 and y2 = 0.2 then by using the constraint
equations of the dual LP Problem
We get, y3 = y6 = 0 , y4 > 0 , y5 > 0
By complementary slackness condition;
Since x1, x2, x3, x4, x5, x6 are primal variables and y1, y2, y3, y4, y5 and y6 are dual variables,
For optimal values of the variables, by complementary slackness property we have
x1y3 + x2y4 + x3y5 + x4y6 + y1x5 + y2x6 = 0
Therefore, since y1, y2, y4 and y5 of dual optimal are nonzero, the variables x2, x3, x5 and x6 of
primal optimal should be zero.
Operations Research 63
School of Distance Education, University of Calicut
Then the primal constraint equations for optimal solution becomes,
2x1 + 3x4 = 20
and 3x1 + 2x4 = 20
which gives x1 = 4 , x4 = 4.
Applications of duality
i) In an LP Problem numerical work increases more with the number of constraints than
with the number of variables. Since the two get interchanged in the dual problem, then
it is generally economical to solve the dual.
ii) It is possible under certain conditions to avoid the introduction of artificial variables to
obtain an initial basic feasible solution.
Maximise f(X) = CX
Subject to AX B
X 0
In the primal, if all Cj 0 and bi 0, then the basis consisting of the basic variables xn+1,
xn+2, … xn+m (Surplus variables) is feasible and also optimal. Similarly, the corresponding
basis of the dual is also feasible and optimal. If some or all bi‟s are positive and all Cj 0,
then the basis xn+1, xn+2, … xn+m is not feasible for the primal, but the basis ym+1, ym+2,… ym+n
is feasible for the dual. We call this solution as “primal infeasible and dual feasible”. We can
move through basic feasible solution of the dual to get its optimal solution. Then from the
optimal solution of the dual, the optimal solution of the primal can be attained. The modified
Operations Research 64
School of Distance Education, University of Calicut
method for solving an LP problem with a non feasible basic solution, but with non negative
cost coefficients is called the dual simplex method.
Illustration:
x1 - 2x2 - 2x3 -3
-x1 - 2x2 - x3 -2
+2x1 + x2 - 2x3 4
x1 - 2x2 - 2x3 + x4 = -3
-x1 - 2x2 - x3 + x5 = -2
2x1 + x2 - 2x3 + x6 = 4
Cj 3 5 2 0 0 0
CB xB yB P1 P2 P3 P4 P5 P6
0 -3 x4 1 -2 -2 1 0 0
0 -2 x5 -1 -2 -1 0 1 0
0 4 x6 2 1 -2 0 0 1
0 3 5 2 0 0 0
To attain the feasibility to the solution, we proceed with the dual simplex method.
Operations Research 65
School of Distance Education, University of Calicut
Here x4 is most negative. To remove x4 from the basis, to determine the incoming vector, we
find the ratio of aij to Cj – Zj, for negative aij values corresponds to the row of x4. In this row
2 2
a12 and a13 are negative. So the ratios are , ,
5 2
Cj 3 5 2 0 0 0
CB yB xB P1 P2 P3 P4 P5 P6
2 x3 x3 = 3/2 -1/2 1 1 -1/2 0 0
0 x5 x5= -1/2 -3/2 -1 0 -1/2 1 0
0 x6 x6 = 7 1 3 0 -1 0 1
f = 3/2 4 3 0 0 1 0
Cj 3 5 2 0 0 0
CB yB xB P1 P2 P3 P4 P5 P6
2 X3 x3 = 2 1 2 1 0 -1 0
0 X4 x4= 1 3 2 0 1 -2 0
0 X6 x6 = 8 4 5 0 0 -2 1
f = +4 1 1 0 0 2 0
Operations Research 66
School of Distance Education, University of Calicut
2.11 Sensivity Analysis
In many practical situations we want to find not only an optimal solution, but also to
determine what happens to this optimal solution when certain changes are made in the system.
We can determine the effects of these changes without solving a new problem from the very
beginning. Sensitivity analysis is the name given to such investigation.
Let X0 = [x1, x2, …, xm, 0, 0, …, 0]' , X0 0 be the optimal basic variable to the
original problem.
Let B changes to B + B,
Then X0 + X0 = A0-1 (B + B)
gives new values to the basic variables, and they remains basic variable if A0-1(B + B) 0
Original basis continues to be optimal basis for the changed problem. And the optimum
value of the objective function f(X) is
If B is such that A0-1(B + B) / 0 , then the solution is not feasible. Hence we use artificial
variable technique or dual simplex method to solve the problem.
ii) Changes in Cj
the new simplex multiplier connected to the basic variable gives the optimal solution to the
m
original problem where aij i = - Cj , j = 1, 2, …, m.
i 1
Operations Research 67
School of Distance Education, University of Calicut
m
The relative cost coefficient of the non-basic variables are C j '= C j + aij i ,j = m+1, …, n.
i 1
These may not all be non negative. For some j, C j may be negative. This would mean that
the basic feasible solution which was optimal for C j is not optimal for C j . So from this point
onwards further iteration may be done with the new values of C j is obtain the new optimal
solution.
If however, C j such that all C j ' are non negative, then the original optimal basis still
remains optimal and the values of the optimal basic variables also remain unchanged and
optimum f(X) = - bi i .
Let the new variable be xn+k, k=1, 2, 3 … and their coefficients be ai, n+k, i = 1, 2, …,m
in the constraints in the constraints and Cn+k in the cost function. Since the number of
constraints remain the same, the number of basic variables remain the same and the original
optimal solution along with zero values of the new variables would give a basic feasible
solution of the new problem. It would remain optimal if the newly introduced cost coefficients
Cn+K are such that the relative cost coefficient corresponding to them are non negative, ie
m
Cn+k' = Cn+k + a
i 1
i, n k x i 0, k
If K is the set of feasible solution of the original problem and K', the set of feasible
solutions of the modified problem obtained by introducing new constraints, then K' K. If the
original optimal solution X0, satisfies the new constraints, then X0 is in K' and since f(X0) is
minimum in K, it is also minimum in K'. In such a case really, there is no problem and the
original optimal solution continues to be optimal in the modified situation.
If some or all of the new constraints are related buy the original optimal solution, then
the problem to be solved by taking new constraints and by using appropriate method.
Operations Research 68
School of Distance Education, University of Calicut
v) Changes in aij
If the changes are in aik , where xk is a non basic variable of the optimal solution, then
m
the modified value of Ck' of Ck is Ck' = Ck + ai k i is obtained by using the changed vales
i 1
of aik.
If Ck' 0, then the original optimal solution continues to be optimal. If not, further iteration
with the new values of Ck' and aik may be done.
If xk is in the basic variable in the original optimal solution, then the procedure may be
as follows: introduce a new variable xn+1 to the system with coefficients ai n+1 which are the
new values of aik and put Cn+1 = Ck . In this new problem treat the original variable xk as an
artificial variable for solving phase I problem to eliminate it. Then proceed to solve phase II to
get the new optimal.
In sensitivity analysis we consider the effect of changes in the values of the input data
like, Cj, aij, bj of an LP Problem on its original optimal solution. The changes considered were
discrete. Now consider the coefficients in the problem vary continuously as a function of
some parameter. The analysis of the effect of this parametric variation is called parametric
linear programming.
Consider an LPP where the cost coefficients Cj varies over the parameter , hence objective
function is given in the form f( ) = (1 + C*)X
Where C is the original cost vector, C*, the cost variation vector and a parameter which can
have any real value. At first solve the LPP for = 0 and let (x1, x2, … xm)' = X0 be the
optimal basis. Then the relative cost coefficients of the non basic variables C j can be
m
expressed as C j = Cj - Ci aij , j = m + 1, …, n, are all non negative.
i 1
Now let be non zero. Then corresponding to the same basis the relative cost coefficients of
C
m
C j ( ) = (Cj + Cj*) - Ci a ij
*
the non basic variables are i
i 1
m m
Ci aij )+ (Cj* - Ci
*
= (Cj - aij )
i 1 i 1
Operations Research 69
School of Distance Education, University of Calicut
= C j + Cj *
; j = m+1 , …, n
Here the optimal basis X0, obtained for = 0, remain optimal as varies from zero through
positive values upto where C j ( ) , j = m+1, …, n, should remain non negative. Let 1 be
negative. Then the original optimal basis X0 lacks its optimality. Then for obtaining optimal
basis for > 1 , the variable Xk will have to be brought into the basis. This can be done by
the usual simplex procedure. The requirement C j ( ) 0 for all the non basic variables can
again be used to determine the next value 2 of such that this new basis is optimal for 1
< 2 and is non optimal for > 2. The process can be continued till a value of is
reached beyond which the optimal basis remains unchanged or the optimal solution does not
exists. The same procedure can be adopted to analyze the parametric behaviour of the problem
for negative values of starting from = 0.
The parametric LP problem can be solved for the parametric variations in bj, the parametric
variations in aij, and for the simultaneous parametric variations of A, B and C.
*******************
Operations Research 70
CHAPTER 3
TRANSPORTATION AND
ASSIGNMENT PROBLEMS
If there are m origins (sources) and n destinations (sinks) and we want to transport the
products from the sources to destinations with minimized cost, then the cost matrix is as given
below.
Destinations
1 2 3 4 . . . n availability
1 C11 C12 C13 C14 . . . C1n a1
2 C21 C22 C23 C24 . . . C2n a2
.
Source
.
.
M Cm1 Cm2 Cm3 Cm4 . . . Cmn am
Requirement B1 b2 b3 b4 . . . bn m n
ai bi
i 1 i 1
(For a balanced
transportation
problem)
where Cij = cost to transport one unit of product from ith source to jth destination.
The problem is to transport require units of products from m sources to the destinations by
minimizing the total cost of transportation.
m n
Minimize Z = Ci j xi j
i 1 j 1
School of Distance Education, University of Calicut
where xij is the number of units transported from i source to jth destination
th
Subject to
x
j 1
ij ai , i = 1, 2, …, m (1)
x
i 1
ij bi , j = 1, 2, …, n (2)
m n
ai bj
i 1 j 1
and = (3)
Here we have m + n equations by (1) and (2), But under (3), all these m + n equations are not
linearly independent. Otherwise if (3) not hold, the m + n equations are inconsistent. The
deletion of any one equation from the set of m + n equations, the remaining m + n – 1
equations are linearly independent. Hence the number of basic variables in these equations is
m + n – 1. That is basic solution will consist of at most m + n – 1 of the variables having non
zero values.
Theorem:
Proof:-
By triangular basis we mean that, there is a constraint equation in which only one
basic variable occurs, in another equation there is one more basic variable with the total
number of basic variables being not more than two, in third equation another basic variable
occurs with the total now being not more than three and so on.
There cannot be an equation in which no basic variable occurs, because then the
equation cannot be satisfied for ai 0 , bi 0.
If possible let every equation have at least two basic variables. When each row
equation having at least two basic variables, the total number of basic variables will be at least
2m. Similarly when each column equation having at least two basic variables, the total
number of basic variables will be at least 2n. If N denotes the total number of basic variables,
Operations Research 72
School of Distance Education, University of Calicut
N 2m , N 2n
Then,
i) If m > n N 2m
m+m
m + n ( m > n)
ii) If m < n N 2n
n+n
m + n ( m < n)
iii) If m = n N 2m
m+m
m + n ( m = n)
In all cases, N m + n , which contradict the fact that the total number of basic variables
N=m+n–1
So the assumption that there are at least two basic variables in each row and column is wrong.
Hence there exist at least one equation row or column, in which there is only one basic
variable.
Let the rth row equation be such and equation and let xrc , the variable in the rth row and
the cth column, be the only basic variable in it. Then xrc = ar. Eliminate this equation from the
system by deleting the rth row equation and putting xrc = ar in the cth column equation.
The rth row then stands cancelled, and bc is replaced by bc' = bc – ar.
The resulting system consists of m – 1 row equations and n column equations of which
m + n – 2 are linearly independent. So the number of basic variables in this system is m + n –
2. Repeating the earlier argument we conclude that there is an equation in this reduced system
which has only one basic variable. If this equation happens to be the cth column equation, in
the original system the cth column equation now contains two basic variables. So we conclude
that the original system has an equation which has at most two basic variables. Continuing
like this we next prove that there is an equation with at most three basic variables and so on.
Therefore the T. P. has a triangular basis.
Operations Research 73
School of Distance Education, University of Calicut
Finding a basic feasible solution
Since T. P. has a triangular basis, let us arbitrarily take x rc as a basic variable which
occur alone in a row or column equation. Then we are assigning the minimum of ar or bc as
the value of this variable. Then one row or column get deleted. If the row is deleted, then bc is
adjusted as bc' = bc – ar, otherwise the value of ar is adjusted as ar' = ar – bc. After eliminating
the variable xrc by assigning a value, we proceed as done first with the reduced transportation
matrix, where one row or column less. The procedure is continued till m + n - 1 rows and
columns are crossed out and an equal number of variables evaluated. The solution so obtained
is a basic feasible solution. It is important not to delete more than one row or column at each
stage after choosing a basic variable. This may happen at any stage of the procedure when ar =
bc. Then we may delete only rth row or cth column, not both. If we choose rth row to delete,
then bc is replaced by bc' = bc – ar = 0, and cth column has still to be satisfied by choosing some
other variable in the cth column to be included in the basis. The value of the variable would be
zero.
For checking the optimality of the basic feasible solution, we express the objective
function in terms of non basic variables and if all the cost coefficients in the new expression
are non negative we say the solution is optimum. The objective function of a T. P. is of the
form f(X) = c11x11 + c12x12 + c13x13 + … + c1nx1n + … + cmnxmn. Let xij contains in feasible
basis, then to remove xij from the expression of f(X). Let i and j are the simplex multipliers
for the ith row equation and jth column equation respectively.
Cij + i + j = 0 (1)
Using the simplex multipliers r and s we are calculating the cost coefficients of
the non basic cells as Crs' where Crs' = r + s + Crs, where (r, s)th cell corresponds to
non basic variable.
Operations Research 74
School of Distance Education, University of Calicut
This is calculated for all non basic variables. If Crs' is negative for any (r, s), the
present basis is not optimal and the value of f can be improved by bringing the variable xrs in
the basis.
The procedure for changing the basis theoretically on a notion in the transportation
array called the loop, which is explained as follows. A set of cells L in the transportation array
is said to constitute a loop if in every row or column of the array, the number of cells
belonging to the set is either zero or two.
In a transportation table, let xrs is a non basic variable while expressing the objective
function in terms of non basic variables, the coefficient of xrs, is changed to crs' where crs' is
negative. Then for an improved solution, it is decided to enter xrs to basis. Starting from (r, s)th
cell, we start a loop connecting basic cells. We assign a value to the variable x rs, so as getting
one basic variable connected in the loop is getting deleted and value of all other basic
variables are positive. With the new set of basic variables we proceed the test of optimality. If
require again make changes in the basis as described. When the basis contains less than m + n
– 1 variables then T. P. is said to be degenerating.
m n
In a transportation problem, when the condition, ai = b j lacks, the problem is
i 1 j 1
said to be unbalanced, and the problem becomes infeasible. If ai > bj for a T. P. , then
i j
there would be surplus left at the sources after all the demands are met, and if
ai < b j there would be deficit at the destinations after all the sources have exhausted
i j
their capacities.
If, for a T. P. ai > bj then the problem is solved by introducing an artificial
i j
destination, with demand bn+1 = ai - bj and since the destination is quiet artificial the
i j
cost of transportation to this destination are taken as zero and the new m x (n+1) problem is
solved for optimal solution.
Operations Research 75
School of Distance Education, University of Calicut
On other hand, if the T. P is unbalanced due to ai < bj then an artificial source
i j
with capacity b j - ai is introduced. The cost of transportation from this artificial source
j i
is taken as zero and then the problem is treated for optimal solution.
Ex: Solve the transportation problem,
Destination Availability
D E F G
A 11 13 17 14 250
Source B 16 18 14 10 300
C 21 24 13 10 400
Demand 200 225 275 250 950
Solution:
To start finding the initial basic feasible solution, first consider the (1, 1)th cell. Assign
200 to (1, 1)th cell that is the maximum demand for D and cross off column of D, then the
remaining 50 from the source is assigned to E in the cell (1, 2) and cross of row of A,
proceeding like this, the following assignments are obtained as the initial feasible solution.
Considering the basic cells, the simplex multipliers i and j values can be solved
using following equations.
1 + 1 + C11 = 0 1 + 1 + 11 = 0
Operations Research 76
School of Distance Education, University of Calicut
1 + 2 + C12 = 0 1 + 2 + 13 = 0
2+ 2 + C22 = 0 2 + 2 + 18 = 0
2+ 3 + C23 = 0 2 + 3 + 14 = 0
3+ 3 + C33 = 0 3 + 3 + 13 = 0
3+ 4 + C34 = 0 3 + 4 + 10 = 0
Put 1 = 0 1 = -11 , 2 = -13 , 2 = -5 , 3 = -9 , 3 = -4 , 4 = -6
The net evaluation for the non basic cells are entered on the right corner of each cell.
Since one of the net evaluations for non basic cell is negative, the current solution is
not optimal. Negative net evaluation corresponds to the cell (2, 4).
Then the solution is to be improved by entering x 24 to basis. And to remove one of the
current basic variable also.
Put a value to x24 and draw a loop connecting the basic cells (3, 4) , (3, 3) and (2, 3)
200 50
11 13 17 14
175 125 -
16 18 14 10
150 + 250 -
21 24 13 10
By keeping feasibility of the solution, the maximum value that can be assigned to
iS 125, then the solution becomes,
x11 = 200 , x12 = 50 , x22 = 175 , x24 = 125 , x33 = 275 , x34 = 125
Operations Research 77
School of Distance Education, University of Calicut
again to check optimality
1 + 1 + C11 = 0 1 + 1 + 11 = 0
1 + 2 + C12 = 0 1 + 2 + 13 = 0
2+ 2 + C22 = 0 2 + 2 + 18 = 0
2+ 3 + C23 = 0 2 + 3 + 14 = 0
3+ 3 + C33 = 0 3 + 3 + 13 = 0
3+ 4 + C34 = 0 3 + 4 + 10 = 0
Assuming 1 = 0 1 = -11 , 2 = -13 , 2 = -5 , 4 = -5 , 3 = -5 , 3 = -8
Since all the net evaluations are non negative, the current solution is optimal and the cost of
transportation
= 12075
A transportation problem is reduced to some more simple form known as assignment problem
n n n
if, n = m and the objective function f = Cij xij is to be minimized subject to xij =
j 1i 1 j1
1,
n
xij =1
i 1
xij = 0 or 1 , i = 1, 2, …, n, j = 1, 2, …, n
Here the number of linearly independent equations in this case is 2n – 1. So the basic
feasible solution contains 2n – 1 variables. The transportation algorithm may be used in
Operations Research 78
School of Distance Education, University of Calicut
solving this problem, but because of the constraints there would be only one non zero variable
(whose value will be 1) in each row and each column and hence the total number of non zero
entries would be n, then the remaining (n – 1) basic variables being zero. Hence the problem
is degenerating and not so convenient in using usual method. Therefore a special algorithm to
solve the assignment problem is introduced.
Theorem:
Proof:-
Let the assignment problem have the cost matrix C = [Cij] , i , j = 1, 2, ……..n
Let Cij' = Cij ui vj , ui, vj are constants . Then for the new cost matrix C' = [Cij' ]
n n
xij Cij
|
The objective function is Z' =
i1 j 1
n n
= xij (Cij ui v j )
i1 j 1
n n n n n n
= xij Cij + xij ui + xij v j
i1 j 1 i1 j 1 i1 j 1
n n
=Z U V where V = ui , V = vj
i 1 j 1
Since U and V are constants, an assignment xij which minimizes Z also minimizes Z'.
If for an assignment problem all Cij 0, then an assignment schedule xij which satisfies
Operations Research 79
School of Distance Education, University of Calicut
The transportation problem is written mathematically as
m n
to minimize f = Cij xij
i1 j 1
(1)
n
Subject to xij = ai , i = 1, 2, …m
j 1
m
xij
i 1
= bj , j = 1, 2, … n
n n
ai bj
i 1 j 1
=
n
ai j xij = ai , i = 1, 2, …, m
j 1
m
bij xij = bj , j = 1, 2, …, n
i 1
Operations Research 80
School of Distance Education, University of Calicut
The chief characteristics of the transshipment problem
1) The number of sources and destinations in the transition problem are m and n
respectively. But in the transshipment problem we have m + n sources and
destinations.
2) Commodities can move not only from sources to destinations, but also from
destination to sources.
Consider an article which is used once and then sent for repair or servicing before it can be
used again. On a job a1, a2, …, an number of these articles are required at times T, 2T, …, nT
respectively. The job lasts till nT. The job starts at time T with a1 newly purchased articles. As
time being the requirement can be met partly by repaired articles and partly, if necessary,
through purchase of new ones. The minimum time of repair is rT and maximum is (r + s)T, r
and S being positive integers and r + s < n. The quicker the service, the higher the cost of
repair, but is in any case less than the price of a new article.
Hence the caterer problem is : How to organize purchase and repair of articles so that the job
is completed with minimum cost of the articles.
Let xij be the number of articles received back after repair which were sent for repair at time
iT to be returned at time jT. Let Cij be the cost of this repair per article.
n
xij = Total number of repaired articles available at jT.
i 1
For such inadmissible values of i, xij is taken as + . Hence such xij values never
comes to basis as the problem is of minimization . Shortage of articles at time jT is met by
purchase of new articles.
xn+1, j denotes the number of new articles purchased due to shortage at time jT.
Operations Research 81
School of Distance Education, University of Calicut
n
Then aj = xij + xn+1, j , j = 1, 2, … n
i 1
n n
aj xij ie xij aj
i 1 i 1
All the articles used at time iT need not be sent for repair, as the job is to last only upto nT and
if they cannot be repaired before that time they may as well be left un repaired. The cost of
leaving an article un repaired may be taken as zero.
Let xi, n+1 = The number of articles used but not sent for repair at time iT
n
Then ai = xij + xi,, n+1 , i = 1, 2, … n
i 1
n
( xij also denoted the number of articles sent out for repair at time iT)
i 1
and we have
n 1
xij = aj , j = 1, 2, … n+1
i 1
n 1
x
j1
ij = ai , i = 1, 2, … n+1
xij 0
Operations Research 82
School of Distance Education, University of Calicut
n 1n 1
f= Cij xij , where an+1 is taken as a sufficiently large number, usually taken the
j 1i 1
value a i which is the total number of articles required on all the days.
xn+1,n+1 is interpreted as the number of new articles left without being used and so not
purchased at all, and the cost of this imaginary transaction may be taken as Cn+1, n+1 = 0.
n 1n 1
Minimize f = Cij xij
j 1i 1
n 1
Subject to xij = aj , j = 1, 2, …, n+1
i 1
n 1
x
j 1
ij = ai , i = 1, 2, …, n+1
xij 0
*******************
Operations Research 83
CHAPTER 4
NETWORK ANALYSIS
The study of networks are very important in electrical theory, transportation and
communication systems etc. A network in its more generalized and abstract sense in called a
graph. The literature contains a large volume of results in graph theory and they are skillfully
used to study and analyze networks.
If (vj , vk) are ordered pairs, we represent them by directed arcs, that is, arcs carrying
arrow marks on them denoting the direction vj to vk.
( like vj vk or j k ).
2 u4 9
8
u1
u7
1
u3
u11
u5
u2 3
6
u10 7
u6 u8
4 5
u9
School of Distance Education, University of Calicut
An arc (directed or undirected) is said to be incident with a vertex which if joins to some other
vertex. That is, it connects the two vertices. The directed arc ui = (vj , vk) is said to be incident
from or going from vj and incident to or going to vk; vj is called the initial vertex and vk the
terminal vertex of the arc (vj , vk).
Let V1 and V2 be two subsets of V such that V1 V2 = . Let ui = (vj , vk) be an arc
such that vj V1 and vk V2. Then ui is said to be incident from (or going from) V1 and
incident to (or going to) V2. Generally it is said to incident with both V1 and V2 and is said to
connect them. For example if V1 = {v2 , v3} and V2 = {v6 , v9}, then u4 connects V1 and V2. It
goes from V1 and V2 and is incident with both.
Let Vk be a subset of V. Then we shall denote by (Vk) the set of arcs of G(V, U)
incident with Vk, by + (Vk) the set of arcs incident to Vk and by -(Vk) the set of arcs
incident from Vk. For example
+ (V1) = { u1 , u3}
A sequence of arcs (u1, u2, …, uk-1, uk, uk+1, …, uq) of a graph such that every
intermediate arc uk has one vertex common with the arc uk-1 and another common with uk+1 is
called a chain. In our graph, the sequence (u2 , u3 , u4 , u7) is a chain, as u3 has one vertex
common with u2 and u4 etc. A chain may also be denoted by the vertices which it connects.
For example, (u2 , u3 , u4 , u7) may also be denoted by (v1 , v3 , v2 , v9 , v6).
Operations Research 85
School of Distance Education, University of Calicut
A chain becomes a cycle if in the sequence of arcs no arc is used twice and the first arc
has a vertex common with the last arc, and this vertex is not common with any of the
intermediate arcs. For example, in the graph (u3, u5 , u7 , u4) is a cycle.
A path is a chain in which all the arcs are directed in the same sense such that the
terminal vertex of the preceding arc is the initial vertex of the succeeding arc. In our example
the sequence of arcs (u1 , u3 , u6 , u9) is a path. In either case also we may denote path in terms
of the vertices as (v1 , v2 , v3 , v4 , v5). Note that a path is a chain, but every chain is not a path.
(why?).
A circuit is a cycle in which all the arcs are directed in the same sense. In our graph
(u1 , u3, u2) and (u8, u9) are circuits.
A graph is said to be connected if for every pair of vertices there is a chain connecting
the two. The graph in our example is not connected because there is no chain connecting v6 to
v7 or v2 to v8.
But if we erase the two vertices v1 and v8 and the arc u11 the graph left is a connected graph.
If va is a vertex of a graph, then the set formed by va and all other vertices which are
connected to va by chains, and the set of arcs connecting them from a component of the graph.
Clearly a connected graph has only one component. If a graph is not connected, it has at least
two components. The graph in our example has two components, one consisting of vertices v7,
v8 and the arc u11, and the other the remaining portion.
A graph is strongly connected if there is a path connecting every pair of vertices in it.
For example telephones in a town are the vertices of a strongly connected graph. But Radio
receivers and transmitters form a connected graph but not strongly connected, because there is
a path from a transmitter to a receiver but not one from a receiver to a transmitter.
A tree is defined as a connected graph with at least two vertices and no cycles. As the
name indicates a natural tree is the best example of a graphical tree, the branches forming the
arcs and the extremities of the branches forming the vertices. Clearly a tree with n vertices has
(n-1) arcs, and that every pair of vertices is joined by one and only one chain. If we delete an
arc from a tree, the resulting graph is not connected, and if we add an arc, a cycle is formed.
Operations Research 86
School of Distance Education, University of Calicut
A tree
A vertex which is connected to every other vertex of the graph by a path is called a center of
the graph. A graph may or may not have a centre, or may have many centers. In the above
diagram of a tree, there is no centre. Every vertex of a strongly connected graph is a center. A
tree can atmost have only one centre.
A tree with a centre is called an arborescence. Clearly in an arborescence all the other
arcs directed in the same sense.
Consider a Graph G(V, U) where V is the set of vertices and U is the set of arcs. Let va
and vb two vertices of the graph. Associated with each arc (vj , vk) of the graph let there be a
number xjk. There may be a number of paths from va to v6. For each path we define the length
of the path as x jk where the summation is over the sequence of arcs forming the path. The
minimum path problem is the problem of identifying the path having the smallest length.
Operations Research 87
School of Distance Education, University of Calicut
The term length is used in a very general sense. Of course, a road map connecting
various towns is a graph and the distance between any two towns along a road is the length of
the path. But sometimes, the time or the cost involved in going from one town to another is
also a length in the generalized sense. Note that in some situations the length may not be even
non-negative. We take the number xjk as a real number, positive, zero or negative.
Case 1. All arc lengths are non-negative: Suppose we have to find the minimum path from
va to vb. Let fj denote the minimum path from va to vj. We have to find fb.
Clearly fa = 0.
Let Vp be a subset of V such that va Vp and vb Vp. First we find the minimum
distance fj for all vj in Vp. Let (vj , vk) is an arc going from Vp. Find fj + xjk. Do this for all vj in
Vp and (vj , vk) going from Vp.
Example:
10 3
1 4
2 3 8 1 2 7 10
0 6 2 1 5
5 8
6
8 1 2 4 1 7
3 6
4
Let us start, with p = 0 and V0 = {0}. Clearly f0 = minimum distance from 0 to 0 is 0. There
are three arcs going from V0 = {0}, namely (0, 1) , (0, 2) and (0, 3) and the distance from 0 to
Operations Research 88
School of Distance Education, University of Calicut
1 is 2, 0 to 2 is 6 and 0 to3 is 8 and the minimum of {2, 6, 8} is 2, corresponding to vertex 1.
Form the set V1 = V0 U {1} = {0, 1}. Then find all the arcs going out of V1 and find the
minimum distance from V1 to the corresponding vertices. The arcs going from {0 , 1}are (0,
2) , 0, 3), (1, 2) , (1, 4) and (1, 5). The minimum distance to 2 is 6, 3 is 8. The minimum
distance from 0 to 2 is, the sum of the distances from 0 to 1 and from 1 to 2, which is 2 + 3 =
5. Similarly all other calculations are made. All these are tabulated conveniently in a tabular
form shown below.
p Vp F -(Vp) X f+x fs Vs
(1, 1) 2 2 2 1
0 0 0 (0, 2) 6 6
(0, 3) 8 8
0 0 (0, 2) 6 6
(0, 3) 8 8
1 1 2 (1, 2) 3 5 5 2
(1, 4) 10 12
(1, 5) 8 10
0 0 (0, 3) 8 8
1 2 (1, 4) 10 12
2 (1, 5) 8 10
2 5 (2, 3) 1 6 6 3
(2, 5) 1 6 6 5
0 0
(1, 4) 10 12
1 2
3 2 5
(3, 6) 4 10
3 6 7 4
(5, 4) 1 7
5 6
(5, 7) 5 11
0 0
1 2
2 5
4
3 6 (3, 6) 4 10 10 6
4 7 (4, 7) 3 10 10 7
5 6 (5, 7) 5 11
0 0
1 2
2 5
3 6
5
4 7
5 6
6 10 (6, 8) 7 17 17 8
7 10 (7, 8) 10 20
Operations Research 89
School of Distance Education, University of Calicut
Note: We can find the minimum path even if we are not given the graph. All the arc lengths
and vertices are known, the problem can be solved.
Let Va, Vb be two vertices in the graph G(V, U) whose arc lengths are real numbers,
not necessarily positive. The problem is to find the minimum path from Va to Vb. Here we
assume that there are no circuits in the graph whose arc lengths add up to a negative number.
The reason is, if there is any such circuit we can go around and round it and decrease the
length of the path with out any limit getting an unbounded solution.(ie - ).
How to construct an arborescence? Mark out the arcs going from Va. From the vertices
so reached mark out the arcs going out to the other vertices. Note that we need not mark all of
them. No vertex should be reached by more than one arc. Clearly if there is a vertex to which
no arc is incident, it cannot be reached from Va and so is left out. No arc incident to Va should
be drawn.
Let fj denote the length of the path from Va to any vertex Vj in the arborescence. The
arborescence determines fj uniquely for each Vj in V1, but fj need not be the minimum. Let
(vk, vj) be an arc in G but not in A1. Consider the length fk + xkj and compare it with fj. If
fj fk + xkj, make no change. If fj > fk + xkj delete the arc incident to Vj in A1 and include the
arc (vk, vj). Thus arborescence A1 is modified to A2 and the value of fj is reduced fk + xkj. The
reduction in the value of fj being fj – (fk + xkj). Also the lengths of the paths to the vertices
going theory Vj are also reduced by the same amount. All the calculations are repeated and the
new values of fj for all Vj are calculated.
In A2 see whether we can select paths which gives smaller path to its vertices. If yes,
obtain A3 from A2 and find new values fj for each Vj. Proceeding like this we can find an
arborescence Ar which cannot be further modified. From Ar we can determine the minimum
path to all of its vertices. fb is the minimum path from Va to Vb.
Proof of the algorithm: Let (va, v1, v2, …, vb) be any path in G from va to vb. Its length is
xa1 + x12 + … + xpb. Since Ar contains all those vertices of G which can be reached from va,
the vertices in this path are in Ar also. Since Ar is an arborescence which cannot be further
changed, for every vertex Vj in Ar and for every arc (vk, vj) in G
fj fk + xkj or fj – fk xkj
Operations Research 90
School of Distance Education, University of Calicut
Writing these inequalities for all vertices
f1 – fa xa1
f2 – f1 x12
..…
……
fb – fp xpb.
Adding all of them we get,
Thus no path from va to vb in G can be smaller than fb. Since the path of length fb is also in G,
this path is the minimum.
Note: The path of maximum length can be found either by changing the signs of the lengths
of all arcs and then finding the minimum path, or by reversing the inequality fj > fk + xkj as
the criterion for changing an arc in the arborescence, so that at every stage a greater path is
selected against a smaller one.
6 7 3
2 2 -4 -1
5 4 2 2
3 3 –2
2
8 0 1
2 1
Draw an arborescence A1 with centre v0 consisting of all those vertices of the graph which can
be reached from v0, and the necessary number of arcs.
Operations Research 91
School of Distance Education, University of Calicut
6 7 3
2 2
5 4 2
2
2 3 -4
0 1
1
The lengths fj of the paths from v0 to different vertices vj of A1 are as follows.
f0 = 0 , f1 = 1, f2 = -4 , f3 = 3 , f4 = 3 , f5 = 2 , f6 = 4 , f7 = 5 .
Consider the vertex v2. there is an arc (v1 , v2) in G which is not in A1, such that
f2 = -4 < f1 + x12 = 1 + 2 = 3. So (1, 2) is not included.
Then consider the vertex v3. There is an arc (v2 , v3) in G which is not in A1 such that
f3 = 3 > f2 + x23 = -4 – 1 = -5.
So we delete the arc (v1 , v3) which is incident to v3 in A1 and instead include the arc (v2 , v3).
This gives a new arborescence A2 with f3 = -5.
6 7 3
2 2 -1
5 4 2
2 3 -4
0 1
1
Now consider vertex v4. there is an arc (v3 , v4) such that
f4 = 3 > f3 + x34 = -5 + -4 = -9. So delete the arc (v0 , v4) and include the arc (v3 , v4).
6 7 3
f0 = 0, f1 = 1,
2 2 -4 -1 f2 = -4, f3 = -5
5 4 2 f4 = -9, f5 = 2
f6 = 4, f7 = -1
2 -4
0 1
1
Operations Research 92
School of Distance Education, University of Calicut
Consider vertex v5. There is an arc (v4 , v5) such that
f5 = 2 > f4 + x45 = -9 + -2 = -11. So delete (v0, v5) and include (v4 , v5)
6 7 3
2 2 -4 -1
5
-1 4 2
-4
1
0 1
6 7 3
f0 = 0, f1 = 1,
-2 2 -4 -1
f2 = -4, f3 = -5
5 4 2 f4 = -9, f5 = -11
-2
f6 = -11, f7 = -7
-4
0 1
1
Now consider vertex v7. There is an arc (v6 , v7) such that
f7 = -7 > f6 + x67 = -11 + -1 = -12.
Again f7 = -7 > f3 + x37 = -5 + -5 = -10. Since -12 < -10 we include (v6 , v7).
-1
6 7 3
-2 -4 -1
5 4 2
-2
-4
0 1
1
This cannot be changed further. For this arborescence
Operations Research 93
School of Distance Education, University of Calicut
f0 = 0 , f1 = 1 , f2 = -4 , f3 = -5 , f4 = -9 , f5 = -11 , f6 = -11, f7 = -12. The minimum path
from v0 to v7 is (v0 , v2 , v3 , v4 , v6 , v7) with length –12.
4.3 Spanning tree of minimum length
Let G(V, U) be a connected graph with undirected arcs, and let T(V, U') be a tree such
that U' U. the set of vertices of T is the same as that of G, While all the arcs of T are arcs of
G also. Then T(V, U') is said to be a spanning tree of G(V, U) or T is said to span G.
The problem is to find the spanning tree of minimum length if the length of each arc of
G is given as a non-negative number.
Let xjk denotes the length between vj and vk. We assume that the arcs are undirected
and as such we have xjk = xkj for all arcs. Also we assume that xjk 0 for all arcs.
Algorithm:
Assumptions: No two arcs of G are of the same length. If xjk = xpq = xrs we take
xpq = xjk + e, xrs = xjk + 2e , e > 0. Keeping l small enough as not to make xrs equal to or
greater than any other arc length which is greater than xjk.
Consider the set of vertices V of the graph G(V, U). Given that G is connected. Hence
every vertex has one or more arcs incident with it. Also since all the arcs in V are of unequal
length, for each vertex, among all the arcs incident with it, there is one which is of the
smallest length. We shall say that this arc connects the vertex to its nearest neighbour.
Consider each vertex of V one by one and connect it to its nearest neighbour. In this
way we shall get a partial graph G1(V, U1) of G consisting of all its vertices and some of its
arcs. G1 may, in general, be an unconnected graph with several components, each of which is
connected within itself.
Let each of these components be treated as if it is a single vertex. We shall thus have a
new set of vertices, each vertex being a component of the graph G1. Every one of these
vertices have arcs of the graph G connecting it with one or more of other vertices. For, if it
were not so, G will not be connected. The arc of the smallest length between two vertices will
be taken as the measure of the distance between them. We again consider each of these
vertices one by one and connect each vertex to its nearest neighbour, that is the one which is
at the least distance from it. This operation will result in another graph G2(V, U2) which again
have many components. Again let each of these components be treated as vertices and let each
vertex be connected to its nearest neighbour , yielding a graph G3(V, U3). The procedure is
Operations Research 94
School of Distance Education, University of Calicut
repeated till a connected graph Gp(V, Up) is obtained. This graph is the required spanning tree.
Example: Find the minimum spanning tree of the following graph. It is an undirected graph.
14 9
1 4 8
1
18 10 13
5 15
6 3 7 6 3
2 16 12
7
2 5
8 17
Consider the vertex v1. v1 is connected to v2 , v3 , v4 and v5 whose lengths are 6, 5, 14 and 18
respectively. Among these 5 is the minimum and so v3 is the nearest neighbour of 1. Similarly
for v2, also v3 is the nearest neighbour. Find the nearest neighbours of all the vertices. The
following graph with three component A1, A2 and A3 is obtained.
8
1 4
3
A1 3
A2 6
A3
2
5
7
Treat A1 , A2 and A3 as three vertices. The arcs of G connecting A1 to A2 are of lengths 14(1-
4), 18(3 – 4) , 8(2 – 5) , 16(3 – 5) and 11(1 – 5) and so the distance between A1 to A2 is taken
as the minimum one, that is 8, and (v2 , v5) is connected. We get the following graph. Note
that there are no arcs connecting A1 and A3.
4 8
1
3
A4 A5
2 5 7
In the above graph there are two components A4 and A5. These two vertices are connected by
(v4 , v6) , (v4 , v8) , (v4 , v7) , (v5 , v7) and (v5 , v8) and the nearest neighbour is v8 and (v4 , v8)
is connected.
Operations Research 95
School of Distance Education, University of Calicut
4 9 8
1
5
6
3 7 3
2 4
2 5 7
Thus we get a single connected graph which is the smallest spanning tree. The length of the
spanning tree is 38.
Clearly every vertex of G(V, U) has a unique neighbour. (G is connected and all the
arc lengths are of different lengths). By connecting every vertex to tits nearest neighbour we
get the graph G1(V, U1) which has components. When these components are connected, each
to its nearest neighbour, we get another graph G2(V, U2) which has components. By repeating
this operation we finally graph Gp(V, Up) which has single component, and thus we get a
connected graph.
If possible let it have a cycle (va , vb , vc , … vb , va). Let us mark arrows on the arcs in
this cycle (Originally there were no arcs on them) which indicate the nearest neighbour of
each vertex. For example, if the nearest neighbour of vb is vc we mark the arrow from vb to vc.
In this way every arc in the cycle will receive an arrow. Because if, for instance, (va , vb) does
not get an arrow, then neither vb is the nearest neighbour of va nor va is the nearest neighbour
of vb, and so the arc (va , vb) should not have been there at all.
After all the arcs in the cycle have been marked, one of the following two situations
arise. (i) All the arcs are marked in the same sense.
Without loss of generality let us suppose that they have been marked as v a vb,
vb vc, … vd va. Now it is clear that vi is the nearest neighbour of vb (not va) we have
xab > xbc. Similar is the case with the other vertices also. Hence.
Operations Research 96
School of Distance Education, University of Calicut
But xab > xda means that the nearest neighbour of va is not vb. This is a contradiction.
Therefore all the arcs cannot have arrow marks in the same sense. (ii) some arcs are marked
in one sense and some other arcs in the opposite. Then there must be a vertex, say, v b, such
that the arrows to break its neighbours va and vc are directed away from vb. This in turn means
that vb is nearest to va and also nearest to vc. Since the arcs are of different lengths, this is not
possible. So this also leads to a contradiction.
We thus prove that the graph we get by this algorithm is a connected graph without
cycles, that is , it is a tree. Since it includes all the vertices of G, it spans G.
If possible, let us suppose that the smallest spanning tree T(V, U|) is not the same as
Gp(V, Up). Then there must be an arc in Gp which is not in T, otherwise the two trees T and Gp
will not be different. Let this arc be (va , vb) such that vb is the nearest neighbour of va. Let us
introduce this arc in T. Since this is an additional arc introduced in a tree T, a cycle will be
formed. Let this cycle be (va , vb , vc , … , vd , va). Since vb is the nearest neighbour of va, the
length of the arc (vd , va) is greater than that of (va , vb). So if we delete the arc (vd , va) from T
and introduce (va , vb) the length of the resulting tree will decrease, which in turn means that T
is not of minimum length, which is again a contradiction that T is a tree of minimum length.
So there is not a n arc of Gp which is not in T. But the total number of arcs in Gp is the same
as in T, because both are trees spanning the same graph and should have (n – 1) arcs where n
is the number of vertices in G. Then Gp is the same as T ie Gp is the minimum spanning tree
of G.
Let G(V , U) be a graph, and let with each vertex vj be associated a real number fj
called its potential. If ui = (vj , vk) is an arc, then xjk = fk – fj is called the potential difference
in the arc ui. In this way with each arc of the graph is associated a potential difference. It is
obvious that xjk = -xkj. The potential difference in a chain through the vertices v1, v2 , …, vp
as x12 + x23 + … + xp – 1, p = f2 – f1 + f3 – f2 + … + fp – fp – 1 = fp – f1.
Clearly the potential difference in a cycle is zero. The problem of maximum potential
difference. Let va and vb be two vertices in a graph G(V, U), We have to find the maximum
Operations Research 97
School of Distance Education, University of Calicut
potential difference xab between the vertices such that the potential difference in all arcs (vj ,
vk) of G is subject to the condition xjk cjk , where cjk are given constants.
In terms of potentials the above constraint may be written as fk – fj cjk for all arcs (vj , vk)
and the problem then is to find the maximum value of fb – fa subject to these constraints. Since
we are interested in potential differences and not absolute values of potential, we may take f a
= 0 without any loss of generality. The problem is stated as follows.
In this form the problem is identical with the minimum path problem where arc lengths are
cenrestricted in sign. We solve the problem of minimum path form va to vb with cjk as the
length of the arc (vj , vk).
Example: Find the maximum potential difference x14 between v1 and v4 of the graph with the
following data subject to the condition that for each arc xjk cjk.
V : 1 2 3 4
U : (1, 2) (1, 3) (2, 3) (2, 4) (3, 4) (1, 4)
Cjk : 3 2 -2 1 4 -1
3 1
-1
1 4
2 -2 4
f1 = 0 , f2 = 3 , f4 = f2 + (2, 4) = 3 + 1 = 4
Now f4 = -1 , f3 = f2 + (2, 3) = 3 – 2 = 1
The maximum potential difference x14 = -1 with optimal path (v1 , v4). See the following table
also
fj – fk -bjk
Let cjk be the time required on job vj before job vk can start. It is the time interval
between the start of the two jobs vj preceding vk. This information is indicated by drawing the
arc (vj, uk) and associating the length cjk with it. The time required to complete vj is
represented by the arc (vj , vb) of length vjb, as it would mean that the time cjb should be spent
on vj before the end vb can be reached. Also if vj can start only after some time has passed
from the beginning of the project, we may indicate it by caj. All arcs (vj , vk) with lengths cjk
will in this way denote a sequential relationship in terms of time among various jobs.
Each sequence of jobs which must be done before work on vj can begin is represented
by a path connecting va to vj. The longest of these paths determines the earliest time vj can
start. In this way the longest path joining va to vb gives the minimum time of completion of
Operations Research 99
School of Distance Education, University of Calicut
the project. The problem thus reduces to finding the maximum path with arc length cjk. This
path is called the critical path.
Example: A building activity has been analyzed as follows, vj stands for a job.
(i) v1 and v2 can start simultaneously, each one taking 10 days to finish.
(ii) v3 can start after 5 days and v4 after 4 days of starting v1.
(iii) v4 can start after 3 days of work on v3 and 6 days of work on v2.
(iv) v3 can start after v1 is finished and v2 is half done.
(v) v3, v4 and v5 take respectively 6, 8 and 12 days to finish. Find the critical path and
the minimum time for completion.
Based on the above information we draw a graph first. The vertices va and vb represent the
start and the finish of the project and the other vertices the various jobs to be done. The arc
lengths denote the time between the start of two jobs.
5
1 3
0 4 3 6
8
a 4 b
6 10
0
2
10 12
5
1
5 3
0 3
a 4 b
10 12
The critical path is (va , v1, v5, vb) and the minimum time for the completion of the job is 22
days.
Definition:
Let xi be a real number associated with every arc ui, i = 1, 2, …, m. If a graph G(V, U)
flow in the arc ui, and the set [xi] i = 1, 2, …, m is said to be a flow in the graph G.
Let {xi} be a flow in the Graph G such that 0 xi ci , i = 1, 2, …, m. Here the flow
in the arc u0 (that is x0) has no constraints.
All that flows out at va flows in at vb. That is why va is called source at vb sink. The arc u0 is
called return arc. It is used as a mathematical device.
Now the problem is to find the flow {xi} such that x0 is maximum
Subject to 0 xi ci ; i = 1, 2, …, m.
Algorithm:
Step 1: Start by assuming a feasible flow. It is always possible to assume xi = 0 for all i.
Step 2: Divide the set V of vertices in to two subsets, W1 and W2 such that W1 W2 = .
For a start take W1 = {va} and all other vertices being in W2.
Transfer vertices from W2 to W1 like this. Finally if vb is also transferred the flow is not
optimal.
Step 4: If the flow is not optimal, increase xi in arc of category (a) in which x i < ci (flow <
capacity) and decrease xi in arc of category (b) in which x i > 0 (flow > 0) so that the
flow remains feasible and at least one arc gets capacity flow. Then go to step 2.
After a number of steps a stage will come when vb cannot be transferred to W1 by step
3. The flow at that stage is optimal.
Example: In the following graph find the maximum flow. The numbers along arcs are their
capacity.
1
1
4 2 4
0
3 2 2
5
a 2 5 6
1
2
1
1
3 6
u0
Let us assume an initial flow of zero in all arcs 0 < 3 (capacity). Let W 1 = {va}. Now
va W1 and v1 W2 and the flow. Therefore transfer v1 to W1. Again v1 W1 and V4
W2 such that the flow 0 < 1 (capacity). So transfer v4 also. Now v4 W1 and v3 W2 with
flow 0 < 2 (capacity). Transfer v3 to W1. Again v3 W1 and v5 W2 with flow (0) < capacity
(1). Transfer v5. Finally v5 W1 and vb W2 with flow < capacity (0 < 5). Transfer v6 to W1.
We have gone along the chain (va, v1, v4, v3, v5, vb). The least capacity in this chain is 1. so in
each arc of this chain and also in the return arc (vb, va) increase the flow to 1, keeping the
flows in other arcs unchanged see that the modified flow is feasible.
The above steps are repeated with every modified feasible flow until it is not possible
to transfer vb to W1. In each feasible flow the numbers in ( ) indicate the chain along which it
is possible to proceed to transfer vb into W1. The asterik indicates that the flow in the
corresponding arc is equal to its capacity and cannot be further increased.
Then we consider the chain (va, v1, v5, vb) and the maximum permissible flow is 2
units. Then we consider (va, v2, v6, vb) with flow 1 unit. Next consider the chain (va, v2, v4, v3,
v6, vb) with permissible flow 1 unit. Now start with W1 = {va}. Since the flow in (va, v3) is less
than the capacity it is transferred to W1. Now (v3, v5) and (v3, v6) both are saturated. But there
is an arc (v4, v3) such v3 W1 and v4 W2 and the flow in it is greater than zero. Hence v4 is
transferred to W1. Again there is an arc (v1, v4) with v4 W1 and v1 W2 with a positive flow.
Therefore v1 is also transferred to W1. Then since the flow through the arc (v1, v5) is less than
its capacity v5 is also transferred. Finally vb is also transferred. Since vb is transferred the flow
is not optimal. But the iterations stop at this because no matter how we try we cannot transfer
v6 to W1. The maximum flow in the graph is 6.
Definition:
If in the graph G(V, U) of the maximum flow problem, W2 is a subset of V such that
vb W2 , va W2, then the set of arcs Ω W2 (arcs incident to W2) is said to be a cut. The
capacity of the cut is the sum of the capacities of the arcs contained in the cut.
Theorem:
For any feasible flow {xi}, i = 1, 2, …, m in the graph, the flow x0 in the return arc is
not greater than the capacity of any cut in the graph.
Proof:-
Let + (W2) be any cut. Consider the flow in the arcs going to and going from W 2.
We know that the flow in should be equal to flow out.
and denotes the summation over the arcs going from W2.
2
Since xi 0 for i, xi x0
1
Theorem:
The algorithm described earlier solves the problem of the maximum flow.
Proof:-
Again let uj - (W2). It means that uj is an arc (vr, vs) where vr W2, v5 W1. The
flow in this arc should be zero, because if xi > 0, it would have been possible to transfer vr
from W2, which again is contrary to hypothesis.
We conclude that the flow into W2 is Ci summation being over all ui + (W2),
and the flow out of W2 is only in the return arc u0, because it is the only arc going from W2
carrying a non-zero flow. Let the flow in u0 be y0. Then since the flow in is equal to flow out,
we have
It is clear that
y0 = max x0.
This in turn implies that the algorithm leads to finding out the maximum flow.
The maximum flow in a graph is equal to the minimum of the capacities of all possible
cuts in it.
Proof:-
We have x0 Ci
But in the previous theorem we have seen that there is a cut corresponding to which the flow
in u0 is equal to cut capacity. Necessarily this flow should be maximum and the corresponding
cut capacity should be the least of all cut capacities.
Duality in the maximum flow problem: The idea is explained using an example.
u1 u4 u5
u6
a 3 b
u2 u3 u7
u0
The problem of maximum flow through this network is stated as a LPP as follows.
Maximise f = x0
Subject to x0 - x1 - x2 =0
x1 + x4 – x5 =0
Operations Research 106
School of Distance Education, University of Calicut
x2 – x3 –x7 =0
x3 – x4 – x6 =0
x1 c1
x2 c2
x3 c3
x4 c4
x5 c5
x6 c6
x7 c7
and xi 0 , i = 1, 2, …, 7.
Let y1, y2 , y3 , y4 be the dual variables associated with the first flow equalities and Zi ,
i = 1, 2, …, 7 are the dual variables associated with the last seven inequalities.
7
Minimize = ci zi
i 1
Subject to y1 1
-y1 + y2 + z1 0
-y1 + y3 + z2 0
-y3 + y4 + z3 0
y2 – y4 + z4 0
-y2 + z5 0
-y4 + z6 0
-y3 + z7 0
zi 0 , yj unrestricted.
7
ci zi
i 1
or max x0 = min (1)
But we know max x0 = min ci (2)
where ci is any cut. Comparing (1) and (2) we can see that for the optimal solution the
dual variables zi have the values zi = 1 for these arcs which are in the minimum cut and zi = 0
for all other arcs.
Subject to bi xi ci. Here xi can vary between bi and ci ; (bi , ci R , not necessarily non-
negative). Here a negative flow xi in an arc is admissible and is interpreted as a flow – xi in
the reverse direction.
bi xi ci may be written as
0 xi ci – bi or equivalently
0 yi ci – bi (yi = xi – bi)
Now, in terms of the new variables yi (yi = xi – ci) the constraints are similar to those of the
problem already discussed in a previous section. The main difficulty arises from the fact that
if {xi} is a flow, {yi} is not necessarily a flow. We know that {xi} is a flow if x x
1
i
2
i or
if y b y b
1
i
1
i
2
i
2
i
bi = bi ,
1 2
If ui = (vj , vk) is an arc for which bi > 0, draw the arcs (v0, vk) and (vj , v0) , thus forming a
cycle (v0 , vk , vj , v0). Assume a flow bi in each of the arcs (v0 , vk) , (vk , vj) , (vj , v0) thus
getting a flow in the cycle.
Let {xi} be any flow in G. It is also a flow in G1. Let this flow be superimposed on the
fictitious flow. The result is a flow because it is a linear combination of two flows. Denoting
this flow by {yi}, we have
yi = xi – bi , for ui in G
yi = the fictitious flow for all fictitious arcs.
y0 is maximum
subject to 0 yi ci – bi for ui G,
This involves keeping the flow constant in some arcs of G1 and varying in others till y0
is a maximum. This can be done by the algorithm discussed earlier. Having determined the
optimal flow {yi} , we put xi = yi + bi and we have required flow {xi} in G.
*******************
5.1 Introduction
In many L P Problem we are interested in integer values for the variables in optimal
solution. For eg: if the variables are the number of buses on different routes in a town or the
number of bank branches in different regions in a country then our L P problem turns to
integer programming problem (ILPP). In LP problem, if some of the variables are restricted to
be integers while others are real numbers, the problem is said to be mixed integer
programming problem. (MILPP).
The set of feasible solutions of the integer Linear Programming problem (ILPP) is not
convex, because it consists of some isolated integer valued points. But when we are forming
the convex hull of all these points, every vertices of this convex hull is a feasible solution of
the ILPP.
TF SF.
Since SF is non empty, convex and every point of TF is in SF, then the convex linear
combinations of points in TF are also in SF. Hence the convex hull [TF], of points of TF is a
subset of SF
Thus TF [TF] SF (1)
Now ILPP or MILP can be stated as
School of Distance Education, University of Calicut
Minimize f ( X ) CX
(2)
Subject to X TF
and the related LPP as
Minimize f ( X ) CX
(3)
Subject to X S F
Consider another LPP associated to these problems
Minimize f ( X ) CX
(4)
Subject to X [TF ]
Results:
(i) If an optimal solution of (3) exists and TF is non empty, then
optimal solution of (2) and (4) exists. Also the optimal solution of (3) is a lower bound for
the optimal solutions of (2) and (4).
Proof:
Let X 0 be an optimal solution of (3). Then for all X in S F
f (X0) f (X ) .
f ( X 0 ) f (Y ) .
This means that f (Y ) , Y TF , has a lower bound, and so (2) has an optimal solution.
Similarly we prove that (4) has an optimal solution.
(ii) If an optimal solution of (3) is an integer or a mixed integer
vector as required by the integer constraints, then it is also an optimal solution of (2).
(iii) In optimal solution of (2) is an optimal solution of (4)
conversely a basic optimal solution of (4) is an optimal solution of (2).
5.3 Methods for Solving ILPP and MILPP
Gamories cutting plane method:
Consider a general ILPP,
Minimize f ( X ) CX
Subject to AX B
X 0
Where X is an integer vector.
The related LP problem is
If all the bi' s are integers, we have the solution of ILLP and nothing is to do
Let
bi' bi' i
And a a , j m 1, m 2,..., n
'
ij
'
ij ij
then b 0 ( b 0)
i
'
i
'
a x
n n
xi bi'
j m 1
'
ij j i
j m 1
ij xj.
This equation, being one of the constraint must be satisfied by every feasible solution
of the ILPP as well as the related LPP.
But for an integer feasible solution LHS should be an integer and so, the RHS too be
an integer
Also since 0 ij < 1 and xj being feasible,
n
ij x j 0.
j m 1
n
Since 0 < i < 1 and ij x j 0
j m 1
n
or
j m 1
ij x j i (6)
But for the optimal solution of the related LPP with which we started;
x j 0, for j m 1, m 2,..., n and so
n
i
j m 1
ij x j = i > 0
Thus we have discovered a linear constraint (6) which is satisfied by integer solutions
of the problem but cuts out the optimal solution of the LPP provided it is non integral.
n
So the constraint
j m 1
ij x j i , with equality sign by adding slack variable is the
0 x5 2 0 1 0 0 1
½
f=0 -2 0 0 0
-3
-3 x2 2 0 1 0 0 1
f = -6 0 0 0 3
-2
-3 x2 2 0 1 0 0 1
f = -9 0 0 1 0 1
Since all (Cj – Zj)‟s are non negative the current solution is optimal. But not integer valued.
To form the cutting plane constraint, we consider the equation from the table,
x1 12 x3 x5 3
2
x1 (0 12 ) x3 x5 (1 12 ) (a)
Using (a) the cutting plane constraint can formed as
12 x3 0 x5 12
ie 12 x3 12
12 x3 x6 12
Giving this additional constraint, the iteration table is
Cj -2 -3 0 0 0 0
CB yB xB P1 P2 P3 P4 P5 P6
-2 x1 3/2 1 0 1/2 0 -1 0
0 x4 ½ 0 0 -1/2 1 1 0
-3 x2 2 0 1 0 0 1 0
0 x6 -1/2 0 0 -1/2 0 0 1
1
f = -9 0 0 0 1 0
Here the solution is not feasible, applying the dual simplex method, the outgoing variable can
be found as x6 and the incoming variable as x3.
-3 x2 2 0 1 0 0 1 0
0 x3 1 0 0 1 0 0 -2
= -8 0 0 0 1 2
0
Table implies the solution is optimal, feasible and integer valued also. So we can stop the
iteration. Hence the solution is
Minimum f = -8 where, x1 = 1 , x2 = 2
First solve the problem without considering the integer constraints. The problem is termed as
problem 1. Its sub problems are termed as problem 11 and problem 12. And naming is
continued like this.
The successive branches of the problem and the solutions are pictured. The additional
constraints on each branch are written inside of the circle.
Problem 1
Solution
x1 = 3/2 , x2 = 5/2
f=0
Problem 11 Problem 12
Solution Solution
x1 1 x1 = 1 , x2 = 3/2 x1 2 x1 = 2 , x2 = 9/4
f = 3/2 f=1
Minimize f(x) x En
Subject to gi(X) 0 , i = 1, 2, … m
Using the vector Y = (y1, y2, … ym)' let us define the function
m
F(X, Y) = f(X) + y
i 1
i gi(X)
= f(X) + Y'G(X)
where G(X) = [g1(X) , g2(X), … gm(X)]'.
The function F so defined is called Lagrangian function and the component of the vector Y,
that is y1, y2, y3, …….ym are called Lagrangian multipliers. A point (X0, Y0) is said to be a
saddle point of F(X, Y) if
in some neighbourhood of (X0, Y0). The saddle point of F(X, Y), if it exists and minimal point
of f(x) bear a theoretical relationship. We will unearth this relationship through a number of
theorems.
Theorem: A1
Proof:-
Let (X0, Y0) be a saddle point of F(X, Y) , then F(X0, Y) F(X0, Y0) F(X, Y0) f(X0) +
Y' G(X0) f(X0) + Y0' G(X0) f(X) + Y0'G(X) (A1)
Y G(X0) Y0 G(X0)
' '
(A2)
School of Distance Education, University of Calicut
If possible gi(X0) > 0 for some i. For given Y0 we can take yi the ith component of Y
sufficiently large so that Y' G(X0) is large enough to violate (A2)
If F(X, Y) has a saddle point (X0, Y0) for every Y 0, then X0 is a minimal point of f(X)
subject to the constraints G(X) 0
Proof:-
Converse of the above theorem is not true in general. However if f(X) and all gi(X) are
convex functions, then the converse is also true. We now proceed to prove this theorem. First
we consider the following result.
Theorem: A3
Minimize f(X)
Subject to gi(X) 0 , X 0
where f(X) and gi(X) are convex functions. Further, let the set of points X, such that
G(X) < 0
Theorem: A4
Proof:-
Hence
Remark: We have proved that a sufficient condition that X0 is a minimal point of f(X)
subject to the constraints G(X) 0 is that the functions F(X, Y) has a saddle point (X0, Y0) ,
Suppose (X0, Y0) is a saddle point of the function Lagrangian function F(X, Y)
defined above. Then
F ( X , Y0 )
= 0 , j = 1, 2, …, n (B2)
x j X X
0
Let Y be a point in the neighbourhood of Y0. Since Y 0 , for every Y, in general some of
the components of Y0 may be zero and some positive. Denoting by yi0 the components of Y0,
let
Let the neighbouring point Y differ from Y0 only in the ith component, the other
component in the two being equal. Then using Taylor‟s series expansion
F ( X 0 , Y )
F(X0, Y) - F(X0, Y0) = (yi - yi0) +…
yi Y Y
0
F(X0, Y) - F(X0, Y0) can be made to depend on the sign of the term on the right. Let yi0 > 0,
then yi - yi0 can be made positive or negative by suitable choice of yi which can be greater than
or less than yi0. Therefore F(X0, Y) - F(X0, Y0) can me made positive or negative by a proper
choice of Y. But by the left side inequality of (B1) is never positive. Therefore yi0 > 0
Implies
F ( X 0 , Y )
= 0 , i = 1, 2, … k (B3)
y i Y Y
0
F ( X 0 , Y )
0 (B4)
yi Y Y
0
F ( X 0 , Y )
Hence yi0 = 0 (B5)
y i Y Y
0
m
If we write F(X, Y) = f(X) + y g ( X ) the (B2) and
i 1
i i (B5) together implies
f m gi
x j
+ yi
i 1 x
= 0 , j = 1, 2, … n
(B6)
j
g i (X) 0
yi g i (X) 0 , i 1, 2, .. m (B7)
yi 0
Suppose in the programming problem, we impose the addition restriction X 0. Again
(X0 , Y0) is a saddle point when F(X0, Y) F(X0, Y0) F(X, Y0) , X 0 , Y 0
By Taylor‟s series expression we get
F ( X , Y0 )
F(X, Y0) - F(X0, Y0) = (xi - xi0) +…
xi X X
0
F ( X , Y0 )
0 and
x j X 0
F ( X , Y0 )
xi0 =0 (B8)
x j X X
0
f m
g
yi i 0
x j i 1 x j
f g
xj yi i 0 , x j 0 , g i x 0 (B9)
x j x j
y i g i ( X ) 0 , i 1, 2, ... m
yi 0
The set of conditions (B6) and (B7) or (B9) are Kuhn – Tucker conditions. The conditions
(B6) and (B7) are the set of necessary conditions which (X0 , Y0) must satisfy if it is a saddle
point of F(X, Y) provided Y 0 and X is unrestricted. The condition (B9) is the necessary
condition that (X0 , Y0) being a saddle point provided X 0 , y 0. Notice that the above
conditions are only necessary; not sufficient.
Example:-
The four equations of the above conditions gives the following 9 solutions
of these solutions (2) is the only one which satisfy the other conditions. Hence minimum of
f(X) is 2 at x1 = 0 , x2 = 1.
Kuhn-Tucker theory also lead to the primal-dual concept in the optimization theory.
is equivalent to
The idea is that if F(X, Y) is first maximized with respect to Y for any fixed X and then
minimized with respect to X, and also if this order is changed and of is first minimized with
respect to X for any fixed Y and then maximization with respect to Y and if the two
operations lead to the same value of F(X, Y), then and then only F(X, Y) has a saddle point.
Subject to G(X) 0 , Y 0
Since G(X) 0 , Y 0
max
F(X, Y) = f(X)
Y
Operations Research 126
School of Distance Education, University of Calicut
min max min
So F(X, Y) = f(X)
X Y X
min min
Also F(X, Y) = [f(X) + Y'G(X)]
X X
= (Y ) say
If the saddle point of F(X, Y) exists,
min max
Then f(X) = (Y )
X Y
min
Since (Y ) = [f(X) + Y'G(X)]
X
the necessary constraint on (Y ) is [f(X) + Y'G(X)] = 0
Hence the dual of the problem
Min f(X)
Such that gi(X) 0 , i = 1, 2, … m
is Max (Y ) = max[f(X) + Y'G(X)]
f ( X ) g
subject to
x j
+ yi x i = 0 , j = 1, 2, … n
j
yi 0 , i = 1, 2, … m
p
j 1
j xj
C j k x j xk
= + (D1)
subject to AX B ; X 0 (D2)
Here X En , C = (Cjk) is an nxn matrix , P = (pj) a row n-vector, A = (aij) is an mxn
matrix and B = (bj) is a column m–vector. X'AX is positive semi definite. The Lagrangian
function associated with the programming problem is
n m
are pj + 2 C j k X k + yi ai j 0
k 1 i 1
n m
xj pj + 2 c j k xk + yi ai j =0
k 1 i 1
xj 0 , j = 1, 2, …………. n ;
n
and ai j x j - bi 0
j 1
n
yi ai j x j - bi = 0
j 1
yj 0 , i = 1, 2, …………. m
Introducing slack and surplus variables in the inequalities the above inequalities becomes
n m
pj + 2 c j k xk +
k 1
yi ai j
i 1
- vj = 0
xj vj = 0
xj 0 , vj 0
n
ai j x j - bi + wi = 0
j 1
yi - wi = 0
yi , wi 0 , i = 1, 2, … m
n m
2 c
k 1
jk xk + ai j yi
i 1
- vj = -Pj (D3)
n
ai j x j + wi = bi
j 1
x j v j 0 , yi wi 0
(D4)
xi , yi , v j , wi 0
(D4) says that xj 0 vj = 0
vj 0 xj = 0
yj 0 wi = 0
wi 0 yj = 0
Thus out of the total number of variables 2m + 2n, at least m+n must be zero. It means we are
looking for a basic solution of (D3) subject to (D4). The simplex method can be used to
obtain solution.
Example:-
Minimize f(X) = -x1 – x2 – x3 + ½(x12 + x22 + x32)
Subject to g1(X) = x1 + x2 + x3 – 1 0
7
g2(X) = 4x1 + 2x2 – 0
3
x1 , x2 , x3 0
The Lagrangian function for this problem is
7
F(X, Y) = -x1 – x2 – x3 + ½(x12 + x22 + x32) + y1(x1 + x2 + x3 – 1) + y2(4x1 + 2x2 – ) , and
3
the Kuhn – Tucker conditions are
-1 + x1 + y1 + 4y2 0
-1 + x2 + y1 + 2y2 0
-1 + x3 + y1 0
x1(-1 + x1 + y1 + 4y2) + x2(-1 + x2 + y1 + 2y2) + x3(-1 + x3 + y1) = 0
x1 + x2 + x3 – 1 0
4x1 + 2x2 – 7/3 0
7
y1(x1 + x2 + x3 – 1) + y2(4x1 + 2x2 – ) = 0,
3
x1 , x2 , x3 , y1 , y2 0
-1 + x1 + y1 + 4y2 - v1 = 0
-1 + + x2 + y1 + 2y2 - v2 = 0
-1 + + x3 + y1 - v3 = 0
-1 + x1 + x2 + x3 + w1 = 0
7
- + 4x1 + 2x2 + w2 = 0
3
Thus there are 5 linear equations in 10 variables. The last three sets of conditions imply that
only five of them can be nonzero at time. To solve the problem we introduce three artificial
variables S1, S2, S3 to the first three equations and Phase I of the two phase simplex method is
now applicable. Phase I ends when artificial variables are removed from the basis and the
solution so obtained is the solution to the problem.
Basis Value x1 x2 x3 y1 y2 V1 v2 v3 w1 w2 S1 S2 S3
S1 1 1 0 0 1 4 -1 0 0 0 0 1 0 0
S2 1 0 1 0 1 2 0 -1 0 0 0 0 1 0
S3 1 0 0 1 1 0 0 0 -1 0 0 0 0 1
W1 1 1 1 1 0 0 0 0 0 1 0 0 0 0
W2 7/3 4 2 0 0 0 0 0 0 0 1 0 0 0
f -3 -1 -1 -1 -3 -6 1 1 1
S1 1 1 0 0 1 4 -1 0 0 0 0 1 0 0
S2 1 0 1 0 1 2 0 -1 0 0 0 0 1 0
x3 1 0 0 1 1 0 0 0 -1 0 0 0 0 1
W1 1 1 1 1 0 0 0 0 0 1 0 0 0 0
W2 7/3 4 2 0 0 0 0 0 0 0 1 0 0 0
f -2 -1 -1 -2 -6 1 1 0 1
S1 1 1 0 0 1 4 -1 0 0 0 1 0
S2 1 -1 0 0 2 2 0 -1 -1 -1 1 1
x3 1 0 0 1 1 0 0 0 -1 0 1
x2 0 1 1 0 -1 0 0 0 1 1 -1
W2 7/3 2 0 0 2 0 0 0 -2 -2 1 2
f -2 0 -3 -6 1 1 1 1 0
S1 ½ 3/2 0 0 0 3 -1 ½ ½ ½ 1 -1/2 -1/2
y1 ½ -1/2 0 0 1 1 0 -1/2 -1/2 -1/2 ½ ½
x3 ½ ½ 0 1 0 -1 0 ½ -1/2 1/2 -1/2 1/2
x2 ½ ½ 1 0 0 1 0 -1/2 ½ ½ ½ -1/2
W2 4/3 3 0 0 0 -2 0 1 -1 -1 1 -1 1
f -1/2 -3/2 -3 1 -1/2 -1/2 -1/2 3/2 3/2
x1 1/3 1 0 0 0 2 -2/3 1/3 1/3 1/3 2/3 -1/3 -1/3
y1 2/3 0 0 0 1 2 -1/3 -1/3 -1/3 -1/3 1/3 1/3 1/3
x3 1/3 0 0 1 0 -2 1/3 1/3 -1/3 1/3 -1/3 -1/3 -1/3
x2 1/3 0 1 0 0 0 1/3 2/3 1/3 1/3 -1/3 2/3 -1/3
W2 1/3 0 0 0 0 -8 2 0 -2 -2 1 -2 0 2
f 0 0 0 0 0 0 1 1 1
In the first iteration the variable y2 with most negative net evaluation cannot enter the basis as
w2 cannot be removed from the basis immediately (y2w2 = 0). Similarly y1 cannot enter the
This is another kind of non linear programming problem where a modified version of
the simplex method is applicable.
Definition:
Definition:
xj 0 , j = 1, 2, … m
The technique employed here is to approximate the non linear function by piece wise
linear function and then apply the simplex technique in some manner to get an optimal or
mear optimal solution.
Let (t) be a non linear function of a single variable t and let t be in a small interval [t1, t2].
Write 1 = (t1) , 2 = (t2). Let (t) be the equation of the line passing through (t1, 1)
and (t2 , 2) then
(t ) 1 2 1
=
t t1 t2 t1
t2 t t t1
or (t) = 1 + 2
t2 t1 t2 t1
Operations Research 131
School of Distance Education, University of Calicut
= 1 1 + 2 2 , 1 + 2 = 1
1, 2 0.
Now let us suppose we want to approximate the non linear function (t) , a t b , by a
piece wise linear function. We divide the interval [a, b] in to n subintervals [tj , tj+1] , j = 0, 1,
…. n-1. In each of these subintervals we may approximate (t) by a linear function, as
explained above.
(t) = 0 0 + 1 1+ … + n n
n
subject to (i) j = 1
j 1
(ii) j 0
(iii) No more than two of the ‟s can be non zero at the same time and if two
of them are zero, then they are adjacent.
Example:
x1 0 , x2 0
Clearly both objective function and constraints are separable f(x1, x2) = f1(x1) + f2(x2)
= (2x1 + 4) + 3x24
g1(x1, x2) = g11(x1) + g12(x2)
= 4x1 + 2x22
of which f1(x1) and g11(x1) are already linear. From the constraints 4x 1 + 2x22 16 , x1 0
, x2 0 it is clear that 0 x2 3. Dividing [0, 3] in to three equal parts we have
g12 = 2 21 + 8 22 + 18 23
3
2 j = 1 , 2j 0 , j = 0, 1, 2, 3.
j 1
And if 0 < 2j < 1, then only either 2j+1 or 2j-1 is non zero. Thus the given problem can be
replaced by the approximate problem
Subject to g1 = 4x1 + 2 21 + 8 22 + 18 23 16
20 + 21+ 22 + 23 = 1
x1 , 20 + x21 , x22 , 23 0
Basis Value x1 20 21 22 23 S
S 16 4 0 2 8 18 1
20 1 0 1 1 1 1 0
-f 4 -2 0 -3 -48 -243
S 8 4 -8 -6 0 10 1
21 1 0 1 1 1 1 0
-f 52 -2 48 45 0 -195 0
Example: 2
Maximize f(x1, x2) = 2x1 + 3x24 + 4
Subject to g1(x1 , x2) = 3x12 + 4x22 36
x1 0 , x2 0
Notice that
f(x1 , x2) = f1(x1) + f2(x2) = 2x1 + 4 + 3x24
g1(x1 , x2) = g11(x1) + g12(x2) = 3x12 + 4x22
From the constraint it is immediate to see that 0 x1 4 and 0 x2 3. Dividing these
intervals in to subintervals of unit length, we get the value of the functions at the nodal points
as follows.
Operations Research 134
School of Distance Education, University of Calicut
f1(xij) g11(xij) f2(x2j) g12(x2j)
j xij x2j
= 2xij + 4 = 3xij2 = 3x2j4 = 4x2j2
0 0 4 0 0 0 0
1 1 6 3 1 3 4
2 2 8 12 2 48 16
3 3 10 27 2 48 16
4 4 12 48 3 243 36
f1(x1) = 2x1 + 4 = 4 10 + 6 11 + 8 12 + 10 13 + 12 14
g11(x1) = 3x12 = 3 11 + 12 12 + 27 13 + 48 14
f2(x2) = 3x24 = 3 21 + 48 22 + 243 23
g12(x2) = 4x22 = 4 21 + 16 22 + 36 23
Maximize f = 4 10 + 6 11 + 8 12 + 10 13 + 12 14 + 3 21 + 48 22 + 243 23
Subject to
3 1+ 12 132 + 27 13 + 48 14 + 4 21 + 16 22 + 36 23 36
10 + 11 + 12 + 13 + 14 = 1
20 + 21 + 48 22 + 243 23 = 1
10 + 11, ………………. 23 0
with not more than two of ‟s and those two necessarily adjacent, being non zero.
Basis Values 10 11 12 13 14 20 21 22 23 S
S 36 0 3 12 27 48 0 4 16 36 1
10 1 1 1 1 1 1 0 0 0 0 0
20 1 0 0 0 0 0 1 1 1 1 0
-f 4 0 -2 -4 -6 -8 0 -3 -48 -243 0
S 0 0 3 12 27 48 -36 -32 -20 0 1
10 1 1 1 1 1 1 0 0 0 0 0
23 1 0 0 0 0 0 1 1 1 1 0
-f 247 0 -2 -4 -6 -8 243 240 195 0 0
11 0 0 1 4 9 16 -12 -32/3 -20/3 0 1/3
10 1 1 0 -3 -8 -15 12 32/3 20/3 0 -1/3
23 1 0 0 0 0 0 1 1 1 1 1
-f 247 0 0 4 12 24 219 656/3 545/3 0 2/3
The optimal solution is 10 = 1, 23 = 1 and all other variables being zero , f = 247. In
terms of the original variables x1 = 0 , x2 = 3 , Max f = 247.
*******************
7.1 introduction
The method is based on the inequality in algebra namely that the arithmetic mean is greater
than or equal to the geometric mean.
m
1 i vi
Ui
i 1/
i 1
(A1)
m
where = i , i are called weight functions
i 1
i
Putting = i , we get
m m
i vi vi i
i 1 i 1
i
Now = i
School of Distance Education, University of Calicut
i /
n m u
ui i
i 1 i 1 i
m
u
i
or ( ui ) i , i = (A3)
i 1 i
ui
It may be noted that the inequality (A2) becomes an equality when are equal. Similarly
i
(A3) is an equality if ui/ i are equal.
1 2 3 4
C1 C 2 x 2 x3 C3 x1 x3 C4 x1 x2
ie f(X)
x1 x2 x31 2 3 4
1 2 3 4
C C2 C3 C4
= 1 x1 1 3 4 x21 2 4 x3 1 2 3
1 2 3 4
i‟s are such that i 0 , i = 1
In order to make the RHS of the above expression independent of X we take
- 1 + 3 + 4 = 0
- 1 + 2 + 4 = 0
- 1 + 2 + 3 = 0
1 2 3 4
C C2 C3 C4
and ( ) = 1
1 2 3 4
Since equality in (5) is possible
Min Max
f (X ) = ( )
X
Thus the original problem of minimizing f(X) has been converted into a new problem of
maximizing ( ) . In the present problem 1 , 2 , 3 , 4 are uniquely solved and so ( )
is a constant.
Min
Hence f ( X ) = ( ) ,
X
which can be easily evaluated for given numerical values of C1 , C2 , C3 and C4.
To find the optimum values of xi we now proceed as below. Min f(X) is attained when
u1 u2 u3 u4
= = = = M (say)
1 2 3 4
Then ui = M i =M
Min
f ( X ) = f(X0) = M
X
ui = i f(X0)
Define Zj = log xj , j = 1, 2, 3 , then
C1
u1 =
x1 x2 x3
u1
log = -log x1 – log x2 – log x3
C1
u1
-Z1 – Z2 – Z3 = log
C1
u2
Similarly Z2 + Z3 = log
C2
u1 1 u2 2
f(X) = u1 + u2 1 2 (A6)
1 2 = 1
Using non normalized weights 3 & 4
u z3 u4 z4
1 = (u3 + u4) 3 (A7)
3 4
where = 3 4
Using (6) and (7)
u 1 u2 2 u 3 z3 u4 z4
u1 + u2 1
1 2 3 4
u3 + u4 = 1
C1 2 1
= ( ) , C2 x2x3 = ( )
x1 x2 x3 3 3
1
C3x1x3 = , C4x1x2 = ½
2
Now put Zj = log xj , j = 1, 2, 3
2
Then log C1 – Z1 – Z2 – Z3 = log ( )
3
1
log C2 + Z2 + Z3 = log ( )
3
log C3 + Z1 + Z3 = log ½
log C4 + Z1 + Z2 = log ½
solving the above equations yields the solutions for Z1 , Z3 which in terms gives value for x1 ,
x2 and x3.
7.2 General Method
The general form of G P problem is as follows.
Minimize f0(X) ,
Subject to fk(X) 1 , k = 1, 2, … p
where fk(X) , k = 1, 2, … p are posynomials of the type
nk
fk(X) = uik ( X )
i mk
n
xj
a jik
where uik (X) = Cik (B1)
j 1
nk
and i k = k , k = 1, 2, ………… p
i mk
Using (B1)
nk n
p ci k i k k
f0(X) = xj a (k ) ik jik
k 0 i mk i k
j 1
p nk u i k i k k
= ( k ) p nk aik jik
k 0i m k i k
k 0 i m
p nk
We know now choose aik such that ik jik 0, j 1, 2,...,n (B2)
k 0 i m
These are called orthogonality conditions for the obvious reason that they represent.
Orthogonal relationship between the vector whose components are i k , and each of the
We thus arrive at a dual of the original problem. The dual problem consists of finding
maximum value of ( ) subject to
n0
i k > 0 , i 0 = 1 = 0
i 1
nk
i k = k , k = 1, 2, …, p
i mk
If the primal GP problem is feasible and there is at least one vector X > 0 such that
fk(X) < 1, k = 1, 2, …, p , then
(i) the corresponding dual problem is feasible.
(ii) There exists X0 and 0 such that
f0(X0) = ( 0 ) (B3)
which is the solution of the problem.
(iii) The optimal primal and optimal dual variables are related by
i 0 = ui 0/f0, i = 1, 2, ……..n0 (B4)
i k = k ui k , i = mk ……nk , k = 1, 2, … p (B5)
k (1 – fk) = 0 , k = 1, 2, … p (B6)
In the above equations all the variables and functions assume their optimal values.
The optimal value of the primal objective function is given by (B3) we then determine
optimal values of uik from (B4) and (B5). Taking the logarithm of each of the equations in
n
xj
a jik
uik(X) =
j 1
We get linear equations in log xj which can be solved to give optimal values of log xj and are
finally xj. This completes the solution of the problem.
*******************
8.1 Introduction
The method of dynamic programming (DP) was developed in 1950‟s through the work
of Richard Bellman. The essential feature of the method is that a multivariate optimization
problem is decomposed in to a series of stages, optimization being done at each stage with
respect to one variable only. Both discrete and continuous problems can be handled with this
method, also deterministic as well as stochastic models can be tackled.
Suppose there is a system which is initially in a state described by a vector XN, and as
a result of certain decisions denoted by the vector U, finally assumes the state X0.
Diagrammatically we may denote the system as in figure below. The box represents the
transformation TN which functionally may be written as
X0 = TN(XN, U) (1)
XN TN X0
N
We may regard XN as the input X0 as the output. Associated with this transformation, suppose
there is a real valued function
N(XN, U) (2)
called the objective function or return function.
The problem is to determine U for a given input XN so that N is minimum subject to the
constraint (1). Notice that with XN and X0 specified, the transformation (1) is actually a
constraint on U.
Let us suppose that in an abstract sense the problem can be decomposed into a number
of stages j , j = 1, 2, … N , with Xj representing the input let the jth stage. The system is
School of Distance Education, University of Calicut
imagined to pass through a succession of intermediate stages XN-1 , XN-2, … X2, X1 before it
reaches the final state X0 from the initial state XN. Each state Xj-1 is a function of the input
state Xj and the decision Uj so that
The situation may be represented by the figure just given below. This is the model of a serial
multistage problem.
UN Uj
XN tN tj TN
XN-1 Xj Xj-1 X1 X0
fN fj fi
The dynamic method postulates that under certain conditions the problem of determining the
optimal U (= U*) which would minimize N(XN , U) subject to X0 = TN(XN , U) can be
reduced to a serial multistage problem of determining sequentially the optimal decisions Uj* ,
j = 1, 2, … N, which minimizes N( fN , fN – 1, … f1). If N is of the form
min
= [fN o FN-1(XN –1)] (9)
UN
min imum
where FN –1(XN-1) = N -1(XN -1 , UN - 1 , … U1) (10)
U N 1 , ....... U 2 , U1
Property (7) of the return function (6) is called separability. Due to separability on successive
stages we may postulate the recursive equation
min
Fj(Xj) = [fj o Fj-1(Xj –1)], j = 2, 3, … N (11)
Uj
min
With F1(X1) = f1 (12)
U1
subject to Xj-1 = tj (Xj , Uj) , j = 2, 3, … N (13)
which may enable us to solve the problem recursively.
Equation (11), (12) and (13) constitute the recursive procedure involving Bellman‟s
principle of optimality. The principle is : In a multistage system with out feedback (that is, in
which subsequent decisions do not influence the outcomes of the earlier decision), whatever
the earlier status and decisions be, the subsequent decisions must form an optimal policy with
respect to current state which has arisen from earlier decisions.
Example:
x3 = u1 + u2 + u3 10 , x2 = u1 + u2 = x3 – u3
x1 = u1 = x2 - u2
and F3(x3) =
min
u3
u 2
3
F2 x 2 , F2 x 2
min 2
u2
u 2 F1 x1
Now F1(x1) = u12 = (x2 – u2)2
min
F2(x2) = (u22 + (x2 – u2)2)
u2
min ( x3 u3 ) 2
2
= (u3 + )
u3 2
The above function is minimum when
2u3 – (x3 – u3) = 0 u3 = x3/3
10
with u3 = 10/3 , x2 = x3 – u3 = 10 - = 20/3
3
20
u2 = x2/2 = / 2 = 10/3
3
Finally u1 = x2 – u2
20 10
= - = 10/3
3 3
Thus u1 = u2 = u3 = 10/3
Example: 2
x2
x3 = u1 u2 u3 6 , x2 = x3/u3 = u1u2 , x1 = = u1
u2
uj 1 2 3 4 5 6
fj(uj) 1 4 9 16 25 36
State transformations xj – 1 , j = 2, 3
uj 1 2 3 4 5 6
xj
1 1 - - - - -
2 2 1 - - - -
3 3 0 1 - - -
4 4 2 - 1 - -
5 5 - - - 1 -
6 6 3 2 - - 1
x1 1 2 3 4 5 6
f1(x1) 1 4 9 16 25 36
min
F2(x2) = [f2(u2) + F1(x2/u2)]
u2
min 2 x2
2
= u
u2 2 u2
min 2 x3
2
F3(u3) = u
u3 3 u3
Answer is 38 with u3 = 1 , u2 = 1 , u1 = 6
Example: 3
A student has to take examination in three courses A, B, C. He has three days available
for study. He feels it would be best to devote a whole day to the study of some course, so that
he may study a course for one day, two days or three days or not at all. His estimates of the
grades he may get by study are as follows.
Course A B C
Study
days
0 0 1 0
1 1 1 1
2 1 3 3
3 3 4 3
subject to u1 + u2 + u3 3
x3 = u1 + u2 + u3 3
x2 = u1 + u2 x3- u3
x1 = u1 = x2 - u2
max
Fj(Xj) = [fj(uj) + Fj-1(xj –1)] , j = 2, 3
Uj
F1(x1) = f1(u1)
max
where F3(x3) = [f1(u1) + f2(u2) + f3(u3)]
u1 , u2 , u3
max
for any feasible x3. The required solution would be F(x3). Essential computational details
x3
are expressed below.
So far we are using a recursive procedure in which x j is regarded as input as xj-1 as the
output for the jth stage, the stage returns are expressed as functions of the stage inputs, and
recursive analysis proceeds from stage 1 to stage N. This procedure is called backward
recursion because of the state transformation function being of the state transformation
function being of the type Xj-1 = tj(Xj , Uj). Backward recursion is convenient when the
problem involves optimization with respect to a given input XN, because then the output X0 is
very naturally left out of consideration.
If however, the problem is to optimize the system with respect to a given out put X0, it
would be convenient to reverse the direction, regard Xj as a function of Xj-1 and Uj and put
Xj = tj (Xj-1 , Uj) , j = 1, 2, … N, and also stage returns as functions of stage outputs and then
proceed from stage N to stage 1. This procedure is called forward recursion.
Example:
x3 = u1 + u2 + u3 , x2 = x3 – u3 = u1 + u2 , x1 = x2 – u2 = u1
Max
Also F3(x3) [u3 F2(x2)]
u3
Max
F2(x2) [u2 F1(x1)]
u2
Max
F1(x1) u1 = x2- u2
u1
Max
F2(x2) [u2 (x2 – u2)]
u2
2
x
By calculus u2 = x2/2 , F2(x2) = 2
2
x u 2
= Max u3 3 3
4
x3 u3 5 5 / 3
Again by calculus u3 = x3/3 = 5/3 u2 = = = 5/3 , u1 = x2 – u2 = 5/3
2 2
Max u1 u2 u3 = 125/3
*******************
9.1 Introduction
Game is defined as an actively between two or more persons involving moves by each
person according to a set of rules, at the end of which each person receives some benefit or
satisfaction or suffers loss. In many activities like trade and commerce, battles and wars,
various types of games present situations in which different parties compete to achieve their
own objective and present others from achieving theirs. Mathematical model of such
situations and their solutions form the subject matter of the theory of games.
(i) Chance or strategy: In a game if the moves are determined by chance, it is called a
game of chance, if they are determined by skill, it is called a game of strategy.
(ii) Number of persons: A game is called n-person game if the number of persons
playing it is n. (The person means, an individual or a group aiming at a particular objective).
(iv) Pay off: A quantitative measure of the satisfaction of a person gets at the end of the play
is called a pay-off. It is a real valued function of the variables in the game. Let pi be the pay
n
off to the person i, i = 1, 2, … n, in an n-person game. Then if pi = 0 , the game is said to
i 1
Strategy:
A strategy of a player has been loosely defined as a rule for decision making in
advance of all the players by which he decides, the activities he should adopt. ie., strategy for
a given player is a set of rules, that specifies which of the available sources of action, he
should make at each play. This strategy may be of two types.
School of Distance Education, University of Calicut
(i) Pure strategy: If a player knows exactly what the other player is going to do, then the
pure strategy is a decision rule to select a particular course of action.
ii) Mixed strategy: If a player is guessing as to which activity is to be selected by the other
on any particular occasion, a probabilistic situation is obtained and objective function is to
maximize the expected gain. Thus the mixed strategy is a selection among pure strategies with
fixed probability.
A game with only two players P1 and P2 is called a two person zero sum game, if the
losses of one player are equivalent to the gain of the other. So that the sum of their net gain is
zero.
A matrix game is a zero –sum two person game which can be represented in a
rectangular matrix form.
Pay-off Matrix
Suppose that in a two person zero sum game, the player P1 has 'm' activities and the
player P2 has 'n' activities to perform. Then a mxn matrix A = [aij] of pay off to P1 can be
found by adopting the following rules
Consider the coin matching game involving two players A and B only. Each player selects
either a head H or a tail T. If outcomes match, A wins Re. 1 from B other wise B wins Re. 1
from A. Then the pay off matrix is as follows,
Player B
H T
H 1 1
Player A 1
T 1
A saddle point of a pay off matrix of player A is a position of such an element in the
pay off matrix which is minimum in its row and maximum in its column. That is if a pay off
matrix [aij] is such that,
Then the matrix is said to have a saddle point ars, and ars is called the value of the game. Best
strategy for the player A is 'r' and that of B is 's'.
Some theorems:
Let f(X, Y) be a real valued function of two vectors X and Y , X En , Y Em. The
minimum value of f(X, Y) with respect to Y, keeping X fixed is denoted as
Min
(X) = f(X, Y)
Y
The maximum value of (X ) for some value of X, is
Max Max Min
(X ) = f(X, Y)
X X Y
Min Max
Similarly we can explain the expression f (X, Y) also.
Y X
Theorem: 1
Max Min Min Max
Let f(X, Y) be such that both f(X, Y) and f(X, Y) exist. Then
X Y Y X
Max Min Min Max
f(X, Y) f(X, Y)
X Y Y X
Proof:-
Let X0 and Y0 be some arbitrary points in En and Em respectively, then
Min
f(X0, Y) f(X0 , Y0)
Y
Max
and f(X, Y0) f(X0 , Y0)
X
Min Max
Hence f(X0, Y) f(X, Y0)
Y X
Also since X0 is any point in En, the inequality will hold even if we choose that X0 which
Min
makes f(X, Y) maximum.
Y
Theorem: 2
Proof:-
A point (X0, Y0) , X0 En , Y0 Em is said to be a saddle point of f(X, Y) if
Necessary part
Max
f(X, Y0) f(X0 , Y0)
X
strategies for players P1 and P2 respectively, then the mathematical expectation of the pay off
function E(X , Y) in the game whose pay off matrix A = [aij] is defined as
m n
E(X, Y) = xi aij y j = X'AY ;aij is the pay off to P1, when P1 play ith and P2
i 1 j 1
A H 2 -1 -1
-1
T -1 0 -1
Max 2 0
Min Max 2
is E(A, H) = 2x + (-1) (1 – x) = 3x – 1
is E(A, T) = -1 x + 0 (1 – x) = -x
3x – 1 = -x x = ¼
best strategy of a is 14 , 3 4
Then the value of the game = -¼
Theorem:
QiY 0 for all i, or (ii) there exists an X in Sm such that X' Pj > 0 for all j.
Where Sm is the set of ordered m-tuples of non negative numbers whose sum is unity.
Proof:-
Let i Sm be a vector such that its ith element is unity and all other components are
zero.
(i) Let O be in C.
[ 1, 2, … m , 1, 2, … n] Sn + m
m n
such that i i + j Pj =O ; 0 i 1, 0 j 1
i 1 j 1
n
or i + j aij = 0 ; i = 1, 2, … m
j 1
n
since i 0 , j aij 0 ; i = 1, 2, … m
j 1
n
also j >0
j 1
n
j =0 is not possible, if it is so , each j values should be equal to zero, then for
j 1
n
i + j aij = 0 is to be true, each i should be zero. Which is contradictory to the
j 1
n n
then dividing the inequality j aij 0 i = 1, 2, …, m by j
j 1 j 1
μj 1
j aij
n
0
μ
j 1
j
n j
y j aij 0 , where yj = n
, yj = 1 , 0 < yj < 1
j 1
j
j 1
Y = (y1 , y2 , … yn)T
Then by the theorem on separating hyper planes, there exists a hyper plane containing
O , say BZ = 0 such that C is contained in the half space BZ > 0. In particular, since i C,
i = 1, 2, … m
bi > 0 , i = 1, 2, …, m
m
and therefore bi aij >0
i 1
m
bi aij >0
i 1
m
xi bi
Dividing the inequality by bi and putting m
,
i 1
b
i 1
i
m
xi aij >0 , xi = 1 , 0 < xi < 1
i 1
X' Pj > 0 , j = 1, 2, …, n
Proof:-
E(X, Y) is a continuous linear function of X defined over the closed and bounded
max
subset Sm of Em for each Y in Sn. Therefore E(X, Y) exists and is a continuous function
X
min max
of Y. Since Sn is also closed and bounded, E(X, Y) exists. Similarly existence of
Y X
max min
E(X, Y) also can be proved.
X Y
For a pay off matrix A, we have either, (1) there exists a Y in Sn such that QiY 1, 2, … m or
(ii) X in Sm such that X'Pj > 0 j = 1, 2, …, m. X and Y satisfies the conditions of a mixed
strategy also.
m
Let (ii) hold. Ie xi aij > 0 (1)
i 1
n m
xi aij y j > 0 for all Y
j 1 i 1
min
Hence E(X, Y) > 0
Y
m n
xi aij y j 0 X
i 1 j 1
ie E(X, Y) 0 X
Operations Research 163
School of Distance Education, University of Calicut
max
E(X, Y) 0
X
min max
E(X, Y) 0 (3)
Y X
At least one of the inequalities (2) or (3) must true.
m n
Then Ek(X, Y) = xi (aij k )y j
i 1 j 1
m n m n
= xi aij y j -k xi y j
i 1 j 1 i 1 j 1
max min n
then
i
E ( i , Y0 ) = E(X0 , Y0) =
j
E(X0 , j ) , where E ( i , Y) = aij y j and E(X,
j 1
m
j) = xi ai j
i 1
P1
1 2 3 4
1 19 15 17 16
P2
2 0 20 15 5
20 20
E(x) = 20-5x
19
E(x) = 12+2x
17
16
15 C D 15
B
E(x) = 5+11x
10 10
5 5
E(x) = 19x
4 4
3 3
2 2
1 1
0 1 x
-5 -5
The four lines represents the flow expected pay off to P1 and the continuous piece wise linear
curve O B C D gives the least expectation for any value of x , 0 x 1.
P1 must choose x so as maximizing his least expectation. C is the point where the least
expectation is maximum at C, the value of x, by solving the line joinings can be get as 15/16.
245
and hence value of the game = 19 x 15/16 = .
16
To find the optimal strategy of P2, consider Y = (y1 , y2 , y3 , y4) denotes the mixed strategy of
P2.
245
We have E(X0 , Y0) = xi aij y j = 16
i j
40 25
y1 + y3 = 0
16 16
y1 = 0 , y3 = 0 ( y1 0 , y3 0)
Hence Y = [0 y2 0 y4]
= ( 0 , y2 , 0, 1 - y2)
the figure is
20
E(Y) = 16 – y2 B
C
16 15
15
10 10
E(Y)=5+15Y2
5 5
A
0 1 y2
The curve A BC represents the maximum pay off to P1 for any value of y2. So P2 must choose
y2 so as to minimize this pay off. This is at the point B,
Note:-
For an m x 2 game, the optimal strategy of P2 is found first and then using the value of the
game, the optimal strategy of P1 also obtained.
9.7 Dominance
In some cases it is possible to reduce the size of the pay off matrix by using the
dominance property. This occurs when one or more of the pure strategies of either player can
be deleted because, they are inferior to at least one of the remaining strategies and hence it is
never used. In this case, deleted strategies are dominated by superior one‟s.
Rule I: If each element in one row (say r) of the pay off matrix arj less than or equal to
the corresponding elements in other row (say s). then player I will never choose rth strategy,
that is for all j = 1, 2, … n , arj asj, then probability of choosing rth strategy is zero. So rth
row of the matrix can be deleted.
Rule II: If each element in one column (say p) is greater than or equal to the
corresponding element in the other column (say q), then the player P2, will never choose the
strategy corresponding to column p. In this case the column p is dominated to column q and
can be deleted.
Rule III: Dominance need not be based on the superiority of pure strategy only. A given
strategy can be dominated if it is inferior to an average of two or more other pure strategies.
In general some convex linear combinations of some rows dominates the ith row, then
ith row will be deleted. If the ith row dominates the convex linear combination of some other
rows then one of the rows involving in the combination may be deleted. Similar arguments
follow for columns also.
Let the mxn matrix A = [aij] be the pay off matrix of a game with value v, where v is
any real number.
It is to keep all elements aij of the matrix A as positive. For this if necessary add a
constant k (> 0) to every terms of the matrix A, so as to keep all aij‟s are positive. Then the
value of the game associated to the new matrix v also be positive.
Let us assume that if necessary, after this transformation, the matrix of the game is A =
[aij] where aij > 0 for all i and j, and the value of the game is v > 0.
Let X0 = (x1 , x2 , … xm) and Y0 = (y1, y2, … yn) be optimal strategies of P1 and P2
respectively.
m
Or ai j xi v , j = 1, 2, … n (1)
i 1
m
subject to x =1
i 1
i (2)
and xi 0 , i = 1, 2, … m (3)
dividing (1) , (2) and (3) by v,
we get,
a x i 1 ; j = 1, 2, … n
'
ij
i 1
m
1
x ; xi ' 0
'
subject to i
i 1 v
xi
where xi ' =
v
a xi 1 ; j = 1, 2, … n
'
subject to ij
i 1
xi ' 0 ; i = 1, 2, … m
m
Min. f xi
i 1
m
Subject to a x
i 1
ij i
'
1 , j 1, 2,...m
xi 0 i 1, 2,..., m
That is
1
The value of the game is V
f min
xi = xi ' v, i = 1, 2, …, m
Similarly when we are start with the problem of P2, by taking the inequalities
And the LP formulation of player P2 can be derived as the dual of the L P Problem of player
P1.
*******************