Linaer Programming Noted
Linaer Programming Noted
LINEAR PROGRAMMING
Linear programming is a tool or technique by which one can select the optimal solution
of problems like distribution of commodities, allocation of machines, scheduling
transport services, scheduling production, --- etc. In linear programming models the
objective function and all the constraints are polynomials of degree one. - that is why the
name linear.
The constraints define the situations under which the objective function should be
maximized or minimized. It answers questions like: how much money, time, resources,
technical capacity, etc. are available to maximize or minimize the objective function?
1
How big or narrow is the market demand? All the relevant constraints should be
formulated in linear form. A constraint may be of <, , , or > type.
a 11 X 1 + a 12 X 2 + a 13 X 3 + … +a 1n X n (<, , , , >) b 1
Constraints
a 21 X 1 + a 22 X 2 + a 23 X 2 + … +a 2n X n (<, , , , >) b 2
a m1 X 1 + a m 2 X 2 + a m 3 X 3 + … +a mn X n (<, ) b n
The coefficients a 11, a 12... a mn are called technical coefficients of X i and measure the
contribution of each X i to the constraint.
The matrix
a11 a12 a13 a1n
A = a21 a22 a23 a2n
Note that some of the constraints may be very difficult or even impossible to express in
mathematical formula. However, for better results, you should consider all the constraints
you face against your objective.
The non-negativity constraint is actually a principle, which prohibits that any of the
variables be negative.
Largely we use Ist quadrant where all the variables are greater than or equal to zero.
2
Y
II I quadrant
Quadrant most economic models
Operate in this quadrant
Where X and Y 0
X
III quadrant IV quadrant
Using negative numbers in economics may be misleading. For example, what does it
mean to produce –10 quintals of wheat? One cannot produce negative quantity. If it is
destruction, call it destruction rather than negative production. Likewise, you cannot pay
negative price. Therefore, in principle, the decision variables should not be negative. That
is why the non-negativity constraint becomes an integral part of the typical linear
programming problem. It is written as
Xi 0
Or X1, X2 ---- Xn 0
Note that under specific conditions, negative decision variables may be admissible. In
such cases, the non-negativity principle should be relaxed or totally ignored (
A set of variables X1, X2, X3, … Xn that satisfies all the constraints is called a feasible
point or a feasible vector.
vector. The set of all such points constitute the feasible area or the
feasible space.
space.
FORMULATION OF LINEAR PROGRAMMING PROBLEM (LPP)
Example 1)
1) A firm produces two types of commodities, A and B, using two types of
inputs, I1 and I2. Production of one A requires 12 units of I1 and 10 units of I2, and
production of one B require 7 units of I 1 and 15 units of I2. The daily supply of I1 to the
3
firm cannot exceed 84 units and that of I 2 150 units. Due to limited demand, the daily
production of A cannot exceed 6, however, there is no such limit with respect to the
demand for B. The manager wants to maximize the sum of the two commodities. How
many As and Bs should be produced in order to fulfill the manager’s objectives?
Solution: the above explanation into a table form.
Input Requirement Maximum
To Produce One Daily
A B Supply
Input 1 12 7 84
Input 2 10 15 150
Let X1 be the number of commodity A, and
X2 be the number of commodity B.
Graphic method
If the LPP consists of only two decision variables, then the problem can be solved using
the graphic method.
Example 1
1 : Maximize Z = 2X + 3Y
Subject to: 6X + 4Y 24
4X + 5Y 20
X, Y 0
In order to solve this LPP, we draw the graphs of the constraints.
Y If an optimal solution of an LPP exists,
6 6X + 4Y = 24 then the solution will be the coordinates
4 C The feasible area of the corners of the feasible area.
4X + 5Y = 20
4
0 A X
4 5
Any point in the feasible area satisfies the conditions, but the task is to identify the point
that maximizes the objective function. Checking each and every point in the feasible area
is both unimportant and impossible. Of course, the maximizing point cannot be inside the
feasible area since for every point inside the feasible area there is another point that will
improve the objective functions. Therefore, the solution should be at a corner. In the
above example, the solution should be either at O, A, B or C. Thus, we have to check
each of these points.
Corner X Y Z = 2X + 3Y
Points
0 0 0 2 (0) + 3 (0) = 0
A 4 0 2 (4) + 3 (0) = 8
B 20/7 12/7 2 (20/7) + 3 (12/7) = 76/7 = 10.86
C 0 4 2 (0) + 3 (4) = 12
Note: in order to find the coordinates of B, solve the two equations simultaneously
6X + 4Y = 24
4X + 5Y = 20
After solving this simultaneous equation, you will get X = 20/7 and Y = 12/7
The objective function Z is maximum at point C where X = 0 and Y = 4. Therefore, the
optimal solution is X = 0 and Y = 4, Maximum Z = 12
Example 2: Solve the LPP discussed in 3.3 above, using graphic method
Solution: The LPP is Maximize S = X1 + X2
Subject to: 12 X1 + 7 X2 84
10 X1 + 15 X2 150
X1 6
X1 X2 0
Then, plot the graph of the constraints
X2
12 12X1 + 7X2 = 84
10 D C X1 = 6
Feasible
Area 10 X1 + 15 X2 = 150
B
A
5
0 6 7 15
X1
Y
20
15 II
Feasible Area
10 D III
C
I
A B X
5 15 20
Corner X Y Z = 5X + 7Y
Points
A 5 0 25
B 15 0 75
C 12 4 88
D 2 9 73
6
Hence the optimal solution is at A where X = 5 and Y = 0. The optimal (minimum) Z
equals 25.
Note that if the object, was to maximize Z = 5X + 7Y, then the optimal solution would
have been at point C, where X = 12 and Y = 4, Max Z = 88.
As it is clear from the figure, the two constraints do not intersect and therefore, there is
no feasible point. Hence, the given LPP has no solution, consequently no optimal
solution.
Example 5.
5. The case of alternative optimal solutions
Maximize = 4X1 + 18X2
Subject to: 2X1 + 9X2 36
4X1 + 3X2 42
X1 , X2 0
X2
II
4 C
B
I
A
7
Corner points X1 X2
0 0 0 0
A 21/2 0 42
B 9 2 72
C 6 4 72
Both points B and C are optimal solutions. Actually, any point on line-segment is
optimal. Therefore, there are many alternative optimal solutions note that the objective
function and the first constraint are parallel.
III
1
Feasible area
I
¼ 1
The optimal area is unbounded and therefore the LPP has no finite solution. There are
solutions that fulfill the conditions; but not optimal (i.e. max. Z.) solution.
Note that if the objective was to minimize Z, the above LPP would have had a finite
solution.
8
Every linear programming problem has associated with it another LPP which is called the
dual of the original (or primal ) problem. If the objective function of the primal is
maximization, that of the dual will be minimization and vise-versa.
Primal Dual
Maximize Z = 3X1 + 4X2 Minimize C = 20Y1 + 24Y2
Subject to Subject to
5X1 + 2X2 20 5Y1 + 4Y2 3
4X1 + 6X2 24 2Y1 + 6Y2 4
X1, X2 0 Y1, Y2 0
Note that:
1. A maximization objective function is converted into a minimization objective
function, Z is replaced by C.
2. The decision variables are different; Xs are converted into Ys.
3. The less than or equal to () constraints are converted into greater than or equal to
() constraints.
4. The technical coefficient matrix is transposed, that is, the rows are converted into
columns and columns into rows. That is, 5 2 is transposed and become 5 4
4 6 2 6
5. The constant terms of the constraints and the coefficients of the objective function
are transposed. That is, 20 and 24 become coefficients of the objective function of
the dual while 3 and 4 become constant terms of the constraints of the dual.
Theorem: A primal has optimal solution if and only if its dual has optimal solution.
Maximum Z = Minimum C, where Z is the objective function of the primal
and C is the objective function of the dual.
It is always possible to give an economic interpretation to the dual problem. For example
if the primal is profit maximization, the dual may be cost minimization. If decision
variables of the primal represent quantity of output, the decision variables of the dual
represent the imputed values or shadow prices or opportunity costs of the inputs.
9
Example: Solve the primal and the dual LPP given above, using graphic method.
1. A Metallurgy Factory produces two types of auto spare parts X and Y. Net profit
from production of one X is 2 birr and of one Y is 3 birr. Each of the two
machines the factory owns works 8 hours a day and 6 days per week. A table
below shows the productivity of the machines in terms of time requirements. One
X requires 19m2 and one Y requires 7 m2 of space for storage and the total storage
10
area available is 133, 000 m2. Weekly production of X cannot exceed 6000 and
that of Y 9000 due to the limited market demand.
Time Needed to Produce One
Machine X Y
M1 20 Sec. 15 Sec.
M2 10 Sec. 18 Sec.
a. Write the linear Programming problem assuming that the manager wants
to maximize profit.
b. Write the dual LPP
2. A firm produces two types of outputs, X1 and X2 using two types of inputs
according to the table below. The management wants to maximize profit.
1. a) Maximize = 2X + 3Y
Subject to: 20X + 15Y 172,800 (M1 constraints in seconds)
10X + 18Y 172,800 (M2 constraints in seconds)
19X + 7Y 133,000 (space constraint)
X 6,000 (demand constraint)
Y 9,000 (demand constraint)
X, Y 0
b) Let the dual decision variables be ai
11
Subject to: 20a1 + 10a2 + 19a3 + a4 2
15a1 + 18a2 + 7a3 + a5 3
ai 0
2. a) Maximize = 3X1 + 2X2
Subject to: 2X1 + 3X2 12
2X1 + X2 8
X1, X2 0
4 C
B
0 4 6 X1
12
for “b” For the Dual LPP
2 C
3/2
B
A
2/3 3/2
Corner Y1 Y2 C = 12Y1 + 8Y2
points
A 3/2 0 18
B ¼ 5/4 13
C 0 2 16
13