You are on page 1of 58

FHMM1314

Mathematics for Business I

Topic 3:
Linear Programming

1
Subtopics
 Linear Programming Problems

 Graphical Solution of Linear Programming


Problems

2
Introduction
 Linear Programming (LP) describes the
graphical and mathematical procedures that
seek the optimum allocation of scarce or limited
resources to competing products or activities.
 The term linear implies that the elements in a
situation are so related that they appear as
straight lines when graphed.
 The word programming refers to forming a
mathematical model (or set of inequalities)
which defines the particular situation.
Linear Programming Problem
All linear programming (LP) problems have
three common components: 
1. A linear objective function;
2. A set of linear structural constraints;
3. A set of non-negativity variables.
 
Linear Programming Problem
1. Linear objective function
A mathematical statement of what one wishes
to achieve. In business, this function is usually
maximization of profit, minimization of costs
or some other measurable objective.
Linearity implies that the parameters of the
objective function are fixed, for example, a
constant cost per unit or constant contribution
to profit per unit .
Linear Programming Problem
2. Linear structural constraints
The physical limitations on the objective
function represented by a system of linear
inequalities. They could be limitations on the
availability of the resources such as materials,
labour, funds and time or output that imposed
on the solutions.
Linearity means that all these constraints have
fixed coefficients and can be represented by
straight lines on a graph. 
Linear Programming Problem
3. Non-negativity variables
The non-negativity variables limit the
solution to positive and meaningful answers.
 
Formulate of a LP Problem
Three steps to formulate a LP Problem are:

Step 1 : Define the decision variables.

Step 2 : Formulate the objective function.

Step 3 : Formulate the linear constraint/ restriction


functions.
Formulation of LP Problem
Step 1 : Define the decision variables.
For example, if a company makes 3 products A, B and
C and it wishes to maximise its profit. Then the
decision variables are the unknown quantities of
products A, B and C that we need to decide to produce
in order to maximise profit.
Hence assign alphabets to the decision variables. In the
example, we would have:
Let x = number of units of A produced.
y = number of units of B produced.
z = number of units of C produced.
Formulation of LP Problem
Step 2 : Formulate the objective function.
The objective function will be expressed in terms of the
decision variables with the objective indicated, that is
whether Maximise or Minimise.

If in the example, the profit per unit from A, B and C are


RM 5, RM 4 and RM 3 respectively, then in the solution,
we would have: Maximise P = 5x +4y + 3z
where P = total profit (in RM),
x, y and z are the decision variables.
Formulation of LP Problem
Step 3 : Formulate the linear constraint/ restriction
functions.

Non-negativity constraints should be included for the


decision variables as the variables in LP problem should
usually be non-negative in value.

The constraints in a linear programming model are sets


of conditions which any solution must satisfy.
Example 3.1
(Formulate LP maximisation Problem)
A factory manufactures two types of toys, X and Y, which are made
of wood and rubber. To make one unit of X, 1 unit of wood and 2
units of rubber are needed. For one unit of Y, 1 unit of wood and 1
unit of rubber are needed. The daily amount of wood and rubber
available for production are 800 and 1000 units respectively. The
daily production capacity of the factory for toys X and Y are 350
and 700 respectively. The net profit obtained from the sales of toys X
and Y are RM4 and RM3 per unit respectively. Construct the
mathematical model for this situation with a view to deciding the
number of toys X and Y should be produced in order to maximise the
profit.
Example 3.1 Solution
Let x = number of units of toy X produced
y = number of units toy Y produced
P  Profit (RM)
Maximise P  4 x  3 y objective
function
subject to x  y  800
2 x  y  1000 constraints
decision
variables x  350
y  700
Non-negativity
variables
x  0, y  0
Example 3.2
Formulate LP maximisation problem
A company manufactures three products, A, B and C. Each product is made by the
same grades of labour, and the time required to make one unit of each product is as
follows. S A B C
Skilled labour 3 hours 4 hours 1 hour
Unskilled labour 2.5 hours 2 hours 6 hours

The variable costs per unit of A, B and C are RM 28, RM 30 and RM 26


