Linear Programming
Linear Programming
Quite often the resources that an organization has are limited. These resources may
be human beings, money, machines, time, storage space, raw materials and many
others that are peculiar to the organization. The management of the organizations
usually makes decisions about how best each of these resources may be put to the most
efficient and effective use. A technique that helps managers plan and make the most
efficient utilization of the scarce resources is linear programming, LP. LP is basically a
mathematical tool that helps managers plan the most effective way of allocating the
scarce resources to the many departments within the organization. It provides an
optimal allocation of the scare resources.
Therefore, LP is a mathematical technique used to optimize the firm’s performance
in terms of a combination of resources. This, technique helps in solving problems
relating to profit maximization, cost minimization & optimum resource allocation.
Applications of LP
1. In military; LP is used to define the optimal & efficient coordination of a country’s
energies in the event of total war. E.g. U.S Air force in 1947 after the 2nd world
war.
2. Business & industry e.g. in petroleum industry i.e. exploration, production,
refining, distribution & pollution control.
3. Food processing e.g. determination of optimal mix of dog & cat feeds, allocation
of cast food from different plants to various warehouses, etc.
4. Heavy industry e.g. in iron & steel industry to decide the types of products to be
made in the rolling mills so as to maximize profits.
5. Metal working industries i.e. for shop loading & determining choice between
producing & buying a particular part. Paper & textile industries use LP to define
optimal cutting method in order to minimize loses. As well as in determining
Aircrafts & ships best route.
6. Service industries e.g. accounting firms use LP in Asset valuation & assigning
auditors tasks in an optimal way. Financial institutions like banks use it in
evaluating investment plans, selection of Bonds or Mutual Funds’ portfolios,
capital budgeting, long-range financial planning, etc. in advertising media, LP has
been used in assigning advertising expenses to various media plans.
Page 1 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
Page 2 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
3. Constraints (Restraints); these are factors that limit the decision maker on what
to do. These constraints may also be inform of predetermined conditions such as
those being imposed by the government e.g. sale restriction, tax policies, trade
restrictions, etc. However, in LP these constraints are expressed as linear
inequalities i.e. 2𝑥 + 4𝑦 ≤ 400
4. Non-negativity conditions; this states that, all decision variables in LP should be
positive (non-negative), since it is impossible to produce/sell negative units of a
given product. As a result, these conditions are denoted as 𝑥 ≥ 0; 𝑦 ≥ 0
5. Convex set; a set is said to be convex if a straight line joining any two points within
the set doesn’t go outside the set and it represents a set of feasible solution i.e.
points which satisfy the a decision maker’s conditions and as well where a decision
will be made. However, corner points in a convex set are known as extreme points
which also represent a particular type solution called Basic solution.
Thus, objective function, constraints & non-negativity conditions, generally constitute
a LP model.
Formulation of LP Model
In formulating LP model, it is advisable to follow the elements that constitute LP
model chronologically as described above, i.e.
Step 1: identify decision variables to be determined & express them in terms of
algebraic symbols (unknowns).
Step 2: identify all constraints (limitations) & express them as linear inequalities in
terms of the above unknowns.
Step 3: identify the objective criterion which is to be optimized (maximize/minimize)
& express it as a linear function of the above unknowns (decision variables).
WORKED EXAMPLES
Example 1 (Maximization Case)
A firm makes two products P&Q. Each product must be processed using machines
A&B. Machine A has 90hrs available and machine B has 72hrs. Manufacturing
product P requires 6hrs in A and 3hrs in B. Product Q requires 3hrs in machine A
and 6hrs in B. if the profit UGX 8,000 and UGX 10,000 is earned per product P&Q
respectively.
Page 3 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
Required:
a. Formulate a LP Model of the above problem
b. Determine the best possible combination of product P&Q that should be
produced for the firm to maximize profits.
Solution:
1. Decision variables;
No. of Units to be produced for each product P & Q so as to maximize the profit.
Thus, let; 𝑥 = 𝑁𝑜. 𝑜𝑓 𝑈𝑛𝑖𝑡𝑠 𝑜𝑓 𝑝𝑑𝑐𝑡 𝑃 𝑡𝑜 𝑏𝑒 𝑝𝑟𝑜𝑑𝑢𝑐𝑒𝑑
𝑀𝑎𝑐ℎ𝑖𝑛𝑒 𝐵 = 3𝑥 + 6𝑦 ≤ 72 ℎ𝑟𝑠.
Where:
𝑥 ≥ 0 ;𝑦 ≥ 0
& Power Horse. The number of machine hours available per month are 200 hours
for M1, 240 hours for M2 and 190 hours for M3.
Required:
a. Formulate the problem as a linear programming problem
b. Construct a graph you would use to solve the problem
c. On your graph clearly show the feasible region
d. Find the number of units of each product that must be produced to maximize the
total profits
Solution:
1. Decision variables;
No. of Units to be produced for Sting & Horsepower so as to maximize the profit.
Thus, let; 𝑥1 = 𝑁𝑜. 𝑜𝑓 𝑈𝑛𝑖𝑡𝑠 𝑜𝑓 𝑆𝑡𝑖𝑛𝑔
Where:
𝑥1 ≥ 0 ; 𝑥2 ≥ 0
Page 5 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
1. Decision variables;
No. of Units/kg of food 𝐹1 𝑎𝑛𝑑 𝐹2 contained in the mixture.
Thus, let; 𝑥 = 𝑢𝑛𝑖𝑡𝑠/𝑘𝑔 𝑜𝑓 𝑓𝑜𝑜𝑑 𝑭𝟏
𝑦 = 𝑈𝑛𝑖𝑡𝑠/𝑘𝑔 𝑜𝑓 𝑓𝑜𝑜𝑑 𝑭𝟐
Page 6 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
Where: 𝑥 ≥ 0 ,𝑦 ≥ 0
1. Decision variables;
No. of grams of substance used.
Thus, let; 𝑥1 = 𝑁𝑜. 𝑜𝑓 𝑔𝑟𝑎𝑚𝑠 𝑜𝑓 𝑠𝑢𝑏𝑠𝑡𝑎𝑛𝑐𝑒 𝑀 𝑢𝑠𝑒𝑑
Where: 𝑥1 ≥ 0 ; 𝑥2 ≥ 0
Page 8 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
Solution: this is a set of values of decision variables satisfying all the constraints of
a linear programming problem.
Feasible solution; this is any solution which also satisfies the non-negativity
restrictions of the problem. In other words, it is a set of possible values for decision
variables that meet all constraints.
Optimal feasible solution; is any feasible solution which maximizes or minimizes
the objective function.
Feasible region; this is a common region determined by all the constraints and
non-negativity restriction of a LPP.
Corner point; a corner point of a feasible region is a point in the feasible region
that is the intersection of two boundary lines.
Note: the following theorem is the fundamental theorem of linear programming.
If the optimal value of the objective function in a linear programming problem exists, then that
value must occur at one (or more) of the corner points of the feasible region.
Steps in Graphical method solution
To solve a linear programming problem with two decision variables using the graphical
method, the following procedure outlined below is advisable;
1. Formulate the linear programming problem.
2. Graph the feasible region and find the corner points by changing inequalities into
equalities. The coordinates of the corner points can be obtained by either
inspection or by solving the two equations of the lines intersecting at that point.
3. Make a table listing the value of the objective function at each corner point.
4. Determine the optimal solution from the table in step 3. If the problem is of
maximization (minimization) type, the solution corresponding to the largest
(smallest) value of the objective function is the optimal solution of the LPP.
Therefore, let’s use this procedure to solve LPP examples above where models have
already been determined.
Example 1
𝑍𝑚𝑎𝑥 = 8,000𝑥 + 10,000𝑦
Subject to: constraints: 𝑀𝑎𝑐ℎ𝑖𝑛𝑒 𝐴 = 6𝑥 + 3𝑦 ≤ 90 ℎ𝑟𝑠.
𝑀𝑎𝑐ℎ𝑖𝑛𝑒 𝐵 = 3𝑥 + 6𝑦 ≤ 72 ℎ𝑟𝑠.
Where:
𝑥 ≥ 0 ;𝑦 ≥ 0
Page 9 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
20
Y- AXIS
15
(0,12)
A
10
B (12, 6)
5 Feasible Region
3x + 6y ≤72
(15,0) (25,0)
0 O(0,0) C
0 5 10 15 20 25 30
X-AXIS
Substituting Corner Points into Objective Function to determine Optimal (best) Solution
Corner Objective Function Amounts
points 𝑍𝑚𝑎𝑥 = 8,000𝑥 + 10,000𝑦
Note: Corner points can be determined by solving intersecting lines using any of the
simultaneous equation methods such as;
Elimination method
Substitution method
Matrix method,
Page 10 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
These equations were then solved using Cramer’s matrix method to find the
coordinates (12,6) as follows:
6 3 𝑥 90
( ) (𝑦) = ( )
3 6 72
Solving for x;
90 3
| | (90 × 6) − (72 × 3) 324
𝑥 = 72 6 = = = 12
6 3 (6 × 6) − (3 × 3) 27
| |
3 6
Solving for y;
6 90
| | (6 × 72) − (3 × 90) 162
𝑦= 3 72 = = =6
6 3 (6 × 6) − (3 × 3) 27
| |
3 6
∴ 𝐶𝑜𝑟𝑛𝑒𝑟 𝑃𝑜𝑖𝑛𝑡 𝐵 (12,6)
Therefore, since the firm’s objective is profit maximization, the best possible
combination of the products is at point B, where the firm will produce 12 units of
product P & 6 units of product Q in order to maximize a profit of Ugx. 156,000.
Example 2
𝑍𝑚𝑎𝑥 = 250𝑥1 + 300𝑥2
Subject to: constraints:
𝑀𝑎𝑐ℎ𝑖𝑛𝑒 1 = 2𝑥1 + 5𝑥2 ≤ 200 ℎ𝑟𝑠.
𝑀𝑎𝑐ℎ𝑖𝑛𝑒 2 = 4𝑥1 + 𝑥2 ≤ 240 ℎ𝑟𝑠.
𝑀𝑎𝑐ℎ𝑖𝑛𝑒 3 = 3𝑥1 + 2𝑥2 ≤ 190 ℎ𝑟𝑠.
Page 11 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
300
Objective function
𝑍_𝑚𝑎𝑥=250𝑥_1+300𝑥_2
250
(0,240)
200
Y - Axis
150
100 (0,95)
50
Feasible Region
(0,100)
0
0 20 40
D (60,0)
X -60
Axis 80 100 120
Page 12 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
200 5
| | (200 × 2) − (190 × 5) −550
𝑥1 = 190 2 = = = 50
2 5 (2 × 2) − (3 × 5) −11
| |
3 2
Solving for 𝑥2 ;
2 200
| | (2 × 190) − (3 × 200) −220
𝑥2 = 3 190 = = = 20
2 5 (2 × 2) − (3 × 5) −11
| |
3 2
∴ 𝐶𝑜𝑟𝑛𝑒𝑟 𝑃𝑜𝑖𝑛𝑡 𝐵 (50,20)
Substituting Corner Points into Objective Function to determine Optimal (best) Solution
Corner Objective Function Amounts
points 𝑍𝑚𝑎𝑥 = 250𝑥1 + 300𝑥2
Page 13 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
Therefore, since the Rock Ltd’s objective is profit maximization, the best possible
combination of the products is at point B, where the Company will produce 50 units
of Sting & 20 units of Horse Power in order to maximize a profit of Ugx. 18,500.
Example 3
𝑍𝑚𝑖𝑛 = 60𝑥 + 80𝑦
Subject to: 3𝑥 + 4𝑦 ≥ 8
5𝑥 + 2𝑦 ≥ 11
6
C (0,5.5)
5
4 5x + 26 ≥ 11
3 Feasible region
2 3x + 4y ≥ 8
1
B (2,0.5)
0
0 0.5 1 1.5 2 2.5
A (2.7,30)
Page 14 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
3 4 𝑥 8
( ) (𝑦) = ( )
5 2 11
Solving for x;
8 4
| | (8 × 2) − (11 × 4) −28
𝑥= 11 2 = = =2
3 4 (3 × 2) − (5 × 4) −14
| |
5 2
Solving for 𝑥2 ;
3 8
| | (3 × 11) − (5 × 8) −7
𝑦= 5 11 = = = 0.5
3 4 (3 × 2) − (5 × 4) −14
| |
5 2
∴ 𝐶𝑜𝑟𝑛𝑒𝑟 𝑃𝑜𝑖𝑛𝑡 𝐵 (2,0.5)
Substituting Corner Points into Objective Function to determine Optimal (best) Solution
Corner Objective Function Amount
points 𝑍𝑚𝑖𝑛 = 60𝑥 + 80𝑦
𝑨 (𝟐. 𝟕, 𝟎) = (60 × 2.7) + (80 × 0) 162
𝑩 (𝟐, 𝟎. 𝟓) = (60 × 2) + (80 × 0.5) 160
𝑪 (𝟎, 𝟓. 𝟓) = (60 × 0.5) + (80 × 5.5) 𝟒𝟕𝟎
Therefore, Best solution is at Corner Point C, where the house wife has to mix 0.5
units/Kg of Vitamin A & 5.5 units/Kg of Vitamin B in order to minimize a total
cost of 470 Shs.
Example 4
𝑍𝑚𝑖𝑛 = 3𝑥1 + 𝑥2
Subject to: 10𝑥1 + 2𝑥2 ≥ 84
8𝑥1 + 4𝑥2 ≥ 120
Page 15 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
45
C (0, 42)
40
35
30
25
20
15
10
0
0 2 4 6 8 10 12 14 16
Substituting Corner Points into Objective Function to determine Optimal (best) Solution
Corner Objective Function Costs
points 𝑍𝑚𝑖𝑛 = 3𝑥1 + 𝑥2
𝑨 (𝟏𝟓, 𝟎) = (3 × 15) + (1 × 0) 45
𝑩 (𝟒, 𝟐𝟐) = (3 × 4) + (1 × 22) 34
𝑪 (𝟎, 𝟒𝟐) = (3 × 0) + (1 × 42) 42
a) Therefore, 4 grams of substance M & 22 grams of substance N should be mixed in
order to meet the minimum daily requirement and as the same time minimize the
intake of drug C of 34 units
b) There will be 26 units (4 + 22) of undesirable drug C in this mixture
Note:
For Greater than problems, the feasible region is below the lines, likewise for Less
than problems, the feasible region is above the lines as shown in the worked examples
above.
The graphical method is the easiest way to solve a small LP problem. However this
method is useful only when there are two decision variables. When there are more
than two decision variables, it is not possible to plot the solution on a two-dimensional
graph and we must turn to more complex methods.
The graphical nature of the above method makes its use limited to problems involving
only two decision variables. For such problems it is possible to represent the
constraints graphically. A graphical solution for a problem with a higher number of
decision variables than two cannot be practically obtained because of the complexity
Page 16 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
Page 17 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
20kg of malt are required. Suppose that only 480 kg of corn, 160kg of hops and
1190 kg of malt are available. If the brewery makes a profit of Shs. 13,000 for each
kg of Ale and Shs. 23,000 for each kg of Beer, how much Ale and Beer should the
brewer produce in order to maximize his profit?
4. A wheat and barley farmer has 168 hectare of ploughed land, and a capital of Shs.
2,000. It costs Shs. 14,000 to sow one hectare wheat and Shs. 10,000 to sow one
hectare of barley. Suppose that his profit is Shs. 80,000 per hectare of wheat and
Shs. 55,000 per hectare of barley.
Required;
Find the optimal number of hectares of wheat and barley that must be ploughed in
order to maximize profit? What is the maximum profit?
5. BBA Company manufactures two electrical products: air conditioners and large
fans. The assembly process for each is similar in that both require a certain amount
of wiring and drilling. Each air conditioner takes 3 hours of wiring and 2 hours of
drilling. Each fan must go through 2 hours of wiring and 1 hour of drilling. During
the next production period, 240 hours of wiring time are available and up to 140
hours of drilling time may be used. Each air conditioner sold yields a profit of Shs.
25,000. Each fan assembled may be sold for a profit of Shs. 15,000.
Required:
Formulate and solve this linear programming mix situation to find the best
combination of air conditioners and fans that yields the highest profit.
6. A manufacturer of lightweight mountain tents makes a standard model and an
expedition model for national distribution. Each standard tent requires 1 labour
hour from the cutting department and 3 labour hours from the assembly
department. Each expedition tent requires 2 labour hours from the cutting
department and 4 labour hours from the assembly department. The maximum
labour hours available per day in the cutting department and the assembly
department are 32 and 84 respectively. If the company makes a profit of Shs.
50,000 on each standard tent and Shs. 80,000 on each expedition tent, use the
graphical method to determine how many tents of each type should be
manufactured each day to maximize the total daily profit?
7. A manufacturing plant makes two types of inflatable boats, a two-person boat and
a four person boat. Each two-person boat requires 0.9 labour hours from the
cutting department and 0.8 labour hours from the assembly department. Each
four-person boat requires 1.8 labour hours from the cutting department and 1.2
Page 18 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
labour hours from the assembly department. The maximum labour hours available
per month in the cutting department and the assembly department are 864 and
672 respectively. The company makes a profit of Shs. 25,000 on each two-person
boat and Shs. 40,000 on each four-person boat. Use the graphical method to find
the maximum profit.
8. BESCO Engineering produces chairs and tables. Each table takes four hours of
labour from the carpentry department and two hours of labour from the finishing
department. Each chair requires three hours of carpentry and one hour of
finishing. During the current week, 240 hours of carpentry time are available and
100 hours of finishing time. Each table produced gives a profit of Shs. 70,000 and
each chair a profit of Shs. 50,000.
Required:
Determine how many chairs and tables should be made in order to maximize profit?
9. A company manufactures two products X and Y. Each product has to be processed
in three departments: welding, assembly and painting. Each unit of X spends 2
hours in the welding department, 3 hours in assembly and 1 hour in painting. The
corresponding times for a unit of Y are 3, 2 and 1 respectively. The man-hours
available in a month are 1,500 for the welding department, 1,500 in assembly and
550 in painting. The contribution to profits and fixed overheads are Shs. 100,000
for product X and Shs. 120,000 for product Y.
Required:
Formulate the appropriate linear programming problem and solve it graphically to
obtain the optimal solution for the maximum contribution.
10.Suppose a manufacturer of printed circuits has a stock of 200 resistors, 120
transistors and 150 capacitors and is required to produce two types of circuits.
Type A requires 20 resistors, 10 transistors and 10 capacitors.
Type B requires 10 resistors, 20 transistors and 30 capacitors.
If the profit on type A circuits is Shs. 5,000 and that on type B circuits is Shs. 12,000,
how many of each circuit should be produced in order to maximize profit?
11.A small company builds two types of garden chairs.
Type A requires 2 hours of machine time and 5 hours of craftsman time.
Type B requires 3 hours of machine time and 5 hours of craftsman time.
Each day there are 30 hours of machine time available and 60 hours of craftsman
time. The profit on each type A chair is Shs. 60,000 and on each type B chair is Shs.
Page 19 of 21
| Emma Charles – 0753-236-367/0787-080-333 Win 10 Pro
Page 21 of 21