Linear-Programming
Linear-Programming
Linear Programming
Let x = 0; Let x = 0;
0 + 3y = 200 2(0) + y = 300
y = 66.67 y = 300
y - intercept (0, 66.67) y - intercept (0, 300)
Step 3. Plot the x and y intercepts in the coordinate plane.
(0,300) 300
250
200
150
50
250
x + 3y ≤ 200
200
0 + 3(0) ≤ 200
150
0 ≤ 200
100
True Statement (0. 66.67)
50
2x + y ≤ 300
2(0) + 0 ≤ 300 50 100 150 200 250 300 350 400
(150,0) (200,0)
0 ≤ 300 x + 3y = 200
True Statement
2x + y = 300
Determine the point of intersection of the boundary lines.
x + 3y = 200
2x + y = 300 (multiply each term by -3)
x + 3y = 200
Elimination x + 3y = 200 Elimination 140 + 3y = 200
by -6x -3y = -900 by 3y = 200 – 140
addition substitution y = 60/3
-5x = -700
y = 20
x = 140
250
200
150
100
(0. 66.67)
50
(140,20)
2x + y = 300
The vertices are (0,66.67), (150,0), and (140,20).
Step 5. Substitute the value of the vertices into the Objective Function :
Maximize P = 20x + 30y
For vertex (0,66.67) For vertex (150,0) For vertex (140,20)
Therefore, the firm should produce 140 units of product A and 20 units of product B to
get a maximum profit of php3,400.00.
Example 2 : Ayala Company manufactures two products: A and B. Each unit of product
A contains 2 kilos of aluminum and 1 kilo of steel. Each unit of B contains 14 kilos of
aluminum and 2 kilos of steel. Ayala has an available supply of 70 kilos of aluminum and
20 kilos of steel. Ayala makes a profit of $20 on each unit of A and $50 on each unit of B.
Find Ayala Company's maximum profit and the number of units of products A and B it
must manufacture in order to obtain its maximum profit.
Content Product A Product B Availability
Solution : Aluminum 2 14 70
Steel 1 2 20
Step 1 : Formulate the LPP
x = no. of units (Product A) ⮚ Constraints: 2x + 14y ≤ 70
⮚ Define Decision Variables:
y = no. of units (Product B) x + 2y ≤ 20
30
25
20
15
(0,10) 10
(0. 5) 5
5 10 15 20 25 30 35 40 2x + 14y = 70
(20,0) (35,0)
x + 2y = 20
Step 4. Find the feasible region. Determine the vertices of the feasible
region. 30
25
2x + 14y ≤ 70
2(0) + 14(0) ≤ 70 20
0 ≤ 70 15
(0. 5) 5
x + 2y ≤ 20
0 ≤ 20
5 10 15 20 25 30 35 40
0 + 2(0) ≤ 20 2x + 14y = 70
(20,0) (35,0)
True Statement
x + 2y = 20
Determine the point of intersection of the boundary lines.
2x + 14y = 70
x + 2y = 20 (multiply each term by -2)
x + 2y = 20
Elimination 2x + 14y = 70 Elimination
x + 2(3) = 20
by addition -2x - 4y = -40 by
x = 20 - 6
10y = 30 substitution
x = 14
y = 3
25
20
15
(0,10) 10
(0. 5) 5 (14,3)
5 10 15 20 25 30 35 40
(20,0) (35,0) 2x + 14y = 70
x + 2y = 20
The vertices are (0, 5), (20,0), and (14,3).
Step 5. Substitute the value of the vertices into the Objective Function :
Maximize P = 20x + 50y
For vertex (0, 5) For vertex (20,0) For vertex (14, 3)
Solution : x
x
y 150
25
y 40
Step 1 : Formulate the LPP
x + y ≤ 150
x = no. of first-class ticket ⮚ Constraints: x ≥ 25
⮚ Define Decision Variables:
y = no. of coach ticket y ≥ 40
x + y = 150 x = 25 y = 40
y = 0;
x + 0 = 150
x = 150
x - intercept (150, 0)
x = 0;
0 + y = 150
y = 150
y - intercept (0, 150)
Step 3. Plot the x and y intercepts in the coordinate system.
250
200
(0,150) 150
100
50
y = 40
(150,0)
50 100 150 200 250
x = 25
x + y = 150
Step 4. Find the feasible region. Determine the vertices of the feasible
region.
x + y ≤ 150 x ≥ 25 y ≥ 40
0 + 0 ≤ 150 0 ≥ 25 0 ≥ 40
0 ≤ 150
False Statement False Statement
True Statement
250
200
(0,150) 150
100
50
y = 40
x + y = 150
Determine the point of intersection of the boundary lines.
x+ y = 150 x+ y = 150
y = 40 x = 25
x + y = 150
Elimination by Elimination by x + y = 150
Substitution x + 40 = 150 Substitution 25 + y = 150
x = 150 - 40 y = 150 - 25
x = 110 y = 125
Point of intersection (110, 40) Point of intersection (25, 125)
250
200
(0,150) 150
(25,125)
100
(25,40) (110,40)
50
y = 40
x = 25 x + y = 150
The vertices are (110, 40), (25, 125), and (25, 40)
Step 5. Substitute the value of the vertices into the Objective Function :
Maximize P = 200x + 225y
For vertex (110,40) For vertex (25, 125) For vertex (25, 40)
P = 200(110) + 225(40) P = 200(25) + 225(125) P = 200(25) + 225(40)
P = 22,000 + 9,000 P = 5,000 + 28,125 P = 5,000 + 9,000
P = $31,000 P = $33,125 P = $14,000
Therefore, the airline should sell 25 first-class tickets and 125 coach tickets in order to
maximize profits equivalent to $33,125.
Example 4 : A diabetic patient needs to take at least 40 units of vitamin A, at least 30 units
of vitamin C, and at least 30 units of vitamin E each day. Each Brand A capsule contains 4
units of vitamin A, 6 units of vitamin C, and 2 units of vitamin E; each Brand B capsule
contains 5 units of vitamin A, 3 units of vitamin C, and 5 units of vitamin E. If each brand A
capsule costs $6 and each brand B capsule costs $9, how many brand A and brand B
capsules should the patient take each day in order to minimize the cost?
Vitamin Brand A Brand B Need to take
A 4 5 40
Solution : C 6 3 30
⮚ Constraints: 4x + 5y ≥ 40
⮚ Define Decision Variables: x = no. of brand A 6x + 3y ≥ 30
y = no. of brand B 2x + 5y ≥ 30
x = 0; x = 0;
x = 0;
4(0) + 5y = 40 6(0) + 3y = 40 2(0) + 5y = 30
y= 8 y = 10 y= 6
y - intercept (0, 8) y - intercept (0, 10) y - intercept (0, 6)
Step 3. Plot the x and y intercepts in the coordinate system.
12
(0,10) 10
(0.8) 8
(0,6) 6
2 4 6 8 10 12 14 16
(5. 0) (10. 0) (15,0)
2x + 5y = 30
6x + 3y = 30 4x + 5y = 40
Step 4. Find the feasible region. Determine the vertices of the feasible
region.
4x + 5y ≥ 40 6x + 3y ≥ 30 2x + 5y ≥ 30
4(0) + 5(0) ≥ 40 6(0) + 3(0) ≥ 30 2(0) + 5(0) ≥ 30
0 ≥ 40 0 ≥ 30 0 ≥ 30
(0,10) 10
(0.8) 8
(0,6) 6
2 4 6 8 10 12 14 16
(5. 0) (10. 0) (15,0)
2x + 5y = 30
6x + 3y = 30 4x + 5y = 40
Determine the point of intersection of the boundary lines.
6x + 3y = 30
Elimination by 30x + 15y = 150 Elimination by 6(1.67) + 3y = 30
-12x - 15y = -120 substitution 3y = 30-10.02
addition
18x = 30 y = 19.98/3
x = 1.67 y = 6.66
2x + 5y = 30
4x + 5y = 40
2x + 5y = 30 Elimination 2x + 5y = 30
Elimination
-4x - 5y = -40 by 2(5) + 5y = 30
by
substitution 10 + 5y = 30
Subtraction -2x = -10
5y = 20
x = 5 y= 4
(0,10) 10
(0.8) 8
(1.67,6.66)
(0,6) 6
(5,4)
4
2 4 6 8 10 12 14 16
(5. 0) (10. 0) (15,0)
2x + 5y = 30
6x + 3y = 30 4x + 5y = 40
The vertices are (0,10), (1.67,6.66), (5,4), and (15,0).
Step 5. Substitute the value of the vertices into the Objective Function :
Minimize C = 6x + 9y
For vertex (0, 10) For vertex (1.67, 6.67) For vertex (5, 4) For vertex (15, 0)
C = 6x + 9y C = 6x + 9y C = 6x + 9y C = 6x + 9y
C= 6(0) + 9(10) C = 6(1.67) + 9(6.67) C = 6(5) + 9(4) C = 6(15) + 9(0)
C = $90 C = 10.02 + 60.03 C = $66 C = $90
C = $70.05
Therefore, the patient must take 5 brand A capsules and 4 brand B capsules per day
in order to minimize the cost to $66.
Example 5 : Professor James wishes to employ John and Marsha to grade papers for
his classes. John can grade 20 papers per hour. He earns $15 per hour. Marsha can
grade 30 papers per hour. She earns $25 per hour. Each must be employed at least
one hour a week. If Professor James has at least 110 papers to be graded each week,
how many hours per week should he employ each person to minimize the cost?
John Marsha Graded Papers No. of hrs Required to be employed
20 30 110
Solution : x 1
Step 1 : Formulate the LPP y 1
x = 5.5 y = 3.67
4
(0.3.67)
3
y=1 1
1 2 3 4 5 6 7 8
(5.5,0)
x=1 20x + 30y = 110
Step 4. Find the feasible region. Determine the vertices of the feasible
region.
4
(0.3.67)
3
y=1 1
1 2 3 4 5 6 7 8
(5.5,0)
x=1 20x + 30y = 110
Determine the point of intersection of the boundary lines.
4
(0.3.67)
3 (1.3)
2
(4,1)
y=1 1
1 2 3 4 5 6 7 8
(5.5,0)
x=1 20x + 30y = 110
The vertices are (1,3), and (4,1)
Step 5. Substitute the value of the vertices into the Objective Function :
Maximize C = 15x + 25y
For vertex (1,3) For vertex (4,1)
P = 15 (1) + 25(3) P = 15 (4) + 25(1)
P = 15 + 75 P = 60 + 25
P = $90 P = $85
Therefore, Professor James should employ John for 4 hours a week, and
Marsha for 1 hour a week at a minimum cost of $85 per week.