respectively. The products sell for RM 40, RM 40 and RM 34 respectively. In the
coming month, the company expects to have at most 600 hours of skilled labour
and at most 2000 hours of unskilled labour available. There is a minimum
requirement for 40 units of B and 120 units of C in the month. Formulate a linear
programming problem to maximise the profit.
Example 3.2 (Solution)
Let x = number of units of product A produced.
y = number of units of product B produced.
z = number of units of product C produced.
P = Total profit (RM)
Objective: Maximise P = 12x + 10y + 8z
subject to the constraints:
3x  4 y  z  600 (skilled labour)
2.5x +2y +6z  2000 (unskilled labour)
y  40 (requirement for B)
z  120 (requirement for C)
x  0 (non-negativity)
Methods to Solve LP Problem
There are 2 methods to solve LP problems
1) Graphical Method
Used to solve LP problems involving only
2 variables.
2) Simplex Method / Computer software
An algebraic method to solve LP
problems which involve 2 or more
variables (will not be included here).
Steps to Solve a LP Problem
(Graphical Method)
Step 1 Identify the problem
Step 2 Define the decision variables
Step 3 Formulate the objective function (maximization or minimization)
Step 4 Formulate the linear constraint/ restriction functions
Step 5 Plot the linear constraint functions on the graph paper
Step 6 Define the feasible region (bounded or unbounded region)
Step 7 Find the optimal point (corner point or graphing objective function)
Step 8 Compute the value of the best / optimal solution
Step 9 Make conclusion
Graphical Method

Solving the LP problem in Example 3.1:


Maximise P  4 x  3 y
subject to x  y  800
2 x  y  1000
x  350
y  700
x  0, y  0
Graphical Method
Step 1 : Draw the axes that represent x and y with
the appropriate scales.
y
1000
900
800
700
600
500
400
300
200
100 x
0
0 200 400 600 800 1000
Graphical Method
Step 2 : Plot the constraint equation x + y = 800 on the
graph using x-intercept and y-intercept values.
y
1000
900
800
700
600
x + y = 800
500
400
300
200
100 x
0
0 200 400 600 800 1000
Graphical Method
Step 2 : Continue to plot the constraint equations
2x + y = 1000, x = 350 and y = 700 on the graph.
y x = 350
1000
900
2x + y = 1000
800
y = 700
700
600
500
400
300
x + y = 800
200
100 x
0
0 200 400 600 800 1000
Graphical Method
To decide which side is appropriate to satisfy the
inequality constraint, the easiest test is to see :

 if the origin (i.e. x = 0, y = 0) satisfies the


inequality, then all points on the same side of the
line as the origin form the remaining solutions;

 if it does not, then all points on the opposite


side of the line from the origin form the
remaining solution.
Graphical Method
Feasible region
Region that satisfies all the inequality constraints
is called the feasible region. Every point lies
within this region (including points located on
the boundaries) is known as a feasible solution to
the LP problem.

A corner point or vertex of the feasible region


that satisfies the objective function is the optimal
point that provides the optimal solution to the LP
problem.
Graphical Method
Step 3 : Shade the feasible region that satisfies all the
constraints.
y x = 350
1000
900
2x + y = 1000
800
y = 700
700
600
500
400
300 Feasible
Feasible x + y = 800
200 Region
region
100 x
0
0 200 400 600 800 1000
Graphical Method
Step 4 : Identifying the optimal point and optimal
solution.
The manufacturer wishes to obtain maximum profit and
the objective function is P = 4x + 3y.

Step 4 : Method I

1. Calculating the contribution at all the corner points/


vertices.
2. For maximization problems:
The optimal solution will be at the point that yields
the greatest contribution.
Graphical Method
Step 4 : Method I
y x = 350 Point P = 4x + 3y
1000
900 A = (350,0) 1400
2x + y = 1000
800 B = (350,300) 2300
700
ED y = 700
600 C C = (200,600) 2600
500 D = (100,700) 2500
400
300 Feasible B E = (0,700) 2100
x + y = 800
200 Region F = (0,0) 0
100
0
F A x
0 200 400 600 800 1000 Optimal point = Point C
= (200,600)
Optimal solution = RM 2600
Graphical Method
Step 4 : Method II

1. Assigning different values to the objective (profit) function


