Linear Programming - Unti 1a - 2025
Linear Programming - Unti 1a - 2025
Note: In order to achieve these objectives, you need to spend a minimum of four (4) hours and a
maximum of six (6) hours working through the sessions.
INTRODUCTION
Linear programming was developed by applied mathematicians and operations research specialists
as a means to solve real-world problems using linear methods. Based on the fundamentals of matrix
algebra, linear programming seeks to find an optimal solution, using quantitative methods, to a
particular problem given a finite number of constraints. It is used extensively in managerial science
and has widespread utility to business, government, and industry. It is applied especially to
problems in which decision-makers wish to minimize costs or maximize profits under a given
operating construct. In many cases, linear programming will affect decisions regarding materials
used in manufacturing and construction or even the hiring of personnel or particular skill sets. It is
an excellent tool for decisions regarding allocation of scarce resource.
Page 1 of 20 GK Abledu
constraints (e.g. only working 30 hours a week, not doing anything illegal, etc), using a linear
mathematical model.
Linear programming is based on linear equations—equations of variables raised only to the first
power. Many variables--such as x, y, and z) or more generically, x1, x2,..., xn may be used in a single
equation, known as a linear combination. Generally, each variable represents a quantifiable item,
such as the number of carpenters' hours available to a business during a week or number of sleds
available for sale during a given month.
Many operations management decisions involve trying to make the most effective use of an
organisation’s resources. Resources typically include machinery (such as planes in the case of an
airline), labour (such as pilots), money, time, and raw materials (such as jet fuel). These resources
may be used to produce products (such as machines, furniture, food, and clothing) or service (such
as airline schedules, advertising policies, or investment decisions).
Linear Programming (or simply LP) refers to several related mathematical techniques that
are used to allocate limited resources among competing demands in an optimal way.
The word linear means that all the mathematical functions in this model are required to be linear
functions. The term programming here does not imply computer programming, rather it implies
planning. Thus, Linear Programming (LP) means planning with a linear model. It refers to several
related mathematical techniques that are used to allocate limited resources among competing
demands in an optimal way.
The objective of LP is to determine the optimal allocation of scarce resources among competing
products or activities in a best possible( i.e. optimal) way. That is, it is concerned with the problem
Page 2 of 20 GK Abledu
of optimizing (minimizing or maximizing) a linear function subject to a set of constraints in the
form of inequalities. Economic activities call for optimizing a function subject to several inequality
constraints.
Page 3 of 20 GK Abledu
represents the level of some activity, it is being assumed that the activities can be run at
fractional levels.
4. Certainty: The value assigned to each parameter of a linear programming model is
assumed to be a known constant
Terminologies
i. Decision Variables: The unknown of the problem whose values are to be determined
by the solution of the LP. In mathematical statements we give the variables such names
as X1, X2, X3, … Xn
ii. Objective Function: The measure by which alternative solutions are compared. The
general objective function can be written as :
Z = C1 X1 + C2 X2 + C3 X3 +… + Cn Xn
The measure selected can be either maximized or minimized.
The first step in LP is to decide what result is required. This may be to minimize cost / time, or to
maximize profit/contribution. Having decided upon the objective, it is now necessary to state
mathematically the elements involved in achieving this. This is called the objective function as
noted above.
Example: A factory can produce two products, A and B. The contribution that can be obtained
from these products are: “A contributes $20 per unit and B contributes $30 per unit” and it is
required to maximize contribution.
Let the decisions be X1 and X2. Then the objective function for the factory can be expressed as:
Z = 20X1+30X2
where
X1 = number of units of A produced.
X2 = number of units of B produced
This problem has two (2) unknowns. These are called decision variables.
Note that only a single objective (in the above example, to maximize contributions) can be dealt
with at a time with an LP problem.
Page 4 of 20 GK Abledu
3. Constraint: A linear inequality defining the limitations on the decisions. Circumstances always
exist which govern the achievement of the objectives. These factors are known as limitations or
constraints. The limitation in any problem must clearly be identified, quantified and expressed
mathematically. To be able to use LP, they must, of course, be linear.
4. Non-negative restriction: Solution algorithms assume that the variables are constrained to be
non-negative ie Xj 0, for j = 1, 2, 3, .., n.
5. Alternative optimal solution: If there are more than one optimal solution (with the same value
of Z), the model is said to have alternative optimal solution.
7. Feasible solutions: The set of points (solutions) satisfying the LP’s constraints.
Page 5 of 20 GK Abledu
Formulating Linear Programming Problems
One of the most common linear programming applications is the product – mix problem. Two or
more products are usually produced using limited resources. The company would like to determine
how many units of each product it should produce in order to maximize overall profit given its
limited resources. Let us look at an example:
Procedure:
Formulating Linear Programming problems means selecting out the important elements from the
problem and defining how these are related. For real -world problems, this is not an easy task.
However, there are some steps that have been found useful in formulating Linear Programming
problems:
i. Identify and define the unknown variables in the problem. These are the decision
variables.
ii. Summarize all the information needed in the problem in a table
iii. Define the objective that you want to achieve in solving the problem. For example, it
might be to reduce cost (minimization) or increase contribution to profit
(maximization). Select only one objective and state it.
iv. State the constraint inequalities.
Example:
A manufacturing company produces two products- wax and yarn. Each wax takes 4 hours in the
dying department, and 2 hours in the packaging department. Each yarn requires 3 hours in dying
department and1 hour in packaging department. During the current production period, 240 hours
of production time are available in the dying department and 100 hours of time production time
are also available in the packaging department.
Each wax produced and sold yields a profit $7and each yarn produced may be sold for a profit of
$5
Page 6 of 20 GK Abledu
Solution
Step 1: Identify and define the unknown variables (decision variables) in the problem
Let the decision variables be X1 and X2. Then
X1= number of wax to be produced
X2 = number of yarn to be produced
Step3: Define the objective that you want to achieve in solving the problem. State the LP
objective function in terms of X1 and X2 as follows:
Maximize profit, P = $7X1 + $5X2
Page 7 of 20 GK Abledu
4X1 + 3X2 240(hours of dying time available)
2X1 + 1X2 100(hours of packaging time available
X1, X2 0
Example 1
Maximize profit, P = $7x + $5y
Solution: Treat the inequality constraints as equations and find the intersections of each on the
axes. Proceed as follows:
2x + y 32 (hours of electronic time available)
1. On the On the x-axis, y = 0
2x + 0 = 32
x= 16
So coordinate on the y-axis is (16, 0)
2. On the y , x = 0
0 + y = 32
Page 8 of 20 GK Abledu
y= 32
So coordinate on the y-axis is (0, 32)
32
A(0,18)
18 B(14, 4)
C(16, 0)
x
16 18
Page 9 of 20 GK Abledu
NOTE
The shaded area is called the feasible region. It contains all the points that satisfy all two constraints
plus the non-negative constraints. Z is maximized at the intersection of the two constraints called
an extreme point. The co – ordinate that maximizes the objective function is called feasible
solution.
The mathematical theory behind Linear Programming states that an optimal solution to any
problem (that is the value that yields the maximum profit) will lie at the corner point or extreme
point of the feasible region. Hence it is necessary to find only the values at each corner point.
From the graph, the corner points are: A(0, 18), B(14, 4), and C(16, 0). Substituting the co-
ordinates of the corner points into the objective function, z = 80x + 70y, we have the following:
Example 2
Maximize z = 80x + 70y
Subject to the constraints:
2x + y ≤ 32(Constraint A)
x + y ≤ 18(Constraint B)
4x + 12y ≤ 144(Constraint C)
x, y ≥ 𝟎
Solution: Treat the inequality constraints as equations and find the intersections of each on the
axes. Proceed as follows:
2x + y =32(Constraint A)
1. On the On the x-axis, y = 0
Page 10 of 20 GK Abledu
2x + 0 = 32
x= 16
So coordinate on the y-axis is (16, 0)
2. On the y , x = 0
0 + y = 32
y= 32
So coordinate on the y-axis is (0, 32)
x + y = 18(Constraint B)
1. On the On the x-axis, y = 0
x + 0 = 18
x= 18
So coordinate on the y-axis is (18, 0)
2. On the y , x = 0
0 + y = 18
y= 18
So coordinate on the y-axis is (0, 18)
4x + 12y = 144(Constraint C)
On the On the x-axis, y = 0
4x + 0 = 144
x= 36
So coordinate on the y-axis is (36, 0)
2. On the y , x = 0
0 + 12y = 144
y= 12
So coordinate on the y-axis is (0, 12)
Page 11 of 20 GK Abledu
Example 2
A(0, 12)
B(9, 9)
C(14, 4)
D(16, 0)
From the graph, the corner points are: A(0, 12), B(9, 9), C(14, 4) and D(16, 0). Substituting the
co-ordinates of the corner points into the objective function,
z = 80x + 70y, we have the following:
Z=80(0) +70(12)=840
Example 3
A fabric firm has received an order for cloth specified to contain at least 45 pounds of cotton and
25 pounds of silk. The cloth can be woven out of any suitable mix of two yarns (A and B). Material
A costs $3 per pound, and B costs $2 per pound. They contain the proportions of cotton and silk
(by weight) as shown in the following table:
Page 12 of 20 GK Abledu
Cotton Silk
A 30% 50%
B 60% 10%
Required:
i. Formulate the linear programming problem.
ii. Find the quantities (pounds) of A and B that should be used to minimize the cost
of this order.
Solution
Let x = pounds of material A produced
Let y = pounds of material B produced
Objective function: Min C = 3x + 2y
Constraints: .30x + .60y 45
.50x + .10y 25
.50x + .10y 25
On the On the x-axis, y = 0
,50x + 0 = 25
x= 50
Page 13 of 20 GK Abledu
So coordinate on the y-axis is (50, 0)
2. On the y , x = 0
0 + .10y = 25
y= 250
So coordinate on the y-axis is (0, 250)
A(0,250)
y
250
75 B(39, 55)
C(150, 0)
x
50 150
From the graph, the corner points are: A (0, 250), B (39, 59), and C (150, 0):
Substituting the co-ordinates of the corner points into the objective function,
C = 3x + 2y, we have the following:
A (0, 250): c=3(0) + 2(250) = 500
B (39, 55): c=3(39) + 2(55) = 227
C (150, 0): c=3(150) + 2(0) = 450
• In order to minimize cost:
– 39 pounds of A
– 55 pounds of B must be used.
Page 14 of 20 GK Abledu
Example 4
Maximize Z = 10 x1 + 15x2
Subject to the constraints:
3x1 + 4 x2 = 10......Constra int A
x1 + 4 x2 = 4.........Constra int B
Constraint A: 3x1 + 4 x2 = 10
Finding the intercept on the x1 -axis.
On the x1 -axis, x2 = 0
3x1 + 4(0) = 10
3x1 = 10
10
x1 = = 3.3 (Co-ordinate: 3.3, 0)
3
Finding the intercept on the x2 -axis.
On the x 2 -axis, x1 = 0
3(0) + 4 x2 = 10
4 x2 = 10
10
x2 = = 2.5 (Co-ordinate: 0, 2.5)
4
Constraint B: x1 + 4 x2 = 4
Finding the intercept on the x1 -axis.
On the x1 -axis, x2 = 0
x1 + 4(0) = 4
x1 = 4 (Co-ordinate: 4, 0)
Finding the intercept on the x 2 -axis.
On the x 2 -axis, x1 = 0
0 + 4 x2 = 4
4 x2 = 4
Page 15 of 20 GK Abledu
4
x2 = = 1(Co-ordinate: 0, 1)
4
The point Q(3, 0.25) yields the maximum Z. So, in order to maximize profit, 3 units of x1 and
0.25 units of x2 must be produced. This will yield a profit of $33.75
Example 5
Maximize
Z = 3X1 + 4X2
Subject to:
2.5X1 + X2 20(Constraint A)
3X1 + 3 X2 30(Constraint B)
2X1 + X2 16(Constraint C)
X1 , X2, 0
Procedure:
Treat the inequality constraints as equations and find the intersections of each on the axes.
Constraint A :2.5X1 + X2 = 20
1. On the X1-axis, X2 = 0
2.5X1 + 0 = 20
X1 = 8
So coordinate on the X1-axis is (8, 0)
2. On the X2 , X1 = 0
Page 16 of 20 GK Abledu
0 + X2 = 20
X2 = 20
So coordinate on the X2-axis is (0, 20)
Constraint B: 3X1 + 3 X2 = 30
1. On the X1-axis, X2 = 0
3X1 + 0 = 30
X1 = 10
So coordinate on the X1-axis is (10, 0)
2. On the X2 , X1 = 0
3X1 + 0 = 30
X2 = 10
So coordinate on the X1-axis is (0, 10)
Constraint C: 2X1 + X2 16
1. On the On the X1-axis, X2 = 0
2X1 + 0 = 16
X1= 8
So coordinate on the X1-axis is (8, 0)
2. On the X2 -axis, X1 = 0
0 + X2 = 16
X2= 16
So coordinate on the X1-axis is (0, 16)
Graph the equations using their intersections in order to check the co-ordinates
EXAMPLE 6:
Maximize 8x1+ 10x2
Subject to: 3x1+ 5x2 500
4x1+ 2x2 350
6x1+8x1 800
x1 , x2, 0
Finding the intercepts on the axes.
Page 17 of 20 GK Abledu
3x1+ 5x2=500
On the x1-axis, x2=0.
3x1 = 500
x= 166.7 = 167
So coordinate on the x1-axis is (167, 0)
On the x2 - axis, x1 =o
5xx =500
x2 = 100
So coordinate on the x2-axis is (0, 100)
4x1+2x2= 350
On the x1 – axis, x2 = 0.
4x = 350
x1 = 87.5
So coordinate on the x1-axis is(88, 0)
On the y – axis, x = 0
2y= 350
y = 175
So coordinate on the x2-axis is(0, 175)
6x+8y=800
On the x –axis, y =0
6x = 800
x = 133.3 (133, 0
On the y – axis, x = 0
8y =800
y =100 (0, 100)
NOTE: Draw the graph to check the co-ordinates
Reading from the graph. The company should produce 60 units of x and 55 units of y in order
to make a maximum profit of $1030
Page 18 of 20 GK Abledu
SELF ASSESSMENT QUESTIONS
QUESTION 1
Some students make necklaces and bracelets in their spare time and sell all they make. Every week,
they have available 10,000 grams of metal and 20 hours to work. It takes 50 grams of metal to
make a necklace and 200 grams to make a bracelet. Each necklace takes 30 minutes to make and
each bracelet takes 20 minutes to make. The profit on each necklace is $3.50 and the profit on each
bracelet is $2.50. The students want to make as much profit as possible.
Because you are taking a course in Operations Research, the students asked you for advice on the
following:
i. What number of necklaces and bracelets should be made each week?
ii. How much profit can they make?
QUESTION 2
Jubilant manufacturing company Ltd. produces two types of decorative shelves. The Local English
style takes 20 minutes to assemble and 10 minutes to finish. The Old Contemporary style takes 10
minutes to assemble and 20 minutes to finish. Each day, there are at least 48 worker – hours of
labour available in the assembly department and at least 64 worker- hours of labour available in
the finishing department
The cost of materials for the Local English shelf is $2.00 each. The cost of material for the Old
Contemporary shelf is $2.50 each.
i. Formulate a Linear Programming problem for the above statement that will minimize
cost of producing the two types of shelves.
ii. How many of each type of shelf should the company produce to minimize the cost of
materials and still meet it’s production commitments?
iii. Find the dual prices and interpret your results.
iv. Conduct a sensitivity analysis to find out how the optimum solution will respond to
changes in the right-hand –side values of the constraints.
Page 19 of 20 GK Abledu
QUESTION 3.
A firm produces two products, X and Y with a contribution of $8 and $10 per unit respectively.
Production data are shown in the table below:
Labour Hours Material A Material b
X 3 4 6
Y 5 2 8
Total available 500 350 800
i. Formulate the LP for the statement above
ii. Solve the problem using the graphical method
iii. Calculate the shadow prices for the binding constraints and interpret your results.
iv. Conduct a sensitivity analysis to find out how the optimum solution will respond to
changes in the right-hand –side values of the constraints.
QUESTION 4.
A manufacturer produces two products, Blocks and Bricks. Blocks have a contribution of $3 per
unit and Bricks $4 per unit. The manufacturer wishes to establish the weekly production plan,
which maximizes contribution. Production data are as follows:
Machining (hours) Labour (hours) Material (kgs)
Klunck 4 4 1
Klinck 2 6 1
Total available 100 180 40
Page 20 of 20 GK Abledu