Professional Documents
Culture Documents
a x { ,=, }b
j=1
ij j i (i= 1, 2,....,m) where for each constraint one and only one of the signs ,=,
holds. Now we wish to find the non-negative values of x j , j = 1, 2,………,n. which will satisfy
n
the constraints and maximize of minimize a linear function z = c x
j=1
j j . Here a ij , b i and c j
objective function no constant term will be appeared. i. e. we cannot write the objective
n
function of the type z = c x
j=1
j j +k
Page | 1
Suppose three types of machines A, B and C turns out four products 1, 2, 3, 4. The above table
shows (i) the hours required on each machine type to produce per unit of each product (ii) total
available machine hours per week, and (iii) per unit profit on sale of each of the product.
Suppose x j (j = 1, 2, 3, 4) is the no. of units of product j produced per week. So we have the
Since the amount of production cannot be negative so, x j 0 (j = 1, 2, 3, 4) . The weekly profit is
given by z= 5.24x1 +7.3x 2 +8.34x 3 +4.18x 4 . Now we wish to determine the values of the variables
x j ' s for which (i), (ii), (iii) and (iv) will be satisfied and (v) will be maximized
x ij the amount of product shipped from the ith warehouse to the jth retail store.
a i = total no. of units of the products available for shipment at the ith (i= 1,
2,………m)warehouse.
b j = the no. of units of the product required at the jth retail store.
Since we cannot supply more than the available amount of the product from ith warehouse to
the different retail stores, therefore we have
x i1 +x i2 +............+x in a i i= 1, 2,……..,m
We must supply at each retail store with the no. of units desired, therefore
The total amount received at any retail store is the sum over the amounts received from each
warehouse. The needs of the retail stores can be satisfied
m n
a i b j
i=1 j=1
Page | 2
Let us define c ij is the per unit cost of shifting from ith warehouse to the jth retial store, then
x i1 +x i2 +............+x in a i
x1j +x 2j +.............+x mj =b j
a ij = the quantity (mg) of ith nutrient per (oz) of the jith food
The total amount of ith nutrient contained in all the purchased foods cannot be less than the
minimum daily requirements
Therefore we have
n
a i1x1 +a i2 x 2 +............+a in x n = a ij x j bi
j=1
xj 0
Page | 3
Feasible Solution:
n
Any set of values of the variables x j which satisfies the constraints a x {, , b
j=1
ij j i , where
a ij and bi are constant is called a solution to the linear programming problem and any
In other words, any feasible solution which satisfies the following conditions;
n
(i) a x {, , b
j=1
ij j i
(ii) x j 0
n
(iii) optimize objective function z = c jx j , is called a optimal feasible solution.
j=1
Page | 4
Next we consider the effect of the inequality. All the inequality does is to divide the (x1 , x 2 )
-plane into two spaces that occur on both sides of the plotted line: one side satisfies the
inequality and the other one dies not. Any point lying on or below the line satisfies the
inequality. A procedure to determine the feasible side is to use the origin (0, 0) as a reference
point.
Step 2: At the second step we have to determine the optimal solution.
Problem: Find the non-negative value of the variables
x1 and x 2 which satisfies the constraints
3x1 +5x 2 15
5x1 +2x 2 10
And which maximize the objective function z = 5x1 +3x 2
Solution: We introduce an x1x 2 co-ordinate system. Any point lying in the first quadrant has
x1 ,x 2 0 . Now we show the straight lines 3x1 +5x 2 =15 and 5x1 +2x 2 =10 on the graph. Any
point lying on or below the line 3x1 +5x 2 =15 satisfies the 3x1 +5x 2 15 . Similarly any point
lying on or below the line 5x1 +2x 2 =10 satisfies the constraint 5x1 +2x 2 10
B(0,3)
A(1.053, 2.368)
3x1 +5x 2 =15
O C (5,0)
z = 5x1 +3x 2
So, the region ABOC containing the set of points satisfying both the constraints and the non
negative
restriction. So, the points in this region are the feasible solution. Now we wish to find the line
with the largest value of z = 5x1 +3x 2 which has at least one point in common with the region
of feasible solution. The line is drawn in the graph above. It shows that the value of x 1 and x 2
at the point A are the required solution.
Here x1 =1.053 and x 2 2.368 approximate.
Now from the objective function we get the maximum value of z which is given by
z = 5 1.053+3 2.368=12.37
Page | 5
Algebraic Method: In LP problems, generally the constraints are not all equations. Since
equations are easy to handle as compared to inequalities, a simple conversion is needed to
make the inequalities into equality. Let us consider first, the constraints having less than or
equal signs ( ). Any constraint of this category can be written as
a h1x1 +a h2 x 2 +..............+a hn x n b h (1)
Let us introduce a new variable x n+h which satisfies that x n+h 0 where
n
x n+h b h a hjx j 0 , to convert the inequalities to the equality such that
j=1
Page | 6
Subject to the condition
Ax = a h1x1 +a h2 x 2 +..............+a hn x n a hn+1x n+1 ........... a hm x m bh (4)
We claim that optimizing (3) subject to (4) with x j 0 is completely equivalent to optimizing
To prove this, we first note that if we have any feasible solution to the original constraints,
then our method of introducing slack or surplus variables will yield a set of non-negative slack
or surplus variables such that equation (4) is satisfied with all variables non-negative
consequently if we have a feasible solution to (4) with all variables non-negative, then its first
n components will yield a feasible solution to (2) .Thus there exist one –to-one correspondence
between the feasible solutions to the original set of constraints and the feasible solution to the
set of simultaneous linear equations. Now if
X* = (x1* x *2 ,........,x *m ) 0 is a feasible optimal solution to linear programming P2 then the first n
components of X* that is (x1* x *2 ,........,x *n ) is an optimal solution by annexing the slack and
= m and let X=(x1 , x 2 ,......,x n ) be as feasible solution. Further suppose that x1 , x 2 ,......,x p >0 and
that x p+1 , x P+2 ,......,x n =0 . And let a1 , a 2 ,......,a p be the respective columns of A corresponding to
the variables x1 , x 2 ,......,x p . If a1 , a 2 ,......,a p are linearly independent then X is a basic feasible
solution. in such case p m . If p=m from the theory of system of linear equation, the solution
is non-degeneracy basic feasible solution.
If p<m, the system have a degenerate basic feasible solution with (m-p) of the basic variables
are equal to zero.
If a1 , a 2 ,......,a p are dependent then there exist scalars 1 , 2 ,......, p with at least one positive
Page | 7
p
j such that a
j 1
j j 0
x j 0 j ; j 1,2,...., p
xj =
0; j p 1, p 2,.....n
x x
where o = Minimum j ; j 0 = k >0
j=1,2,....,p
j k
If j 0 , then xj >0 , since both x j and 0 are positive. If j 0 , then by the definition of 0
xj
we have o x j 0 j . Thus xj >0
j
Furthermore
xk
xk = x k - 0k =x k - k =0 . Hence x has at most (p-1) positive components.
k
Also,
n
Ax= a jxj
j=1
n
= a (x
j=1
j j 0 j )
n n
= a jx j 0 a j j
j=1 j=1
=b
Thus we have a constructed feasible solution x since Ax=b , x 0 with at most (p-1)
positive components. If the columns of A corresponding to these positive components are
linearly independent then x is basic feasible solution. Otherwise the process is repeated.
Eventually a basic feasible solution (BFS) will be obtained.
Example: Consider the following inequalities
x1 +x 2 6
x2 3
x1 , x 2 0
Find basic solution, BFS and extreme points.
Solution. By introducing slack variables x 3 and x 4 , the problem is put into the following
standard format
x1 +x 2 x 3 =6
x 2 x 4 =3
x1 , x 2 , x 3 ,x 4 0
So, the constraint matrix A is given by;
1 1 1 0 6
A= = (a1 , a 2 , a 3 , a 4 ) , b= Rank(A) = 2
0 1 0 1 3
Page | 8
Therefore, the basic solutions corresponding to finding a 2 2 basis B. Following are the
possible ways of extracting B out of A
1 1 -1 1 -1 1 -1 6 3 x3 0
(i) B=(a1, a 2 ) = , B = , x B =B b=
-1
= , x n = x = 0
0 1 0 1 0 1 3 3 4
1 1
(ii) B=(a1 , a 3 )= , Since |B|=0, it is not possible to find B and hence x B
-1
0 0
1 0 -1 1 0 x1 -1 1 0 6 6 x2 0
(iii) B=(a1, a 4 )= ; B = x B = =B b= = x n = =
0 1 0 1 x4 0 1 3 3 x3 0
1 1 -1 0 1 x 2 -1 0 1 6 3 x1 0
(iv) B=(a 2 , a 3 )= B = x B = x =B b= 1 1 3 = 3 x n = x = 0
1 0 1 1 3 4
1 0 -1 1 0 x 2 -1 1 0 6 6 x1 0
(v) B=(a 2 , a 4 )= ; B = ; x B = =B b= = x n = =
1 1 -1 1 x4 -1 1 3 -3 x3 0
1 0 -1 1 0 x 3 -1 1 0 6 6 x1 0
(vi) B=(a 3 , a 4 )= ; B = ; x B = x =B b= 0 1 3 = 3 x n = x = 0
0 1 0 1 4 2
Page | 9
a11x1 +a12 x 2 +.........+a1n x n ( ,=, )b1
a 21x1 +a 22 x 2 +.........+a 2n x n ( ,=, )b 2
x j 0; j = 1, 2,.......,n
The above formulation can be written as the following compact form by using the summation
sign;
n
Optimize (maximize or minimize) z = c x
j=1
j j
and x j 0; j = 1, 2,.......,n
The constants c j ; j =1, 2,......,n are called the cost coefficients; the constants bi ; i =1, 2,.......,m
are called stipulations and the constants a ij ; i =1, 2,.....,m; j=1,2,.....,n are called structural
x1 b1
x2 a11 a12 ...... a1n b2
. .
a 21 a22 ...... a2n
C= c1 c2 ... ... cn 1n ; X= . ; A= . . . . ; B= .
. .
. . . .
a
. m1 am2 ...... amn m n .
x b
n n 1 m m n
Where, A is called the coefficient matrix, X is called the decision vector, B is called the
requirement vector and C is called the cost vector of linear programming problem
The Standard Form of LP Problem
The use of basic solutions to solve the general LP models requires putting the problem in
standard form. The followings are the characteristics of the standard form
(i) All the constraints are expressed in the form of equations except the non-negative
restrictions on the decision variables which remain inequalities
(ii) The right hand side of each constraint equation is non-negative
Page | 10
(iii) All the decision variables are non-negative
(iv) The objective function may be of the maximization or the minimization type
Conversion of Inequalities into Equations:
The inequality constraint of the type ,( ) can be converted to an equation by adding or
subtracting a variable from the left-hand sides of such constraints. These new variables are
called the slack variables or simply slacks. They are added if the constraints are of the
types and subtracted if the constraints are of the types. Since in the cases of type the
subtracted variables represent the surplus of the left -hand side over right-hand side, it is
commonly known as the surplus variables and is in fact a negative slack.
For example
x1 +x 2 b1
Is equivalent to
x1 +x 2 s1 = b1
If x1 +x 2 b 2
Is equivalent to
x1 +x 2 s1 =b 2
The general LP problem that discussed above can be expressed as the following standard form;
n
z= c x
j=1
j j
a x
j=1
ij j si =bi ;i=1, 2,.......,m
x j 0; j = 1, 2,.......,n
And
si 0; i = 1, 2,.....,m
In the matrix notation, the general LP problem can be written as the following standard form;
Optimize z = CX
Subject to the conditions
AX S = B
X0
S0
Example: Express the following LP problem in a standard form;
Maximize z= 3x1 +2x 2
Subject to the conditions;
2x1 +x 2 2
3x1 +4x 2 12
x1 ,x 2 0
Solution: Introducing slack and surplus variables, the problem can be expressed as the
standard form and is given below;
Maximize z= 3x1 +2x 2
Subject to the conditions;
Page | 11
2x1 +x 2 s1 =2
3x1 +4x 2 s2 =12
x1 ,x 2 , s1 , s2 0
Conversion of Unrestricted Variable into Non-negative Variables
For example, if x j = -10 , then x +j =0, and x-j = 10 . If x j = 10 , then x +j =10, and x-j = 0 .
The substitution is effected in all constraints and in the objective function. After solving the
problem in terms of x +j and x-j , the value of the original variable x j is then determined
express as, x 3 = x 3+ -x 3- where, x 3+ 0 and x 3- 0 . Now introducing slack and surplus variable the
Page | 12