You are on page 1of 14

LINEAR

PROGRAMMING PREPARED BY

JEAN D. CENTINA
DAVAO DEL NORTE STATE COLLEGE

REFERENCE BOOKS:

pp. 209-234 of MATHEMATICS in the Modern World by Baltazar, Ragasa, and Evangelista

pp. 276-278 of Essentials of Mathematics by Nocon


Linear
Programming
• Widely used problem-solving method
• LP problem is to determine the optimal value of a linear function which
defines the objectives of the problem subject to a set of linear constraints.
• The constraints define the limit or decision environment of the problem.
• Optimal – the term that means maximizing profit or minimizing cost in a
specific context.
• Linear Programming models are used to assist people and organizations in
making decisions.
WATCH Linear Programming video in YouTube using these links:
https://www.youtube.com/watch?v=qQFAvPF2OSI
or
https://www.youtube.com/watch?v=FZ4DemFKqWE
Example 1.
A fruit shake stand sells banana and mango shakes. To be profitable it must sell at least 10 orders of
banana shakes and 30 orders of mango shakes per day. Due to limited space, however, no more than
40 orders of banana shakes or 70 orders of mango shakes can be served. Even the total number of
orders for the day cannot exceed 90. If profit is P40.00 for each banana shake sold and P32.00 for
each mango shake, how many of each kind should the vendor sell in order to maximize profit?

Step 1. Tabulate the information:


