2 Linear Programming Problem
2 Linear Programming Problem
2 Linear Programming Problem
Structure
2.1 Introduction 2.2. Requirements 2.2.1 Basic assumptions of L.P.P 2.3. Linear Programming 2.3.1 Canonical forms 2.3.2 Examples of a linear programming problem 2.4. Graphical analysis 2.4.1 Some basic definitions 2.5 Graphical Methods to solve L.P.P 2.5.1 Working Rule: 2.5.2 Examples 6 for mixed constraints LP problem 2.5.3 Examples 9 for Unbounded Solution 2.5.4 Examples 10 for Inconsistent: 2.5.5 Examples 11 for redundant Constraint: 2.6. Summary Terminal Questions Answers to SAQs to TQs
2.1 Introduction
One of the most important problems in management decision is to allocate limited a nd scarce
resource among competing agencies in the best possible manner. Resource s may represent man, money, machine, time, technology on space. The task of the management is to derive the best possible output (or set of outputs) under given restraints on resources. The output may be measured in the form of profits, costs, social welfare, effectiveness, etc. In m any situations the output (or the set of outputs) can be expressed as a linear relationship a mong a number of variables. The amount of available resources can also be expressed as a lin ear relationship among some system variables. The management problem may be to optimize (ma ximize or minimize) the output or the objective function subject to the set of constraints An optimization prob lem in which
15
both the objective function and the constraints are represented by linear forms is a problem in linear
programming. Learning Objectives: After studying this unit, you should be able to understand the following 1. Formulate the LPP and observe the feasible region. 2. Graphically analyze and solve a L.P.P.
2.2Requirements of L.P.P
i. Decisions variables and their relationship
ii. Well defined objective function iii. Existence of alternative courses of action iv. Nonnegative conditions on decision variables. 2.2.1 Basic assumptions of L.P.P 1. Linearity: Both objective function and constraints must be expressed as li near inequalities. 2. Deterministic: All coefficient of decision variables in the objective and co nstraints expressions should be known and finite. 3. Additivity: The value of objective function for the given values of decisio n variables and the total sum of resources used, must be equal to sum of the contributions e arned from each decision variable and the sum of resources used by decision variables resp ectively.
4. Divisibility: The solution of decision variables and resources can be any no nnegative values including fractions. 2.3 Linear Programming
The Linear Programming Problem (LPP) is a class of mathematical programming in which t he
functions representing the objectives and the constraints are linear. Here, by opti mization, we
mean either to maximize or minimize the objective functions. The general linear program ming
Z = cx+ cx +
+ cx
m1 1 m2 2 mn n m
and x 0, x 0, x 0.
12n
technology of the problem and x(j = 1, 2, 3 n) are the decision variables. Here ~ is either
j
(less than), (greater than) or = (equal). Note that, in terms of the above formulation the
of resources
jijj i
i, where ais the amount of resource i, that must be allocated to each unit of activity j, the worth
ij
2.3.1 Canonical forms: The general Linear Programming Problem (LPP) defined above can always be put in the fo llowing
Subject to
ax+ ax+ + ax b
11 1 12 2 1n n 1
ax+ ax+ + ax b
21 1 22 2 2n n 2
ax+ax+ + ax b
m1 1m2 2 mn n m
x, x, x, x 0.
123n
Any LPP can be put in the cannonical form by the use of five elementary transform ations: 1. The minimization of a function is mathematically equivalent to the maximizatio
n of the negative expression of this function. That is, Minimize Z = cx+ cx+ . + cxis
1 1 22 n n
equivalent to
Maximize Z = cx cx cx.
11 22 nn
direction ( or ) by multiplying both sides of the inequality by1. For example 2x+3x 5 is equivalent to 2x3x 5.
12 12
3. An equation can be replaced by two inequalities in opposite direction. For example, 2x +3x=
12
4. An inequality constraint with its left hand side in the absolute form can be changed into two
or 2x 3x 5.
12
= (x x ) where x 0, x 0.
operations painting, assembly and testing. The relevant data are as follows: Hours required for each unit
Unit Sale Price Assembly Painting Testing 1.0 0.2 0.0 Model A Rs. 50.00 1.5 0.2 0.1 Model B Rs. 80.00 Total number of hours available each week are as under assembly 600, painting 1 00, testing 30. The firm wishes to determine the weekly productmix so as to maximize revenue. Solution: Let us first write the notations as under: Z : Total revenue
1
X, X:
12
Since the objective (goal) of the firm is to maximize its revenue, the model can be stated as
follows: The objective function, Z = 50x+ 80xis to be maximized subject to the constraints
12
and
Example 2: A milk distributor supplier milk in bottles to houses in three areas A, B, C in a city. His
delivery charges per bottle is 30 paise in area A, 40 paise in area B and 50 paise i n area C. He has to spend on an average, 1 minute to supply one bottle in area A, 2 minutes pe r bottle in area B and 3 minutes per bottle in area C. He can spare only 2 hours 30 minutes for t his milk distribution but not more than one hour 30 minutes for area A and B together. The maximum number of bottles he can deliver is 120. Find the number of bottles that he has to supply in each area so as to earn the maximum. Construct a mathematical model. Solution: The decision variables of the model can be defined as follows: x: Number of bottles of milk which the distributor supplies in Area A.
1
constraints:
2. Since he requires one minute per bottle in area A, 2 minutes per bottle in area B and 3
minutes per bottle in area C and he cannot spend more than 150 minutes for the work, 1.x+ 2.x+ 3.x 150.
123
3. Further, since he cannot spend more than 90 minutes for areas A and B. 1.x+2.x 90.
12
4. Nonnegativity x 0, x 0.
12
The problem can now be stated in the standard L.P. form is Maximize Z = 0.3x+ 0.4x+ 0.5x
123
Subject to
x+ x+ x 120
123
x+ 2x+ 3x 150
123
x+ 2x 90
12
and
x 0, x 0.
12
Example 3: An oil company has two units A and B which produce three different grades of oil
super fine, medium and low grade oil. The company has to supply 12, 8, 24 barrel s of super fine, medium and low grade oils respectively per week. It costs the company Rs. 1,000 and Rs. 800 per day to run the units A and B respectively. On a day Unit A produces 6, 2 and 4 barrels and the unit B produces 2, 2 and 12 barrels of super fine, medium and low grade oil pe r day. The
manager has to decide on how many days per week should each unit be operated in order to meet the requirement at minimum cost. Formulate the LPP model. Solution: The given data can be presented in summary as follows: Product Capacity Requirements Unit A Unit B Super fine 12 62 Medium 8 22 Low grade 24 4 12 Cost Rs. 1,000 Rs. 800 Let xand xbe the number of days the units A and B be operated per week respecti vely. Then
12
2x+2x 8 (medium)
12
and x 0, x 0.
12
2x + 3y 10
Linear programming with 2 decision variables can be analysed graphically. The graphical
analysis of a L.P.P. is illustrated with the help of the following example: Maximize Z = 700 x+500 x
12
2x+x 90
12
and
12
x 0, x 0.
Let the horizontal axis represent xand the vertical axis x. First we draw the line 4x+ 3x= 210.
1 21 2
(by replacing the inequality symbols by the equality) which meets the xaxis at the point A (52.50,
1
0) (put x= 0 and solve for xin 4x+ 3x= 210) and the x axis at the point B(0, 70) (put x= 0
211221
Any point on the line 4x+3x= 210 or inside the shaded portion will satisfy the restriction of the
12
The 3 constraints including nonnegativity are satisfied simultaneously in the shaded region
if it satisfies all the constraints. The collection of all feasible solutions is known as the feas ible
region. Definition: A set X is convex if for any points x, xin X, the line segment joining thes e points is
12
also in X.
(That is, x, x X, 0 l 1 lx+ (1l)x X). By convention, a set containing only a single
12 2 1
Definition: A linear inequality in two variables is known as a half plane. The corresponding equality or
the line is known as the boundary of the halfplane. Definition: A convex polygon is a convex set formed by the intersection of finite number of closed halfplanes.
E EE E
EEEE EE
Convex regions
Nonconvex regions Note: The objective function is maximized or minimized at one of the extreme poi nts which is the Optimum solution. Extreme points are referred to as vertices or corner points of th e convex regions. Definition: A redundant constraint is a constraint which does not affect the feasibl e region. Definition: A basic solution of a system of m equations and n variables n) is a solution where at least nm variables are zero. (m <
solution where m variables are nonnegative ( 0) and nm variables are zero. Definition: Any feasible solution that optimizes the objective function is called an o ptimal
feasible solution. Example: Find all basic solutions for the system x+ 2x+ x= 4, 2x+ x+ 5x= 5.
123123
x 1 4
1
21
125
5 x
3
22
33
33 solution.
1 ii) If x= 0, then the basis matrix is B = . In this case, x+ x= 4, 2x+ 5x= 5.If we
21313
feasible solution.
2313
Therefore (i) (x, x) = (5/3, 2/3), (ii) (x, x) = (5, 1), and
(iii) (x, x) = (2, 1) are only the collection of all basic solutions.
12
A LPP with 2 decision variables xand xcan be solved easily by graphical method. We consi der
12
the xx plane where we plot the solution space, which is the space enclosed by the
12
constraints. Usually the solution space is a convex set which is bounded by a polygon sin ce a
linear function attains extreme (maximum or minimum) values only on boundary of the region, it is sufficient to consider the vertices of the polygon and find the value of the objectiv e function in these vertices. By comparing the vertices of the objective function at these vertices, we obtain the optimal solution of the problem. The method of solving a LPP on the basis of the above analysis is known as the gr aphical method. The working rule for the method is as follows:
given constraints. Step II: Plot the straight lines represented by the equations obtained in . step I
Step III: Identify the convex polygon region relevant to the problem. We must deci de on which side of the line, the halfplane is located. Step IV: Determine the vertices of the polygon and find the values of the given obj ective function Z at each of these vertices. Identify the greatest and least of these values. These are respectively the maximum and minimum value of Z. Step V: Identify the values of (x, x) which correspond to the desired extreme value of Z. This is
12
Example 4: We can solve the L.P.P. discussed in Example I. Maximize Z = 50x+ 80x
12
0.0x+ 0.1x 30
12
and
12
x 0, x 0
Let the horizontal axis represent xand the vertical axis x. Plot the constraint lines and mar k the
12
Any point on the thick line or inside the shaded portion will satisfy all the restrictio ns of the problem. Then ABCDE is the feasibility region carried out by the constraints operat ing on the objective function. This depicts the limits within which the values of the decision v ariables are permissible. The intersection points C and D can be solved by the linear equations x= 30 x+ 1.5 x= 600, and 0.2x+ 0.2x= 100 and x+ 1.5x= 600 , 300)
2121212
i.e. C (150
After doing this, the next step is to maximise revenues subject to the above shade d area. We work out the revenues at different corner points as tabulated below: Feasible solution of the Corresponding At Total productmix revenue point revenue x xFrom xFrom x
1212
A00000
B 0 300 0 2400 24000 C 150 300 7500 24000 31500 D 300 180 15000 14,400 29400 E 500 0 25000 0 25,000 From the above table we find that revenue is maximum at Rs. 31,500 when 150 u nits of xand
1
requires 10, 12 and 7 units of three chemicals X, Y, Z respectively. The chemicals are available in two types of boxes: Box A, spectively and Box B. Box A contains 3, 2 and 1 units of X, Y, Z re
costs Rs. 300. Box B contains 1, 2 and 2 units of X, Y, Z respectively and costs Rs. 200. Find
how many boxes of each type should be bought by the department so that the total cost i s
minimum. Solution: First, we summarize the given data in the following table: Units Units in Box A Units in Box B Units required X 3 1 10 Y 2 2 12 Z127 Cost Rs. 300 Rs. 200 Let xbe the number of boxes of Atype to be bought and xbe the number of boxes of Btype.
12
Z = 300x+ 200x.
12
Obiviously x 0, x 0.
12
From the details tabulated in the table, we find that xand xare subject to the following
12
constraints:
12
3x+ x 10
2x+ 2x 12
12
x+ 2x 7
12
L: x+ 2x= 7. These
We note that for the coordinates (x, x) of a point satisfy the inequalities. The convex region
12
bounded by these lines and the coordinate axes is an unbounded region, this is shaded in fig.
We check that a point (x, x) that lies inside or on the boundary lines of this region satisfie s the
12
conditions
12
We find that the vertices for the region of interest here are P, Q, R, S. Where P is the point at
which L meets the x axis, Q is the point of intersection of Land L, R is the point of inter
212
section of Land Land S is the point at which Lmeets the x axis. We find that P(0, 10), Q(2,
2331
At P (0, 10), Z = 300 0 + 200 10 = 2000 At Q (2, 4), Z = 300 2 + 200 4 = 1400 At R (5, 1), Z = 300 5 + 200 1 = 1700 At S (7, 0), Z = 300 7 + 200 0 = 2100 Evidently, Z is minimum at the vertices Q (2, 4) for which x= 2, x= 4. Thus the cos t is minimum
12
if 2 boxes of type A and 4 boxes of type B are bought. The minimum cost is Rs. 1400.
maximum and minimum values of the function Z = x 3y where x and y are nonnegative and are subject to the following conditions: 3x + 4y 19, 2x y 9 2x + y 15 xy 3 Solution: First, we write the constraints (conditions) to be satisfied by x, y in the fo llowing standard (less than or equal) form: 3x 4y 19 2x y 9 2x + y 15 x+y3 Now, consider the equations: 3x 4y = 19, 2x y = 9, 2x + y = 15, x + y = 3 which represents straight lin es in the xy plane. Let us denote them by L, L, Land Lrespectively. These are shown in fig.:
123 4
From the figure, we note that the lines L, L, Land Lform a quadrilateral ABCD that lies in t he
123 4
first quadrant of the xy plane. We readily see that the region bounded by this quadrilate ral is
convex. As such, the points (x, y) that lie within or on the boundary lines of this qu adrilateral satisfy the inequalities x 0, y 0 and the constraints. The coordinates of the vertices A, B, C, D of the quadrilateral are obtained by solving equations taken two of them at a time , we find that A (1, 4), B (5, 1), C (6, 3), D (4, 7) we get the solution
at A(1, 4)
Z= 1 34 = 11
Z= 5 31 = 2
at B(5, 1)
Z= 6 33 = 3
at C(6, 3)
Z= 4 37 = 17
at D(4, 7)
Evidently, Z is maximum at the vertex B and minimum at the vertex D. The maximum val ue of Z is
which corresponds to x = 4, y = 7.
Examples 7: Use the graphical method to solve the following LP problem: Maximize Z = 7x+3x
12
x+2x 3
x+x 4
12
5 0 x
1
2 0 x3
2
and x, x 0
12
xx
21
+ 1 3
3 2
xx
21
+ 1
44 xx
11
21 35
22
y
Note: The equation is called intercept form of the straight line. Here a and b are th e + 1= ba distance from orgin to the intersection points on the coordinate axes.
Graph each constraint by first treating it as a linear equation. Then use the inequa lity condition of each constraint to make the feasible region as shown in fig.:
535 The coordinates of the extreme points of the feasible region are 222
1,A
,B and
4
. The value of the objective function at each of these extreme points is as foll ows:
Z= 7x+ 3x
12
A7
5 , 2
1 4 B 22
5
, 2
3 2
C 9/2
,0 3 2 5 The maximum value of the objective function Z= 22 occurs at the extreme points 3 ,B . 2 2
35
Hence the optimal solution to the given LP problem is x ,x == and Max. Z = 22.
21
Subject to
12
10x+ 4x 2000
3x+ 2x 900
12
and x, x 0
12
xx
21
+ 1
500 200 xx
+ 1
21
450 300 xx
+ 1
21
250 500
The values of (xx) at the points are 0(0, 0), A(200, 0) B(125, 187.5) and C(0, 250). The feasible
12
Z=0
Z = 20000
at A(200, 0)
Z = 20000
at B(125, 187.5)
Z = 10,000
at C(0, 250)
Thus the maximum value of Z occurs at 2 vertices at A and B. Any point on the line joinin g A and
B will also give the same maximum value of Z. Therefore, there are infinite numbe r of feasible solutions which yield the same maximum value of Z. Suppose a linear programming problem has an unbounded feasible solution space . If the set of all values of the objective function at different feasible solutions is not bounded above (respectively, bounded below), and if the problem is a maximization (respectively, minimization) problem, then we say that the given problem has an unbounded solution. In the following, we present an example with unbounded solution.
Subject to
12
x x 2
x+ x 4
12
and x, x 0
12
solution space is unbounded. The vertices of the feasible region are A(3, 1) and B (0, 4). V alue of
Z = 23+31 = 9
Z = 20+43 = 12.
at B(0, 4)
But there are points in the convex region for which Z will have much higher values. For ex ample E
(10, 9) lies in the shaded region and the value of Z there at 47. In fact, the maxim um values of Z occurs at infinity. Thus the problem has an unbounded solutions. 2.5.4 Example 10 for Inconsistent:
Maximize Z = 4x+3x
12
Subject to
12
x x 1
x+ x 0
12
and x, x 0.
12
There being no point (x, x) common to both the shaded regions, the LPP cannot be solved .
12
Hence the solution does not exist, since the constraints are inconsistent.
2.5.5 Example 11 for redundant Constraint: A company making cold drinks has 2 bottling plants located at towns Tand T. Each plant
12
produces three drinks A, B and C and their production capacity per day is shown below:
TT
A 6000 2000
botles of B and 40,000 bottles of C during the month of June. The operating costs per day of plants at Tand Tare Rs. 6,000 and Rs. 4,000 respectively. Find the number of days f or which
12
each plant must be run in June so as to minimize the operating costs while meeting the m arket
demand. Solution: Let the plants at Tand Tbe run for xand xdays.
1212
also x, x 0
12
Thus the LPP is to minimize the objective function subject to the constraints (i), (ii) and (iii ). The
solution space is unbounded. The constraint (iii) is dominated by the constraints (i ) and (ii) and hence does not affect the solution space. Such a constraint 3000 x+ 3000 x 40000 is called
12
The values of the convex region A,B,C are A (22, 0), B (12, 4) and ). The values of the objective function Z at the vertices are
at A
C (0, 40
Z= 132000
Z= 88,000
at B
Z= 1,60,000
at C
Thus the minimum value of Z is Rs. 80,000 and it occurs at B. Hence the optimal solution to the
Subject to x + y 30 xy0
y 3 0 x 20 0 y 12. Solution: Any point (x, y) satisfies the conditions x 0, y 0 lies in the first quadrant only. The desired point (x, y) lies with in the feasible convex region ABCDE.
Its vertices are A (3, 3) B (10, 3) C (20, 10), D (18, 12) and B (12, 12). The value s of Z at the five vertices are Z= 2 3 + 3 3 =15
at A (3, 3)
Z = 49
at B (20, 3)
Z = 70
at C (20, 10)
Z = 72
at D (18, 12)
Z = 60
zt E (12,12)
Since the maximum value of Z is 72 which occurs at the vertix D (18, 12). Therefore the s olution of the LPP is x = 18, y = 12 and the minimum value of z is 15 at x = 3, y = 3.
2.6 Summary
In LPP we first identify the decision variables which are some economic or physical quanti ties
whose values are of interest to the management. The problems must have a welldefined objective function expressed in terms of the decision variable. The objective functi on may have to be maximized when it expresses the profit or contribution. In case the objective fu nction indicates a cost, it has to be minimized. The decision variables interact with each other thro ugh some constraints. These constraints occur due to limited resources, stipulation on qualit y, technical, legal or variety of other reasons. The objective function and the constraints are lin ear functions of the decision variables. A LPP with two decision variables can be solved graphically. Any non negative solution which satisfies all the constraints is known as a feasible solution of the problem. The collection of all feasible solutions is known as a feasible region. The feasible r egion of a LPP is a convex set. The value of the decision variables which maximise or minimize th e objectives function is located on the extreme point of the convex set formed by the feasible s olutions. Sometimes the problem may be infeasible indicating that no feasible solution of th e problem exists.