Unit 4lpfinal BSC 012 Bl4
Unit 4lpfinal BSC 012 Bl4
LINEAR PROGRAMMING
Linear Programming
Structure
4.0
4.1
4.2
4.3
4.4
4.5
4.6
Introduction
Objectives
Linear Programming
Techniques of Solving Linear Programming Problem
Cost Minimisation
Answers to Check Your Progress
Summary
4.0
INTRODUCTION
Also since it is not possible for the company to produce negative number of
chairs and tables, we must have x 0 and y 0. The above problem can now be
written in the following format :
79
Maximise
P = 20x + 30y
subject to
3x + 3y 36
5x + 2 y 50
2 x + 6y 60
x 0, y 0
and
We now plot the region bounded by constraints in Fig. 1 The shaded region is
called the feasible region or the solution space as the coordinators of any point
lying in this region always satisfy the constraints. Students are encouraged to
verify this by taking points (2,2),(2,4) (4,2) which lies in the feasible region.
25
5x
y=
+2
50
12
(3,
9)
10
2x
+6
y=
3x
+
60
3y
=
10
36
12
30
Figure 1
We redraw the feasible region without shading to clarify another concept (see
Figure 2).
For any particular value of P, we can draw in the objective function as a straight
2
line with slope
This is because P = 20x + 30 y is a straight line, which
3
can be written as
y=
80
2
P
x
3
30
Linear Programming
A(0,10)
10
B(3,9)
Direction of
Increasing Profit
0(0,0)
10
Figure 2
81
4.1
OBJECTIVES
4.2
LINEAR
PROGRAMMING
Linear Programming
Definition
Convex Region
A region R in the coordinate plane is said to be convex if whenever we take two
points A and B in the region R, the segment joining A and B lies completely in
R.
The student may observe that a feasible region for a linear programming is a
convex region.
One of the properties of the convex region is that maximum and minimum values
of a function defined on convex regions occur at the corner points only. Since
all feasible regions are convex regions, maximum and minimum values of
optimal functions occur at the corner points of the feasible region.
The region of Figure 3 is convex but that of Figure 4 is not convex.
y
B
B
x
Figure 3 : Convex Region
x
Figure 4 : Not Convex
iso-cost
83
Solution
Let us denote 5x + 2y by P.
Note that 2x 3y 6 can be written as 2x + 3 y 6.
We can write the given LPP in the following format :
Maximise
P = 5x + 2y
subject to
2x + 3y 6
(I)
x 2y 2
(II)
6x + 4y 24
(III)
3x +2y 3
and
(IV)
x 0, y 0
= 94/7
84
Linear Programming
III
+
6x
4
y
=
2, 1
5/
4)
24
C
(3
/
I
2x
+3
y
/ 4)
,3
2
/
7
B(
IV
-3
x+
2y
II
-1
2
x-
y=
Figure 5
(I)
(II)
(III)
(IV)
(V)
(VI)
85
V
6
C(4/3,5)
5
4
3
A(9/2,1/2)
IV
-2
-1
V
III
II
Figure 6
A(9/2, 1/2)
Linear Programming
Solution
Let number of first class tickets sold be x and the number of economy class tickets
sold be y.
As the airline makes a profit of `400 on first calss and `300 on economy class,
the profit of the airlines is 400x + 300y
As the aeroplane can carry maximum of 200 passengers, we must have
x + y 200. As the airline reserves at least 20 tickets for the first class, x 20.
Next, as the number of passengers preferring economy class is at least four times
the number of passengers preferring the first class, we must have y 4x.
Also, x 0, y 0.
Therefore the LPP is
Maximixe
P = 400x + 300y
x + y 200,
y 20
y 4x
x 0, y 0
subject to
[objective function]
[capacity function]
[first class function]
[preference constraint]
[non-negativity]
200
C(20,180)
B(40,160)
A(20,80)
x
0
20
200
Figure
7 7
Figure
We now calculate the profit at the corner points of the feasible region.
P(A) = P(20,80) = (400)(20) + (300)(80) = 8000 + 24000 = 32000
P(B) = P(20,160) = (400)(40) + (300)(160) = 64000
P(C) = P(20,180) = (400)(20) + (300)(180) = 62000
Hence, profit of the airlines maximum at B i.e., when 40 tickets of first class
and 160 tickets of ecoomy class are sold. Also, maximum profit is ` 64,000.
87
= Rs. 0.1y
subject to
x + y 12000
x 2000
y 4000
x 0, y 0
88
Linear Programming
12000
C(2000,10000)
x+
4000
A(2000, 4000)
y=
12
00
0
Y = 4000
B(8000, 4000)
X = 2000
2000
x
12000
Figure 8
We now calculate the profit at the corner points of the feasible region.
We have
P(A)
and x 0, y 0.
The feasible region is sketched in Figure 9.
Y
40
C(0,20)
30
20
50 40
3
10
A(25,0) A(25,0)
0
10
20
30
40
x
50
Figure 9
Figure 9
90
D(C) = 0 + 20 = 20
Thus, the maximum values of D is 30 which occurs at x = 50/3, y = 40/3
Linear Programming
Product B(y)
Constraint
Machine
35
Material
600
800
` (86) = ` 2 per
item
Maximise P
Number
Profit
` (10 5) = ` 5
per item
60 = 2100
(Machine constraint)
x + 0.5y 600
(Material constraint)
y 800
(Restriction on B)
x 0, y 0
(Non-negativity)
91
y
1200
1000
A(0,800)
Y = 800
800
B(50,800)
600
x+
+
10 x
0 .5
y
2y
400
60
0
00
=6
200
C(210,0)
0(0,0)
100
200
300
x
400
500
600
Figure
1010
Figure
We now calculate the value of P at the corner points of the feasible region
P(A) = P(0,800) = 1600
P(B) = P(50,800) = 1850
P(C) = P(210,0) = 1050
P(O) = P(0,0) = 0
Maximum profit is ` 1850 for x = 50 and y = 800
Redundant Constraints
In the above example, the constraitn x + 0.5, y 600 does not affect the
feasible region. Such a constraints is called as redundant constraint.
Redundant constraints are unnecessary in the formulation and solution of the
problem, because they do not affect the feasible region.
Example 7 The manager of an oil refinery wants to decide on the optimal mix
of two possible blending processes 1 and 2, of which the inputs and outputs per
product runs as follows :
92
Process
Crude A
Crude B
Gasoline X
Gasoline Y
The maximum amounts available of crudes A and B are 200 untis and 150 Linear Programming
units, respectively. At least 100 units of gasoline X and 80 untis of Y are
required. The profit per production run from processes 1 and 2 ` 300 and Rs.
400 respectively. Formulate the above as linear programming and solve it by
graphical method.
Solution
Let process 1 be run x times and process 2 be y times. The mathematical
formulation of the above linear programming problem is given by
Maximise
P = 300 x + 400 y
subject to
5x + 4y 200
(constraint on Crude A)
3x + 5y 200
(constraint on Crude B)
5x + 4y 100
(constraint on gasoline X)
8x + 4y 80
(constraint on gasoline Y)
x 0, y 0
(non-negativity)
93
Y
50
5x
40
+
4y
A(0,30)
=
20
3x
0
+5
30
y=
150
E(0,25)
20
5x
+
8x
+4
y=
=
4y
10
B
10
0
80
C(40,0)
x
60
D(20,0)
10
20
25
30
40
50
Figure 11
Remark : The constraint 8x + 4y 80 does not affect the feasible region, that
is, the constraint 8x + 4y 80 is a redundant constraint.
No Feasible Solution
In case the solution space or the feasible region is empty, that is, there is no
point which satisfies all the constraints, we say that the linear programming
problem has no feasible solution.
x + 2y 10
x 12
and
x 0, y 0
we draw the feasible region in Fig 12.
10
12
Figure 12
The direction of arrows indicate that the feasible region is empty. Hence, the
given linear programming problem has no feasible solution.
Unbounded solution
Sometimes the feasible region is unbounded. In such cases, the optimal
solution may not exist, because the value of the objective function goes on
increasing in the unbounded region.
94
Linear Programming
3
2
Figure 13
95
4.4
COST MINIMISATION
Minimum amount of
nutrient
108
36
100
The last column of the above table gives the minimum amounts of nutrient
constituients M1, M2, M3 which must given to the pigs. If products A and B cost
` 20 and ` 40 per unit respectively, how much each of these two products
Linear Programming
We now draw the constraints on the same graph to obtain the feasible region.
Since x 0, y 0, we shall restrict ourself only to the first quadrant. See
Figure 14. We obtain point B by solving 36x + 6y = 108 and 20x + 10y = 100
and point C by solving 3x + 12y = 36 and 20x + 10y = 100. The feasible region
has been shaded.
97
18 A(0.18)
36 x
=
6y
+1
x+
10 8
20
10
B(2,6)
y
10
=
0
10
C(4,2)
3x +1
2y =36
D(12,0)
12
Figure14
y
Equal Cost lines
6
5
4
C
C
C
C
2
1
C
C
40
80
12
0
0 1 2 3 4
20
24
0
16 0
0
5 6 7 8 9 10 11 12
Figure 15
It is clear from here that in order to have least possible cost, we should take
a cost line which intersects the feasible region and is as near to the origin
as possible. Therefore we should consider only the corner points of the
98
Linear Programming
A(0,35)
35
25
x+
2y
=5
0
B(20,15)
x+
40
y
0
10
40
+
0x
20
14
=1
0
40
=
7
00
14
35
(E 50,0 )
50
Figure16
99
x 0, y 0
We draw the feasible region of the above linear programming problem in fig.
16. Note that constraint 200x + 100 y 1400 is a redundant constraint. The
other two intersect in (20,15).
The corner points of the feasible regions are A(0, 35), B(20,15) and E(50,0).
We find the value of C at each of these corner points.
C(A) = 4(0) + 3(35) = 105
C(B) = 4(20) + 3(15) = 125
C(E) = 4(50) + 3(0) = 200
Thus, least cost is occurs at x = 0, y =35.
Example 9 Every gram of wheat provides 0.1 g of proteins and 0.25 g of
carbohydrates. The corresponding values for rice are 0.05 g and 0.5 g, respectively.
Wheat costs `2 per kg and rice ` 8. The minimum daily requirements of protein and
carbohydrates for an average child are 50 g and 200 g, respectively. In what quantities should wheat and rice be mixed in the daily diet to provide the minimum daily
requirements of protein and carbohydrates at minimum cost? (The protein and
carbohydrate values given here are fictitious and may be quite different from the
actual values.)
Solution
Let x kg of wheat and y kg of rice be given to the child to give him at least
the minimum requirements of protein and carbohydrates. Then cost of the
food is (2x + 8y) = C (say).
Since one gram wheat contains 0.1 g of proteins, x kg of wheat will contain
(1000 x) (0.1) = 100 x grams of protein.
100
Linear Programming
and
A(0,1)
0.4
2 1
,
5 5
E(0.8,0)
0.8
Figure17
The corner points of the feasible region are A(0,1), B(2/5,1/5) and E(0.8,0).
Let us evaluate C at the conrer points of the feasible region.
C (A) = 2(0) + 8(1) = 8
C ( B) = 2
2
1
12
=8
=
5
5
5
2.4
101
25 + 4
800 + 50 1600
C(B) = 50 4000 + 50
0 = 200000
Linear Programming
3000
2000
A (800,1600)
1000
B(4000,0)
B(4000,0)
0
800
1000
2000
3000
4000
Figure 18
Vitamin B
Vitamin C
Vitamin D
Food X
Food Y
One unit of food X costs ` 5, whereas one unit of good Y cost ` 8. Find
the least cost the mixture which will produce the dersired diet.
Is
there any redundant constraint ?
3. A diet for a sick person must contain at least 4000 units of vitamins, 50 units of
minerals and 1400 of calories. Two foods, A and B, are available at a cost
of ` 4 and ` 3 per unit respectively. If one unit of A contains 200 units
of vitamin, 1 unit of mineral and 40 calories and one unit of food B contains
100 units of vitamin, 2 units of minerals and 40 calories, find what
combination of foods should be used to have the least cost ? Also calculate
the least cost.
103
A tailor needs at least 40 large buttons and 60 small buttons. In the market,
buttons are available in boxes or cards. A box contains 6 large and two small
buttons and a card contains 2 large and 4 small buttons. If the cost of a box is
30 paise and card is 20 paise. Find how many boxes and cards should he buy
as to minimise the expenditure ?
4.5
25 C
B(8,20)
20
10
0
10 20 A
Figure 19
104
30
40
Linear Programming
30
5x + 2y = 50
20
10
C
3x + 3y = 36
2x + 6y = 60
10
A
20
30
Figure 20
26
10
820
+ 30
=
3
3
3
[Machine A constraint]
2x + 3y 14
[Machine B constraint]
x 0, y 0
[non-negativity]
P(A) = 180
P(B) =200
P (C) = 560/3
P(O) = 0
105
14/3
C
3
B(4,2)
0
Figure 21
20 (sq. m per
machine)
24 (sq. m per
machine)
200
Labour
5 (per machine)
3 (per machine)
40
Buckets
120 (per
machine)
80 (per
machine)
Maximise N
106
(Area constraint)
(Labour constraint)
( Non-negativity)
Linear Programming
13
A(0,25/3)
25/3
5x
+
3y
=4
0
B(6,10/3)
4
20
x+
2
24
y=
200
x
10
C(8,0)
Figure 22
The feasible region for the above linear programming problem has been
shaded in the figure.
We find the value of N at the cornor points of the feasible region. We have
N (A) = N
0,
25
=
3
2,000
2
= 666
3
3
10
2960
2
=
= 986
3
3
3
N (C) = N(8,0) = 960
N (B) = N 6,
N (O) = N(0,0) = 0
Thus, the value of N is maximum when x = 6, y = 10/3. As y cannot be in
fraction, we take x = 6, y = 3.
5. We summarise the information given in the question in tabular form as
follows:
Good X
Good Y
Constraint
Capital
10
Labour
20
Revenue
80
100
Maximize R
10
A(0,20/3)
B(2,6)
5
xx
20
C(5,0)
Figure 23
108
Drink A
Drink B
Constraint
Pineapple juice
46
Orange juice
24
Profit
Maximize P
Let x tins of drink A and y tins of drink B be filled up. The above problem
can be written as
Maximise
P = 4x + 2y
Subject to
4x + 2y 46
(pineabpple juice constraint)
x + 3y 24
(organge juice constraint)
x 0, y 0
(non-negativity)
The feasible region has been shaded. See the following figure.
Linear Programming
23
+
4x
=
2y
12
46
A(0,8)
B(9,5)
x+
3y =
24
C (23/2,0)
0
12
16
20
24
Figure 24
We have
P(A) = 4 (0) + 2(8) = 16
P(B) = 4(9) + 2(5) = 46
23
P(C ) 4
+ 2(0) = 46
2
P(0) = 0
We have maximum profit at B and C. In this case, we say that we have
multiple solutions. In fact, each point on the segment BC gives a profit of
` 46. This is because the segment BC is one of the isoprofit lines.
Check Your Progress 2
1. Suppose tailor A works for x days and tailor B work for y days.
The LPP is
Minimise
C = 150x + 200y
subject to
6x + 10y 60
[Shirts constraints ]
4x + 4 y 32
[ Pants constraint]
x 0, y 0
[ Nonnegativity]
109
8 R
Q(5,3)
P
0
10
12
Figure 25
C (P) = 1500
C (Q) = 1350
C( R) = 1600
Thus, cost is least when x =5 and y = 3
2.
S
(1,6)
R
4
3
(5,2)
Q
P
Figure 26
Minimise
C = 5x + 8y
subject to
x+2y6
x+y7
x + 3 y 11
2 x+ y 8
x 0, y 0
110
11
12
Linear Programming
(non-negativity)
We have
C(P) = 200, C (Q) = 125, C (R) = 110,
C(S) = 120
Thus, C is least when x = 5, y = 30.
40
S(0,40)
30
R(5,30)
35
20
Q(20,15)
10
P(50,0)
10
20
30
35
40
50
Figure 27
111
Minimize
C = 30 x + 20y
[objective function]
subject to
6x + 2y 40
[large button constraint]
2 x + 4y 60
[small button constraint]
x 0, y 0
[ non-negativity]
We draw the feasible in the following figure.
We now calculate the cost at the corner points of the feasible region.
C(A) = C(0,20) = 30(0) + (20)(20) = 400
C(B) = C(5/2, 55/2) = (30) (5/2) = (20) (55/2) = 75 + 550 = 525
C(D) = C (30,0) = (30)(30) + (20)(0) = 900
A (0,20)
15
B(5/2,55/2)
2x + 4y 60
6x + 2y 40
Xx
0
20/3
D(30,0)
Figure 28
Thus, the least cost occurs when the tailor purchases just 20 cards and the least
cost is 400.
112
4.7
SUMMARY
Linear Programming
113