Linear Programming Problems
Linear Programming Problems
INTRODUCTION:
A key problem faced by managers is how to allocate scarce resources among activities or
projects. Linear programming, or LP, is a method of allocating resources in an optimal way. 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.
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 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 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.
TERMINOLOGY OF LPP-
Some of the important terms commonly used is linear programming are disclosed as follows:
(i) Solution- Values of the decision variable x;(i = 1,2,3, n) satisfying the constraints of a general
linear programming model is known as the solution to that linear programming model.
(ii) Feasible solution- Out of the total available solution a solution that also satisfies the non-
negativity restrictions of the linear programming problem is called a feasible solution.
(iii) Basic solution- For a set of simultaneous equations in Q unknowns (p Q) a solution obtained
by setting (P - Q) of the variables equal to zero & solving the remaining P equation in P
unknowns is known as a basic solution. . The variables which take zero values at any solution
are detained as non-basic variables & remaining are known as-basic variables, often called basic.
(iv) Basic feasible solution- A feasible solution to a general linear programming problem which
is also basic solution is called a basic feasible solution.
(v) Optimal feasible solution - Any basic feasible solution which optimizes (ie; maximise or
minimises) the objective function of a linear programming modes known as the optimal feasible
solution to that linear programming model.
(vi) Degenerate Solution- A basic solution to the system of equations is termed as degenerate if
one or more of the basic variables become equal to zero.
The Diet Problem: Linear programming has been applied to know the nutrient contents such
as vitamins, proteins, fats, carbohydrates, starch etc. in each of the food stuffs. The method is
also used to find the minimum cost diet that satisfies the minimum daily requirements of
nutrients when minimum cost of each type of food stuff and minimum daily requirement of
each nutrient in the diet is given.
Agriculture Problem: These problems are concerned with maximizing net revenue by
allocating the input resources such as average of land water, labour, fertilizers and capital to
various crops. Flight Scheduling Problem: To utilize the aircrafts and crew efficiently by
determining the most economical patterns and timing of flight.
Product mix Problem: The problem is concerned with determining the product mix that will
maximize the total profit, when to manufacture various products, a certain production
capacity (men, machines, money, material, markets, etc.) are available on various
manufacturing process. As different products will have different selling prices, will require
different amounts of production capacity at the several processes and will, therefore have
different unit profit, there may also be conditions on maximum and / or minimum product
levels.
Blending Problems: These problems arises when manufacturing process involves blending
of some of the various raw material available of various composition and prices, in varying
qualities to make a product of desired specification for example different grades of gasoline
are used in aviation purpose. About the input ingredients, prices and specifications, such as
octane raling, tetra ethyl lead concentrations, maximum vapour pressure, etc. and problem is
to decide the proportions of these ingredients to make the desired grades of gasoline so that
maximum output is obtained and
storage capacity restrictions are satisfied.
The technique of linear programming is used to handle many similar situations such preparation
of chemicals, fertilizers and alloys etc.
The steps in solving an LP problem graphically are introduced briefly below. In the remainder of
this publication, we’ll apply these steps to a simple LP problem.
Formulation refers to translating the real-world problem into a format of mathematical equations
that represent the objective function and the constraint set. Often, data gathering, problem
definition, and problem formulation are the most important (and the most difficult, time
consuming, and expensive) steps when using any OR tool. A thorough understanding of the
problem is necessary in order to formulate it correctly. During the formulation stage, an OR
specialist may discover new insights into the problem that may change the scope of the original
problem. For this reason, it’s very important to obtain the help of those who work most closely
with the system being studied. They can help the OR specialist collect the necessary data and
correctly define the problem so that he or she can create a valid model. In formulating an LP
problem, it often helps to put all of the relevant information into a table (for example, see Table
1).
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). There are two
exceptions, which we will discuss later.
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. Plot two objective function lines to determine the direction of improvement-
Improvement is in the direction of greater value when the objective is to maximize the objective
function, and is in the direction of lesser value when the objective is to minimize the objective
function. The objective function lines do not have to include any of the feasible region to
determine the desirable direction to move.
Optimal solutions always occur at corners. The most attractive corner is the last point in the
feasible solution region touched by a line that is parallel to the two objective function lines
drawn in step 5 above. When more than one corner corresponds to an optimal solution, each
corner and all points along the line connecting the corners correspond to optimal solutions. We’ll
use an example to illustrate optimal solutions later.
Step 7. Determine the optimal solution by algebraically calculating coordinates of the most
attractive corner.
Step 8. Determine the value of the objective function for the optimal solution.
Table 1 will help us formulate the problem. The bottom row is used to formulate the objective
function. Objective functions are developed in such a way as to be either maximized or
minimized. In this case, the company’s management wishes to maximize unit profit. The wood
and labor rows are used to formulate the constraint set. Finally, the non-negativity conditions are
stated.
Subject to: 30X1 + 20X2 < 300 (wood constraint: 300 bf available)
Since only two variables (wood and labor) exist in this problem, it can be solved graphically. If
there were more than two variables, the graph would have to be more than two dimensions.
First, rewrite the constraint inequalities as equalities and solve to obtain the intercepts:
Wood Labor
X1 = 300/30 X1 = 110/5
= 10 tables = 22 tables
(All the wood is used to make tables.) (All the labor is used to make tables.)
Next:
X2 = 300/20 X2 = 110/10
= 15 chairs = 11 chairs
(All the wood is used to make chairs.) (All the labor is used to make chairs.)
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.
Step 3. Determine the valid side of each constraint line.
We will use the origin (0,0) to check the valid side for both constraint lines. 30(0) + 20(0) < 300
is valid, so we know the side toward the origin (0,0) is the valid side of the wood constraint line.
5(0) + 10(0) < 110 also is valid, so we know the side toward the origin (0,0) is the valid side of
the labor constraint line. We can draw arrows indicating the valid side of each constraint line.
See Figure 2.
We could have chosen any point to test for the 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.
The feasible region is the area on the valid side of both constraint lines. Any point located on the
invalid side of a constraint line is infeasible. Because of the non-negativity conditions, the
feasible region is restricted to the positive quadrant. See Figure 2.
Step 5. Plot two objective function lines to determine the direction of improvement.
First, we’ll arbitrarily set profit, Z = 48, and then set profit, Z = 72. We’ll find the x and y
intercepts when Z = 48 and when Z = 72, and plot the two lines.
Set Z = 48 Set Z = 72
48 = 6(X1) 72 = 6(X1)
48/6 = X1 72/6 = X1
X1 = 8 X1 = 12
Next:
48 = 8(X2) 72 = 8(X2)
48/8 = X2 72/8 = X2
X2 = 6 X2 = 9
Now plot the objective function lines when Z = 48 and Z = 72. See Figure 3. We can see from
the two objective function lines that as we move away from the origin (0, 0), Z increases.
Step 6. Find the most attractive corner.
Since we want to maximize Z, we will draw a line parallel to the objective function lines that
touches the last point in the feasible region while moving away from the origin. This 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 4).
Step 7. Determine the optimal solution by algebraically calculating coordinates of the most
attractive corner.
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):
30X1 + 20X2 = 300 (wood)
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 X1.
20X1 + 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.
X2 = 180/20 X2 = 90/10
X2 = 9 chairs X2 = 9 chairs
Thus, the company’s optimal solution is to make four tables and nine chairs. In this case, you
could read this solution off the graph (Figure 4) by finding the values on the x and y axes
corresponding to the most attractive corner. However, when the most attractive corner
corresponds to an optimal solution with fractions, it is not possible to read directly from the
graph. For example, the optimal solution to this problem might have been 3.8 tables and 9.2
chairs, which we probably would not be able to read accurately from the graph.
Step 8. Determine the value of the objective function for the optimal solution.
Plug in the number of tables and chairs and solve for Z:
Thus, we find that maximum profit of $96 can be obtained by producing four tables and nine
chairs.
Let’s consider another maximization problem, unrelated to the tables and chairs problem, to
illustrate multiple, sometimes called alternative, optimal solutions.
X1, X2 > 0
In this case, there are multiple resources that can be combined in various ways. Our goal is to
find the combination of resources that will maximize profits. It’s possible that more than one
resource mix will lead to equally optimal solutions.
Steps 2, 3, and 4. Construct the graph and plot the constraint lines. Determine the valid side of
each constraint line. Identify the feasible region (Figure 11).
Steps 5 and 6. Plot two objective function lines and determine the direction of increasing value
(if a minimization problem, we would determine the direction of decreasing value). Identify the
most attractive corner. For this example, we find that there actually are two most attractive
corners, where resource one’s constraint line intersects resource two’s constraint line, and where
resource one’s constraint line intersects resource three’s constraint line (Figure 12).
Step 7. Determine the optimal solution by algebraically calculating coordinates of the most
attractive corners. By simultaneously solving both equation pairs for both points, we can choose
the corner that corresponds to the highest objective function value (since this is a maximization
problem). Solve for X1:
-7X1 +0 = - 48
1/7(-7X1 + 0) = - 48
-X1 = - 48/7
X1 = 6.86
5(6.86) + 6X2 = 60
34.28 + 6X2 = 60
6X2 = 60 - 34.28
6X2 = 25.71
X2 = 25.71/6
X2 = 4.29
1.4X1 + 0 =6
X1 = 6/1.4
X1 = 4.29
5(4.29) + 6X2 = 60
21.45 + 6X2 = 60
6X2 = 60 - 21.45
6X2 = 38.55
X2 = 38.55/6
X2 = 6.425
Both points are equally attractive, so there are multiple optimal solutions. As stated earlier, when
more than one corner corresponds to an optimal solution, each corner and all points along the
connecting line segment will correspond to optimal solutions.
Whenever all coefficients of one equation are the same multiple of another equation’s
coefficients, the lines are parallel. When the objective function line is parallel to a constraint line,
there are multiple optimal solutions.
In our example:
The ratio of X1 terms (10 and 5) is 10/5 or 2. The ratio of X2 terms (12 and 6) is 12/6, also 2.
Thus, the two lines are parallel and multiple optimal solutions exist. Multiple optimal solutions
mean that more than one mix of resources leads to an optimal solution. In real-world problems,
there may be reasons why one mix of resources would be easier to obtain than another, or there
may be no reason to choose one solution over another.
Maximisation Case-
Maximize Z = 2 x1 +5x2
Solution:
First we have to find the feasible region using the given conditions.
Since both the decision variables x1 and x2 are non-negative, the solution lies in the first
quadrant.
Therefore we have the lines x1+ 4x2=24; 3x1 + x2 = 21; x1 + x2= 9 x1+ 4x2= 24 is a line passing
through the points (0 , 6) and (24 , 0). [(0,6) is obtained by taking x1=0 in x1 + 4x2 = 24 , (24 , 0)
is obtained by taking x2 = 0 in x1+ 4x2 = 24].
Any point lying on or below the line x1 + 4x2 = 24 satisfies the constraint x1 + 4x2≤ 24.
3x1 +x2= 21 is a line passing through the points (0, 21) and (7, 0). Any point lying on or below
the line 3 x1 + x2 = 21 satisfies the constraint 3 x1 + x2 ≤ 21.
x1+ x2 = 9 is a line passing through the points (0 , 9) and ( 9 , 0) .Any point lying on or below the
line x1 + x2 = 9 satisfies the constraint x1+ x2 ≤ 9.
Minimisation Case-
Question- Solve the following LPP by graphical method Minimize z = 5x1+4x2
Solution:
Since both the decision variables x1 and x2 are non-negative, the solution lies in the first quadrant
of the plane.
4x1+x 2 = 40 is a line passing through the points (0,40) and (10,0).Any point lying on or above
the line 4x1+x2= 40 satisfies the constraint 4x1+ x2 ≥ 40.
2x1+3x2 = 90 is a line passing through the points (0,30) and (45,0). Any point lying on or above
the line 2 x1+3x2= 90 satisfies the constraint 2x1+3x2 ≥ 90.
Maximize Z= 2 x1 +3x2
Solution:
Since both the decision variables x1 and x2 are non-negative, the solution lies in the first quadrant
of the plane.
x1+x2=30; x2 =12; x1= 20
x1+x2 =30 is a line passing through the points (0,30) and (30,0)
x2 = 12 is a line parallel to x1–axis
The feasible region satisfying all the conditions x1+ x2≤ 30; x2≤ 12 ; x1≤ 20 and x1, x2 ≥ 0 is
shown in the following graph.
The co-ordinates of the points are O(0,0) ; A(20,0); B(20,10) ; C(18,12) and D(0,12).
Maximum value of Z occurs at C. Therefore the solution is x1 = 18 , x2= 12, Z max = 72
Infeasible Solution-
Solution:
Since both the decision variables x1, x2 are non-negative, the solution lies in the first quadrant of
the plane.
There is no common region (feasible region) satisfying all the given conditions.
Hence the given LPP has no solution.
Example . Unique Car Ltd. Manufacturers & sells three different types of Cars A, B, & C.
These Cars are manufactured at two different plants of the company having different
manufacturing capacities. The following details pertaining to the manufacturing process are
provided:
Using the graphical method technique of linear programming, find the least number of days of
operations per month so as to minimize the total cost of operations at the two plants.
Solution
The objective of uniques Car Ltd. Is to minimize the operating costs of both its plants.
Subject to:
50 X1+ 60X2 ≥ 2500
100 X1 + 60 X2 ≥ 3000
and X1, X2 ≥ 0
The solution space lines at the points A, B, C & D Calculating the Optimal solution:
Thus, the least monthly operately cost is at the point B. Where x1=20 days, x2=25 days &
operating cost = Rs. 1,37,500