P = 4x + 3y, we obtain a family of parallel lines called
iso-profit lines.
Let P = 1200
-The objective function becomes the line 4x + 3y = 1200.
-Sketch the line 4x + 3y = 1200 onto the graph.
2. Use iso-profit-lines to find the furthest-from-the-origin
line, P of the same slope as the line drawn which still cuts
one of the vertices/ corner points of the feasible region; the
furthest vertex at which it cuts being the optimal point.
Graphical Method
Step 4 : Method II
y x = 350
1000
900
2x + y = 1000
800
y = 700
700
600 (200, 600)
500
400
300 Feasible
x + y = 800
200 Region
100 4x + 3y = 1200 x
0
0 200 400 600 800 1000
Graphical Method
Step 4 : Method II

Use iso-profit lines, the optimal point is found at (200,


600).

By substituting x =200,3(600)
P  4(200) y = 600 into the objective function,
we obtain:
 2600

Optimal Solution = RM 2600


Graphical Method
Step 5 : Make conclusion
The conclusion should include optimal point and optimal
solution.

The manufacturer should produce 200 units of toy X and


600 units of toy Y per day in order to obtain a maximum
profit of RM 2600.
Graphical Method
Step 6 : Checking (Optional)
The optimal point is the point of intersection of
constraints x + y = 800 and 2x + y = 1000.
To determine the optimal point accurately, we solve
the following simultaneous equations:
2 x  y  1000 x  y  800

The solution for the above equations are


x  200, y  600 ( same as the graphical solution)
Example 3.3
( Formulate LP Minimisation Problem)
Puan Siti has a few cats which consume at least 6 units of special
diet per month. The special diet is prepared by mixing two
types of ingredients M1 and M2 . Each ingredient contains three
types of nutrients K1 , K2 and K3 which are needed by the cats.
One unit of ingredient M1 contains 4 units of K1 , 1 unit of K2
and 1 unit of K3 while one unit of M2 contains 1 unit of K1, 2
units of K2 and 5 units of K3. To keep her cats healthy, Puan
Siti consults a veterinarian expert who advised that her cats need
at least 8 units of K1 , 8 units of K2 and 10 units of K3 in
special diet. One unit of M1 cost RM5 while one unit of M2
costs RM7. Puan Siti wants to prepare the special diet with the
lowest cost while at the same time satisfying her cats’ nutritional
requirements. Formulate this as a linear programming
problem.
Example 3.3 Solution
Let x = Amount of ingredient M1 bought
y = Amount of ingredient M2 bought
C = total cost (RM)
Minimise C  5 x  7 y
subject to x  y  6
4x  y  8
x  2y  8
x  5 y  10
x  0, y  0
Graphical Method
Solving the LP problem in Example 3.3:
Minimise C  5 x  7 y
subject to x y 6
4x  y  8
x  2y  8
x  5 y  10
x  0, y  0
Graphical Method
Step 1:
Plot all the constraint equations on a graph using x-
intercept and y-intercept values.

x y 6 4x  y  8 x  2y  8 x  5 y  10
x  0, y  6 x  0, y  8 x  0, y  4 x  0, y  2
y  0, x  6 y  0, x  2 y  0, x  8 y  0, x  10
Graphical Solution
y
10
9
8
7 4x + y = 8
6
5 x+y=6
4
3
2 x + 2y = 8
1 x + 5y = 10 x
0
0 2 4 6 8 10
Graphical Solution
Step 2: Identify the feasible region.
y
10
9
8 Feasible
7 4x + y = 8 Region
6
5 x+y=6
4
3
2 x + 2y = 8
1 x + 5y = 10
x
0
0 2 4 6 8 10
Graphical Solution
Step 3: Identifying the optimal point and optimal solution.