SHAKE FLAVOR PROFIT PER ITEM NUMBER SOLD TOTAL PROFIT PER ITEM
BANANA 40 X 40X
MANGO 32 Y 32Y
Step 2. Make the Objective function: maximize the total profit ( f ) for the day ( f is a function of x and y )
f (x,y) = 40x + 32y
Step 3. The f should be subjected to the constraints:
At least 10 but no more than 40 orders of banana shakes 10 < X < 40
At least 30 but no more than 70 orders of mango shakes 30 < Y < 70
Total number of orders for the day cannot be more than 90 X + Y < 90
80
Step 4. Graph the system of inequalities. Y = 70
10 < X < 40 60 A B
30 < Y < 70 C X + Y = 90
40
X + Y < 90 30 = Y D
E
a. By changing inequalities to equations
20 X = 40
1. 10 < X 10 = X or x =
10 = X
10
-20 20 40 60
2. X < 40 X = 40 x y
3. 30 < Y 30 = Y or Y = 0 90
30 90 0
4. Y < 70
Y = 70
5. X + Y < X + Y = 90
b. By90
plotting the points of the line
Step 5. Locate the vertices made by the
intersecting lines and determine the
coordinates of the vertices.
Vertex System Coordinates
(lines that intersect)
(x,y)
A X = 10 (10,70)
Y = 70
B X+Y = 90 (20,70)
Y = 70
C X+Y = 90 (40,50)
X = 40
A (10,70)
D X = 40 (40,30) B (20,70)
Y = 30 C (40,50)
D (40,30)
E X = 10 (10, 30) E (10, 30)
Y = 30
Step 6. Compute the value of f (x,y) = 40 X + 32 Y (This is done
for by substituting the
values of x and y in e f formula, and calculating.
th From step 2.
Vertex (X,Y) f (x,y) = 40x + 32y
A (10,70) f (10,70) = 40(10) + 32(70) = 2,640
Note:
B (20,70) f (20,70) = 40(20) + 32(70) = 3,040

The answer
(
4
0
,
5
0
)
,

c
o
m
Example 2
A calculator company produces scientific calculators and graphing calculators. Long-term projections
indicated an expected demand of at least 100 scientific calculators and 80 graphing calculators each day.
Because of limitations on production capacity, no more than 200 scientific calculators and 170 graphing
calculators can be made daily. To satisfy a shipping contract, a total of at least 200 calculators must be
shipped each day. If each scientific calculator sold result in in a P20.00 loss, but each graphing calculator
produces a P50.00 profit, how many of each type should be made daily to maximize net profit?
1. Tabulate the information:
CALCULATOR PROFIT / LOSS MADE DAILY TOTAL PROFIT OR LOSS PER
ITEM
Scientific -20 X -20X
Graphing 50 Y 50Y
2. Objective function: maximize the net profit (f) for the day
f (x,y) = -20x + 50y
3. The f should be subject to the following constraints:
At least 100 but no more than 200 scientific calculator 100 < X < 200
At least 80 but no more than 170 graphing calculator 80 < Y < 170
Total of at least 200 calculators shipped each day X + Y > 200
4. Graph the system of inequalities.
4. Graph the system of inequalities.
100 < X < 200 220

80 < Y < 170 200


Y = 170
180
X + Y > 200 160
E D
140

120
A
100 80 = Y B C
80

60

40
100 = X X = 200
20

20 40 60 80 100 120 140 160 180 200


220 X + Y = 200

x y
0 200
200 0
5. Determine the
coordinates of the vertices.
Vertex Coordinates
(x,y)
A (100,100)
B (120,80)
C (200,80)
D (200,170)
E (100,170)

=
6. Compute for maximum net profit (f) for the day 5. Determine the
f (x,y) = -20x coordinates of the vertices.
Vertex Coordinates
Vertex (X,Y) f (x,y) = -20x + 50y
+ A (100,100)
A (100,100) f (100,100) = -20(100) + 50(100) = B (120,80)
3,000 C (200,80)
50y
D (200,170)
B (120,80) f (120,80) = -20(120) + 50(80) = 1,600 E (100,170)

C (200,80) f (200,80) = -20(200) + 50(80) = 0

D (200,170) f (200,170) = -20(200) + 50(170) =


4,500 Note:
The answer
7. Determine the maximum value of f or profit that adheres to the constraints. (100,170),
E (100, 170) f (100,170) = -20(100) + 50(170) = adheres with the
The maximum value of f occurs at (100,170).
6,500 constraints:
Thus, the company should make daily 100 scientific calculators and 170 100 < X < 200
graphing calculators to maximize net profit. (at least 200 calculators shipped) 80 < Y < 170
(Answer.) X + Y > 200
Example 3.
A farmer can plant up to eight hectares of land with rice and corn. He can earn P5,000.00 for every hectare he plants with rice,
and P3,000.00 for every hectare he plants with corn. His use of necessary fertilizer is limited by the Credit Cooperative Policy of
10 gallons for his entire 8-hectare land. Rice requires 2 gallons of fertilizer for every hectare planted, and corn requires just 1
gallon per hectare. Find the farmer’s maximum profit.
1. TABULATE THE INFORMATION
CROP EARNING HECTARE PROFIT/CROP 7. Decide
The greatest profit is at (2, 6). The farmer must
RICE 5000 X 5000X 12

11
plant 2 hectares with rice and 6 hectares with corn
COR 3000 Y 3000Y to have the maximum profit of P28,000. answer.
N 10

2. Maximum profit (f) :


9
Note:
A (0,8) The answer (2, 6),
f (x,y) = 5000x + 3000y 8 2x + y = 10
3. Constraints for f : 4. Graph : 7
complies with the X+y=
x + y ≤8 x + y =8 constraints: 8x + 0 =
B (2,6)
x + y ≤8
6
2x + y ≤ 10 2x + y = 10 2
x>0 The farmer uses x=0 5 2x + y ≤ 10 x= 2
hectares for rice
y >0 and corn and not y = 0 4 x>0 In x + y = 8
0
5. Coordinates: y >0 2+y=8
x=0 3
A (0,8) B (2,6) C (5,0) D (0,0) Y=6
2
6. Calculate: f (x,y) = 5000x + 3000y D (0,0)
A (0,8) f (0,8) = 5000(0) + 3000(8) = 24000 1
C (5,0) y = 0
B (2,6) f (2,6) = 5000(2) + 3000(6) = 28000 1 3 4 5 6 7

C (5,0) f (5,0) = 5000(5) + 3000(0) = 25000 2


8 9
x y 11= 812 13 14

15
D (0,0) f (0,0) = 5000(0) + 3000(0) = 0 2x + y = 10
1. TABULATE THE INFORMATION
x y
source Yield Ton of ore Amount of Au
(g/ton) extract 0 8
A 57 X 57X 4 0

B 85 Y 85Y 2x + y = 8
y = 2x 7. Thus, 2 tons of ore from source A
2. Maximum amount of gold (f) :
f (x,y) = 57x + 85y
8
must be processed and 4 tons of ore
7 from source B must be processed to have a
3. Constraints for f : 4. Graph : x + y =3 6 maximum extract of 454 g of Gold. answ.
x + y ≥3 2x + y = 8 5
1000x + 500y ≤ 4000 y = 2x 4
(2,4)
y ≤ 2x x=0
y=0 (1,2) 3
x ≥0 2

y ≥ 0 (3,0)
1 (4,0)
5. Coordinates: 1 2 3 4 5 6 7 8 9 10
(4,0) (3,0) (1,2) (2,4) Example 4. A gold processor has two sources of gold ore, source A and source B. In
order to keep his plant running, at least 3 tons of ore must be processed each day. Ore
6. Calculate: f (x,y) = 57x + 85y from source A costs P1,000 and ore from source B costs P500 to process. Costs must
f (4,0) = 57(4) + 85(0) = 228 be kept to less than P4,000 per day. Moreover, government regulations require that
the amount of ore from source B cannot exceed twice the amount of ore from source
f (3,0) = 57(3) + 85(0) = 171 A. If ore from source A yields 57 grams of gold per ton, and ore from source B yields 85
f (1,2) = 57(1) + 85(2) = 227 grams of gold per ton, how many tons of ore from both sources must be processed
each day to maximize the amount of gold extracted subject to the above constraints?
f (2,4) = 57(2) + 85(4) = 454 (adapted from Wilson, 2014)
PRACTI Exercise A is similar to example 4 while exercise B is similar to example 1.
Write neatly your solutions on a paper and answer the questions posted in the google.

CE.
EXERCISE A.
A gold processor has two sources of gold ore, source A and source B. In order to keep his plant
running, at least 3 tons of ore must be processed each day. Ore from source A costs $20 and
ore from source B costs $10 to process. Costs must be kept to less than $80 per day.
Moreover, government regulations require that the amount of ore from source B cannot
exceed twice the amount of ore from source A. If ore from source A yields 2 oz. of gold per
ton, and ore from source B yields 3 oz. of gold per ton, how many tons of ore from both
sources must be processed each day to maximize the amount of gold extracted subject to
the above constraints? (adapted from Wilson, 2014)
EXERCISE B.
John, a school supply retailer, sells imported pencils and notebooks. He can regularly get between 400 and 500 pencils and
between 150 and 200 notebooks but no more than 650 items altogether. The pencils cost P18 to buy wholesale and sell for
P25 whereas the notebooks cost P28 wholesale but can be sold for P45. How many of each type should he acquire to make a
maximum profit. (PROBLEM 16 ON PAGE 280 OF ESSENTIALS OF MATHEMATICS IN THE MODERN WORLD.)
EXERCISE A.
1. TABULATE THE INFORMATION A gold processor has two sources of gold ore, source A and source B. In order to keep
Source Yield Ton of ore Amount of his plant running, at least 3 tons of ore must be processed each day. Ore from source A
of Gold (oz./ton) Gold extract costs $20 and ore from source B costs $10 to process. Costs must be kept to less than
ore $80 per day. Moreover, government regulations require that the amount of ore from
source B cannot exceed twice the amount of ore from source A. If ore from source A
A yields 2 oz. of gold per ton, and ore from source B yields 3 oz. of gold per ton, how many
B tons of ore from both sources must be processed each day to maximize the amount of
gold extracted subject to the above constraints? (adapted from Wilson, 2014)
2. Maximum amount of gold (f) :

3. Constraints for f : 4. Graph :

5. Coordinates:

6. Calculate:

You might also like