Or-Ch Ii
Or-Ch Ii
LINEAR PROGRAMMING
A key problem faced by managers is how to allocate scarce resources among
activities or projects. The Linear Programming is a mathematical process
that has been developed to help management in decision making involving
the efficient allocation of scares resources to achieve a certain objective, in
other words Linear programming, or LP, is a method of allocating resources
in an optimal way. It is a method for choosing the best alternative
from a set of feasible alternatives. It is one of the most widely used
operations research (OR) tools. It has been used successfully as a decision
making aid in almost all industries, and in financial and service
organizations.
Programming refers to mathematical programming. In this context, it refers
to a planning process that allocates resources—labor, materials, machines,
and capital—in the best possible (optimal) way so that costs are minimized
or profits are maximized.
In LP, these resources are known as decision variables. The criterion for
selecting the best values of the decision variables (e.g., to maximize profits
or minimize costs) is known as the objective function. The limitations on
resource availability form what is known as a constraint set.
Scares To be allocated
Resourc to:
e
Resource
constrain
Objectiv Constrain ts
es ts
Non-
negativity
Constraints
Optimization
Maximizatio Minimizatio
1
n n
To apply LP, the following conditions must be satisfied:
a) Objective Function: Is the goal or objective of a management, stated as
an intent to maximize or to minimize some important quantity such as
profits or costs.
b) Constraints: Are limitations or restrictions imposed by the problems and
constraints include: Resource constraints and Non-negativity
constraints.
1. Resource constraints: Are restrictions that should be clearly identifiable
and measurable in quantitative terms, which arise from limitation of
available resources.
Examples of limited resources:
Plant capacity
Raw materials availability
Labor power
Market demand, etc
2. Non-negativity constraints: Are constraints that require the decision
variables not to take on negative values
c) Linearity: The Objective Function and the constraints must be linear in
nature in order to have a Linear Programming Problems (LPP)
d) Feasible alternative: There should be a series of feasible alternative
course of action available to the decision-making determined by resource
constraints. Thus, we have to choose the best alternative.
For example, let’s say a furniture manufacturer produces wooden tables and
chairs. Unit profit for tables is $6, and unit profit for chairs is $8. To simplify
our discussion, let’s assume the only two resources the company uses to
produce tables and chairs are wood (board feet) and labor (hours). It takes
30 bf and 5 hours to make a table, and 20 bf and 10 hours to make a chair.
There are 300 bf of wood available and 110 hours of labor available. The
company wishes to maximize profit, so profit maximization becomes the
2
objective function. The resources (wood and labor) are the decision variables.
The limitations on resource availability (300 bf of wood and 110 hours of
labor) form the constraint set, or operating rules that govern the process.
Using LP, management can decide how to allocate the limited resources to
maximize profits.
The “linear” part of the name refers to the following:
The objective function (i.e., maximization or minimization) can be
described by a linear function of the decision variables, that is, a
mathematical function involving only the first powers of the variables
with no cross products. For example, 23X 2 and 4X16 are valid decision
variable terms, while 23X2 and 4X3 are not. The entire problem can be
expressed as straight lines, planes, or similar geometrical figures.
The constraint set can be expressed as a set of linear equations. In
addition to the linear requirements, non-negativity conditions state
that the variables cannot assume negative values. It is not possible to
have negative resources. Without these conditions, it would be
mathematically possible to use more resources than are available.
Linear Programming Problems can be solved by using:
i.
The Geometric method called” Graphical Method”- involve two
variables
ii. The Algebraic method called” Simplex Method”
2.1. FORMULATION OF LP
Decision variables are the variables whose values are unknown and are
searched.
Constraint set . . . “The limitations on resource availability.”
Objective function . . . “The criterion for selecting the best values of the
decision variables.”
The coefficients of the variables in the Objective Function are called
the profit or cost coefficients. They express the rate at which the value of the
Objective Function increases or decreases by including in the solution one
unit of each of the decision variables.
3
The coefficients of the constraints’ variables are called the input-output
coefficients that indicate the rate at which the given resources are depleted
or utilized.
Example:
4
Step 3. Determine the valid side of each constraint line. The simplest
way to start is to plug in the coordinates of the origin (0, 0) and see whether
this point satisfies the constraint. If it does, then all points on the origin side
of the line are feasible (valid), and all points on the other side of the line are
infeasible (invalid). If (0, 0) does not satisfy the constraint, then all points on
the other side and away from the origin are feasible (valid), and all points on
the origin side of the constraint line are infeasible (invalid).
Step 4. Identify the feasible solution region. The feasible solution
region represents the area on the graph that is valid for all constraints.
Choosing any point in this area will result in a valid solution.
Step 5. Find the most attractive corner (Corner-points method
/vertices method): once the feasibility region or FR is identified, the
optimal solution from a number of feasible solutions within the FR is to be
separated. The corner points or vertices (extreme points) of the FR are
denoted with convenient notations and coordinates of every corner point
(extreme point) are decided by solving simultaneous equations. The corner
points (extreme points) or vertices represent feasible solutions at the high
points of the FR as the objective function is maximization type. The solution
values of the feasible solutions at corner points are put in the objective
function written earlier. Whichever feasible solution gives the best value
(highest value) of the objective function is the optimal solution.
Step 6. Determine the value of the objective function for the optimal
solution.
A. Maximization Problem
==>Maximize Z with inequalities of constraints in < form
An LP Example-1: Production of wooden tables and chairs
Let’s look at the profit maximization problem that our furniture manufacturer
faces. The company uses wood and labor to produce tables and chairs.
Recall that unit profit for tables is $6, and unit profit for chairs is $8. There
are 300 board feet (bf) of wood available, and 110 hours of labor available. It
takes 30 bf and 5 hours to make a table, and 20 bf and 10 hours to make a
5
chair. Table 1 contains the information for the LP problem. We will go
through the step-by-step process of solving this problem graphically.
Table 1.—Information for the wooden tables and chairs linear programming
problem.
Resource Table (X1) Chair (X2) Available
Wood (bf) 30 20 300
Labor (hr.) 5 10 110
Unit profit $6 $8
6
Now plot the wood constraint line, using the intercepts X1= 10 and X2= 15.
Plot the labor constraint line, using the intercepts X1= 22 and X2= 11. See
Figure 1.
7
valid side of the line. For example, setting X1= 20 and X2= 10 (clearly on
the other side, away from the origin) for the wood constraint line, we get
30(20) + 20(10) ≤ 300, which is not valid. In other words, there simply isn’t
enough wood to make 20 tables and 10 chairs.
Since we want to maximize Z, the last point in the feasible region while
moving away from the origin identifies the most attractive corner, which
gives us the amounts of wood and labor that will result in the maximum
profit (maximize Z). Thus, it represents the optimal solution to the problem
(Figure 2).
The most attractive corner lies at the intersection of the wood and labor
constraint lines. Therefore, coordinates for the most attractive corner can be
found by simultaneously solving the constraint equations (wood and labor):
30 X1 + 20 X2 = 300 (wood)
8
5 X1 + 10 X2 = 110 (labor)
To do so, multiply the labor equation by -2 and add it to the wood equation
so the X2 variable becomes zero and we can solve for X 1.
30 X1 + 20 X2 = 300 (wood)
-2(5 X1 + 10 X2 = 110) (labor)
20 X1 + 0 = 80
X1 = 4 tables
Next, substitute the number of tables calculated above into either of the
constraint equations to find the number of chairs. For this example, we will
substitute into both equations to illustrate that the same value is found.
Wood Constraint Labor Constraint
30(4) + 20 X2 = 300 5(4) + 10 X2 = 110
120 + 20 X2 = 300 20 + 10 X2 = 110
20 X2 = 300 – 120 10 X2 = 110 – 20
20 X2 = 180 10 X2 = 90
X2 = 180/20 X2 = 90/10
X2 = 9 chairs X2 = 9 chairs
Thus, the company’s optimal solution is to make 4 tables and 9 chairs. In this
case, you could read this solution off the graph (Figure 2) by finding the
values on the x and y axes corresponding to the most attractive corner.
Step 7. Determine the value of the objective function for the optimal
solution.
Plug in the number of tables and chairs and solve for Z:
Z = $6(4) + $8(9) = $96
Interpretation: Thus, we find that maximum profit of $96 can be obtained
by producing 9 tables and 9 chairs.
9
Required: How many sets of each model will be produced each day so that
the total profit will be as large as possible?
Resources used per unit
Constraint Model A Maximum Available
s Model B hrs.
(X1)
(X2)
Labor hr. 2 40
1
Machine 1 45
hr. 3
Marketing 1 12
hr. 0
Profit $300
$250
Solution
1. Formulation of mathematical modeling of LPP
Max Z=300X1 +250X2
St:
2X1 +X2 < 40
X1 +3X2 < 45 LPP Model
X1 < 12
X1, X2 … > 0
2. Convert constraints inequalities into equalities
2X1 +X2 = 40
X1 +3X2 = 45
X1 = 12
3. Draw the graph by intercepts
2X1 +X2 =
X1, X2 = 0 X1=12
15 B
Interpretation:
12 units of product A and 11 units of product B should be produced so that
the total profit will be $6350.
Exercise:
A company manufactures two products, X and Y by using three machines A,
B, and C. Machine A has 4 hours of capacity available during the coming
week. Similarly, the available capacity of machines B and C during the
coming week is 24 hours and 35 hours respectively. One unit of product X
requires one hour of Machine A, 3 hours of machine B and 10 hours of
machine C. Similarly one unit of product Y requires 1 hour, 8 hours and 7
hours of machine A, B and C respectively. When one unit of X is sold in the
market, it yields a profit of $ 5 per product and that of Y is $7 per unit.
11
Required: Solve the problem by using graphical method to find the optimal
product mix.
12
B. Minimization Problem
Note: In maximization problems, our point of interest is looking the
furthest point from the origin. In minimization problems, our point of
interest is looking the point nearest to the origin.
==>Minimize Z with inequalities of constraints in > form
Example 1:
A firm produces products, A & B, each of which requires two resources,
namely raw materials and labor. Each unit of product A requires 2 & 4 units
and each unit of product B requires 3 & 3 units respectively of raw materials
and labor. Every day at least 60 units of raw materials and at least 96 hours
of labor are to be used. If unit production cost of product A is $40 and
product B is $35. Determine the number of units of each of the products that
should be made each day to minimize the total cost of production. Solution:
Min Z = $1000 ==> (18, 8)
Example 2:
A company owns two flour mills (A and B) which have different production
capacities for HIGH, MEDIUM and LOW grade flour. This company has
entered contract supply flour to a firm every week with 12, 8, and 24 quintals
of HIGH, MEDIUM and LOW grade respectively. It costs the Co. $1000 and
$800 per day to run mill A and mill B respectively. On a day, Mill A produces
6, 2, and 4 quintals of HIGH, MEDIUM and LOW grade flour respectively.
Mill B produces 2, 2 and 12 quintals of HIGH, MEDIUM and LOW grade flour
respectively. How many days per week should each mill be operated in order
to meet the contract order most economically? Solve graphically.
Solution:
No of days per week of
Mil A (X1) Mill B(X2) Minimum flour in quintals
HIGH Capacity (in quintal) 6 2 12
MEDIUM Capacity (in quintal) 2 2 8
LOW Capacity (in quintal) 4 12 24
$1000 $800
13
(0, 6), (2,
Constraint equation:
0)
(0, 4), (4,
Corners Min
0) Z=$1000 X1 + 800X2
(0, 6) $4800
(1, 3) $3400
(3, 1) $3800
(6, 0) $6000
X1 =1
X2=3 and
Min Z= $3400
X2 X1
=0 6X1+2 X2=12
6
2X1+2 X2=8
4 FR
4X1+12
(1, 3)
X2=24
(3, 1)
X2
=0
X1
2 4 6
14
A firm is engaged in producing two products A and B. Each unit of product A
requires 2Kg of raw material and 4 labor-hrs for processing. Where as each
unit of product B requires 3Kg of raw materials and 3hrs of labor. Every unit
of product A requires 4 hrs for packaging where as B needs 3.5hrs. Every
week the firm has availability of 60Kg of raw material, 96 labor-hours and
105 hrs in the packaging department. 1 unit of product A sold yields $40
profit and 1 unit of B sold yields $35 profit.
Required:
a. Formulate this problem as a LPP
b. Find the optimal solution
Solution
Resources Products Resource available per
week
_______________________________A_________B________________________________
Raw materials (Kg) 2 3 60
Labor (hr) 4 3 96
Packaging (hr) 4 3.5 105
Profit per unit $40 $35
15
X2
(0, 32)
16
therefore, redundant. The inclusion or exclusion of a redundant constraint
does not affect the optimal solution of the problem.
Required:
a. Formulate the LPP of this problem
b. Find the optimal solution
Solution:
Let: X1 =The No of units f product A produced per week
X2 =The No of units f product B produced per week
a. The LPP Model of the problem is:
17
X2 X1=0
(0, 200)
FR X2=0
X1
(300,0)
A (0, 0)
Corners Coordinates Max Z=8 X1 + 16X2
A (0, 0) 0
B (0, 125) 2000
C (50, 125) 2400
D (100, 100) 2400
E (200, 100) 1600
Interpretation:
Both C and D are optimal solutions. Any point on the line segment CD will
also lead to the same optimal solution.
==>Multiple optimal solutions provide more choices for management to
reach their objectives.
3. Infeasible Solution
A solution is called feasible if it satisfies all the constraints and the
constraints and non-negativity condition. However, it is sometimes possible
that the constraints may be inconsistent so that there is no feasible solution
to the problem. Such a situation is called infeasibility.
Example:
18
Max Z=20X1+30X2
St:
2X1+X2< 40
4X1+X2< 60
X1 > 30
X1, X2 > 0
Solution:
X2 X1=0
(0, 60) X1=30
4X1+X2=
(0, 40) 60
2X1+X2=
40 X2=0
X1
(15, 0) (20, 0) (30, 0)
Note:
In the above graph, there is no common point in the shaded area.
All constraints cannot be satisfied simultaneously and there is no
feasible solution to the problem.
4. Mix of constraints
Example:
ABC Gasoline Company has two refineries with different production
capacities. Refinery A can produce 4,000 gallons per day of SUPER
UNLEADED GASOLINE, 2,000 gallons per day of REGULAR UNLEADED
GASOLINE and 1,000 gallons per day of LEADED GASOLINE. On the other
hand, refinery B can produce 1,000 gallons per day of SUPER UNLEADED,
3,000 gallons per day of REGULAR UNLEADED and 4,000 gallons per day of
LEADED.
19
The company has made a contract with an automobile manufacturer to
provide 24,000 gallons of SUPER UNLEADED, 42,000 gallons of REGULAR
UNLEADED and 36,000 gallons of LEADED. The automobile manufacturer
wants delivery in not more than 14 days. The cost of running refinery A is
$1500 per day and refinery B is $2400 per day.
Required:
a. Formulate this problem as a LPP
b. Determine the number of days the gasoline company should operate each
refinery in order to meet the terms of the above contract most economical.
(i.e. At a minimum running cost)
c. Which grade of gasoline would be over produced?
Solution:
_____________________________________________________________________
Production per day (in gallons) Contract with an
auto. mfcturer
Grade of gasoline A B
_____________________________________________________________________
SUPER UNLEADED 4000 1000 24,000
REGULAR UNLEADED 2000 3000 42,000
LEADED 1000 4000 36,000
Running cost per day $1,500 $2,400
_____________________________________________________________________
Let: X1 =The No of days refinery A should work.
X2 =The No of days refinery B should work.
a. LPP of the problem X1, X2 > 0
Min Z = 1500X1+2400X2 ==>To simplify the problem, we
St: divide the constraints by 1000
4000X1+1000X2 > 24000 Min Z = 1500X1+2400X2
2000X1+3000X2 > 42000 St:
1000X1+2000X2 > 36000 4X1+1X2 > 24
2X1+3X2> 42
X1 < 14
X1+4X2 > 36
X2 < 14 X1 < 14
20
X2 < 14 X1, X2 > 0
FR
D (12, 6)
LG: X1+4X2=36
21
36000 > 36000
There fore, No over production of LG
5. Unbounded Solution
When the value of decision variables in LP is permitted to increase infinitely
without violating the feasibility condition, then the solution is said to be
unbounded. Here, the objective function value can also be increased
infinitely. However, an unbounded feasible region may yield some definite
value of the objective function.
Example:
Use the graphical method to solve the following LPP.
1. Max. Z = 3X1+4X2
St:
X1-X2 < -1==> -X1+X2>1 since the quantity solution is positive
-X1+X2 < 0
X1, X2 > 0
X2 X1-X2 =-
1
X1+X2
=0
Unbounded
1 Feasible Region
A(0,3) Unbounded
Feasible Region
X1-X2=1
B (2, 1)
X1+X2=3
X1 22
Note: the two corners of the region are A (0, 3) and B (2, 1). The value of
Max.Z (A) =6 and Max.Z (B) =8. But there exist number of points in the
shaded region for which the value of the objective function is more than 8.
For example, the point (10, 12) lies in the region and the function value at
this point is 70 which is more than 8.
Remark: An unbounded solution does not mean that there is no solution to
the given LPP, but implies that there exits an infinite number of solutions.
Exercise:
Use graphical method to solve the following LPP.
1. Max.Z=7/4X1+3/2X2 2. Max.Z=3X1+2X2
St: St:
8 X1+5X2 < 320 -2X1+3X2 < 9
4X1+5X2 < 20 X1-5X2 > -20
X1 > 15 X1, X2 > 0
X2> 10
X1, X2 > 0
Answer: No feasible solution Answer: Unbounded
solution
3. Max.Z=3X1+2X2 4.Max.Z=X1+X2
St: St:
X1-X2 < 1 X1+X2 < 1
X1+X2> 3 -3X1+X2> 3
X1, X2> 2 X1, X2> 0
Answer: Unbounded solution Answer: Unbounded
solution
5. Max.Z=6X1-4X2 6.Max.Z=X1+1/2X2
St: St:
2X1+4X2 < 4 3X1+3X2 < 12
4X1+8X2> 16 5X1
23
< 10
X1, X2 > 0 X 1 + X2 > 8
X1, X2 > 0
Answer: Infeasible
solution
Exercise
I. Solve the following LP problems using the graphical method.
1. Max.Z=15X1-10X2 2. Max.Z=2X1+X2
St: St:
4X1+6X2 < 360 X1+2X2 < 10
3X1+0X2< 180 X1 +X2 < 6
0X1+5X2< 280 X1 - X2 < 2
X1, X2 > 0 X1 -2X2 < 1
Answer: X1=60, X2 =20 and Max.Z=1,100 X1, X2 > 0
Answer: X1=4, X2 =2 and
Max.Z=10
3. Max.Z=10X1+15X2 4. Min.Z=3X1+2X2
St: St:
2X1+X2 < 26 5X1+X2 > 10
2X1+4X2< 56 X1 +X2 > 6
-X1+X2< 5 X1 + 4 X2 > 12
X1, X2 > 0 X1, X2 >0
Answer: X1=4, X2 =2 and Max.Z=230 Answer: X1=1, X2=5 and
Min.Z=13
5. Min.Z=-X1+2X2 6. Min.Z=20X1+10X2
St: St:
-X1+3X2 < 26 X1+2X2 <40
X1 +X2 < 6 3X1 + 4 X2 > 30
X1-X2< 2 4X1+ 3X2> 60
X1, X2 > 0 X 1, X2 >0
24
Answer: X1=2, X2 =0 and Min.Z=-2 Answer: X1=6, X2=12 and
Min.Z=240
II. A manufacturer produces two different models; X and Y, of the same
product .The raw materials r1 and r2 are required for production. At least 18
Kg of r1 and 12 Kg of r2 must be used daily. Almost at most 34 hours of labor
are to be utilized .2Kg of r1 are needed for each model X and 1Kg of r1 for
each model Y. For each model of X and Y, 1Kg of r2 is required. It takes 3
hours to manufacture a model X and 2 hours to manufacture a model Y. The
profit realized is $50 per unit from model X and $30 per unit from model Y.
How many units of each model should be produced to maximize the profit?
Answer: 10 units of model X, 2 units of model Y and the maximum profit is $
560.
III. A manufacturing firm produces two machine parts P1 and P2 using milling
and grinding machines .The different machining times required for each part,
the machining times available on different machines and the profit on each
machine part are as given below:
____________________________________________________________________
Manufacturing time Maximum time
Required (min) available per week
(min)
Machine P1 P2
_____________________________________________________________________
Lathe 10 5 25,000
Milling Machine 4 10 2000
Grinding Machine 1 1.5 450
Profit per unit ($) $50 $100
_____________________________________________________________________
Required: Determine the number of pieces of P1 and P2 to be manufactured
per week to maximize profit. Answer: X1=187.5, X2 = 125 and
Max.Z=21,875
25
IV.A person requires 10, 12 and 12 units of chemicals A, B and C
respectively for his garden. A liquid product contains 5, 2 and 1 units of A, B
and C respectively per jar. A dry product contains 1, 2 and 4 units of A, B
and C per carton. If the liquid product sells for $3 per jar and the dry product
sells $2 per carton, how many of each should be purchased in order to
minimize cost and meet the requirement?
Answer: 1 Unit of liquid, 5 units of dry product and Min.Z=$8
26