Method I:
1. Calculating the contribution at all the corner points.
2. For minimisation problems:
- Optimal point is the point that gives the least value.
Graphical Solution
Step 3: Method I
y Point C = 5x + 7y
10
9 A = (0,8) 56
8 A Feasible
7 4x + y = 8 Region B = (0.6,5.4) 40.8
6 C = (4,2) 34
B
5 x+y=6
4 D = (6.6,0.6) 37.2
3 E = (10,0) 50
C x + 2y = 8
2
1 D x + 5y = 10
E x
0
0 2 4 6 8 10
Optimal point = Point C
= (4,2)
Optimal solution = RM 34
Graphical Solution
Step 3:
Method II :
1. Assigning different values to the objective (cost) function
C = 5x + 7y , we obtain a family of parallel lines called
iso-cost lines.
Let C = 35
-The objective function becomes the line 5x + 7y = 35.
-Sketch the line 5x + 7y = 35 onto the graph.
2. Use iso-cost lines to find the nearest-from-the origin line, C
of the same slope as the line drawn which still cuts one of the
corner points of the feasible region; the nearest point at
which it cuts being the optimal point.
Graphical Solution
y
10
9
8 A Feasible
7 4x + y = 8 Region
6 B
5 x+y=6
4
5x + 7y = 35
3
2
C
x + 2y = 8
1 D x + 5y = 10
E x
0
0 2 4 6 8 10
Graphical Solution
Use iso-cost lines, the optimal point is found at C (4, 2).
By substituting optimal solution x = 4 and x = 2 to
objective function:
Optimal solution, C  5(4)  7(2)
 RM 34
Graphical Solution
Step 4 : Conclusion

Puan Siti should mix 4 units of ingredient M1 and 2


units of ingredient M2 to prepare the special diet for
her cats at a minimum cost of RM 34.
Graphical Solution
Step 5: Checking (Optional)
• From the graph, optimal solution is the intersection
of constraints
x+y=6
x + 2y = 8

• By solving the 2 constraints we get

x=4, y=2
Example 3.4
Using a graphical method, find the maximum
value of the function P = 15x + 10y subject to the
following inequalities :
2 x + y 10
-2x + y 2
x≥0,y≥0
Example 3.5
A factory uses three machines to manufacture two types of
products, A and B. The following table shows the capacities and
time taken by each machine to produce one unit of product A
and one unit of product B.
Product A Product B Capacity
(hours) (hours) (hours)
Machine 1 1 2 42
Machine 2 5 4 120
Machine 3 3 1 75
The profit obtained form each unit of A and B are RM8 and
RM10 respectively. Use the graphical method to determine the
optimum production of A and B to obtain the maximum profit.
Example 3.5 (Solution)
Let x = the number of product A to be produced
y = the number of product B to be produced
P = Profit (RM)
Maximize P  8 x  10 y
subject to x  2 y  42
5 x  4 y  120
3x  y  75
x  0, y  0
Example 3.6
A tyre factory needs to send at least 2000 tyres to
two warehouses. Each warehouse can store a
maximum of 1500 tyres. At present, the first
warehouse has 300 tyres in its store while the
second warehouse has 100 tyres. The
transportation cost per tyre from the factory to
the first and second warehouse is RM 4 and RM
8 respectively. How many tyres should be sent
to each warehouse so that the total transportation
cost is minimised?
Example 3.6 (Solution)
Let
x = Number of tyres to be sent to first warehouse
y = Number of tyres to be sent to second warehouse
C = Transportation cost (RM)

Minimise C  4 x  8 y
subject to x  y  2000
x  1200
y  1400
x  0, y  0
Example 3.7
A trader wants to make two types of cakes for sale. The
following table shows the amounts of two of the
ingredients required to make each cake and the profit
for each cake. The trader has a supply of 12 kg of
flour,10 kg of sugar every day.

Type of cake
Ingredients Cake A Cake B
Flour (g) 400 500
Sugar (g) 200 500
Profits ( RM ) 3 5
Example 3.7
(a)If x and y respectively denote the number of
cake A and cake B produced every day, write
down the inequalities that fulfill the conditions
above. The trader wishes to maximise his
daily profit, formulate the linear programming
problem.
(b) By using the graphical method, determine
the number of cake A and cake B that should
be produced every day so that the trader
maximises his daily profit and find the
maximum profit.
Example 3.7 (Solution)
Let x be the number of cake A produced
y be the number of cake B produced
Maximize P  3 x  5 y
Subject to 400 x  500 y  12000
 4 x  5 y  120
200 x  500 y  10000
 2 x  5 y  100
x  0, y  0
The End OF
TOPIC 3

You might also like