W23L_Linear Programming Using Graphical Method
W23L_Linear Programming Using Graphical Method
Lecture week 23
Important Notice:
Please bring scale, pencil and A4 graph paper on
your tutorial classes .
Unexpected Goals in Football….
3
Group Course Work …
Warning:
London Metropolitan University and Islington
College takes Plagiarism seriously. Offenders will be
dealt with sternly.
Topics to be covered for GW…
Decision Variables
Objective Function
Constraints
LPP Example :
Problem 1:
A watch dealer wishes to buy new watches and has two models M1
and M2 to choose from. Model M1 costs $100 and M2 costs $200.In
view of the showcase of the dealer, he wants to buy watches not
more than 30 and can spend up to $4000. The watch dealer can
make a profit of $20 in M1 and $50 in M2.How Many of each model
should he buy to obtain maximum profit?
LPP Example :
Problem analysis: Watch
Dealer
Model M1 Model M2
For Constraints:
x + y 30 (Showcase Constraints)
100x + 200y 4000 (Investment Constraints)
x,y0 (Non negativity Constraints)
LPP Example :
Problem 2:
A manufacturer produces cycles and scooters, each of which must be processed
through two machines A and B. Machine A has a maximum of 120 hours
available and machine B has a maximum of 180 hours available. Manufacturing a
cycle requires 6 hours in machine A and 3 hours in machine B . Manufacturing a
scooter requires 4 hours in machine A and 10 hours in machine B .If profits are
$45 for cycle and $55 for a scooter ,formulate a mathematical model for the
maximization of the profits .
LPP Example : For cycle 6 hours in 3 hours in
Machine A machine B
Problem analysis:
For Scooter 4 hours in 10 hours in
Machine A machine B
Manufacturer
Profit $45 from $55 from
cycle scooter
For Constraints:
6x + 4y 120 (Machine A Constraints)
3x + 10y 180 (Machine B Constraints)
x,y0 (Non negativity Constraints)
Any Questions?
LPP Example :
Problem 3:
A manufacturer of furniture’s makes two products - chairs and tables. Processing
of these products is done on two machines A and B . A chair requires 2 hours on
machine A and 6 hours on machine B. A table requires 5 hours on machine A and
requires no time in machine B. There are 16 hours of time per day available on
machine A and 30 hours on machine B. Profit gained by the manufacturer from a
chair and a table is $ 1 and $ 5 respectively. Formulate the mathematical model
to maximize the profit.
LPP Example :
Problem 4:
Food X contains 5 units of vitamin A and 6 units of vitamin B per gram and cost
20 paisa/gram. Food Y contains 8 units of vitamin A and 10 units of vitamin B per
gram and costs 30 paisa/gram. The minimum daily requirements of A and B are
80 units and 100 units respectively. Formulate the above as a L.P. problem to
minimize the cost.
LPP Example :
Problem 5:
Suppose that 8, 12 and 9 units of protein, carbohydrates and fats respectively
are the minimum weekly requirements for a person. Food A contains 2, 6 and 1
units of protein, carbohydrate and fat respectively per kg. , food B contains 1, 1
and 3 units respectively per kg. and food C contains 2 ,3 and 2 units respectively
per kg. If A costs $ 85 per kg , B costs $ 40 per kg and C costs $30 per kg; how
many kgs of each should he buy per week to minimize his cost and still meet his
minimum requirements? Formulate the above problem as a linear programming
problem.
LPP Using Graphical Method :
Problem :
A factory uses three different resources for the manufacture of two different
products, 20 units of resource A, 12 units of resource B and 16 units of C
being available. One unit of first product requires 2, 2 and 4 units of the
respective resources and 1 unit of the second product requires 4, 2 and 0
units of the respective resources. It is known that the first product gives a
profit of $ 2 per unit and the second $3. Formulate the linear programming
problem to find the number of units of each product that should be
manufactured for maximizing the profit.
Solve it graphically.
Example – Graphical Solution…
Problem analysis: Factory
Resource Available
A 2 4 20
B 2 2 12
C 4 0 16
Profit $2 $3 27
Example – Graphical Solution…
Mathematical formulation :
• For Decision variables:
Let x and y be the numbers of units of products 1st and 2nd should be produced in order to maximize the
profit and meet the requirements.
• For Objective function:
Total profit = 2x + 3y
Let Z = 2x + 3y
Maximize Z = 2x + 3y
• For Constraints:
2x + 4y 20 (Resource A constraints)
2x + 2y 12 (Resource B constraints)
4x + 0y 16 (Resource C constraints)
x ,y 0 (Nonnegative constraints )
Example – Graphical Solution…
Graphical Solution :
For Graphical solution:
Changing the above inequalities to equalities, we get,
2x + 4y = 20 …… i
2x + 2y = 12 ….. ii
4x + 0y = 16 …..iii
For graphing equation (i)
2x +4y = 20
Put x = 0 , y = 5
Put y = 0 , x = 10
Equation (i) passes through ( 0 , 5 ) and ( 10 , 0)
Origin test :
Put x = 0 and y = 0 in the 2x + 4y ≤ 20
0 ≤ 20 which is true, so the origin lies inside equation (i)
Example – Graphical Solution…
For graphing equation (ii)
2x + 2y = 12
Put x = 0 , y = 6
Put y = 0 , x = 6
Equation (ii) passes through (0 , 6 ) and ( 6 , 0)
Origin test:
Put x = 0 and y = 0 in the 2x + 2y ≤ 12
0 ≤ 12 which is true, so the origin lies inside equation (ii)
For graphing equation (iii)
4x + 0y = 16
This is a straight line perpendicular to x axis i.e x = 4
Origin test :
Put x = 0 and y = 0 in the 4x + 0y ≤ 16
0 ≤ 16 which is true, so the origin lies inside equation (iii)
Example – Graphical Solution…
• Graphical representation of equations:
Example – Graphical Solution…
• From Graph OABCD Is the feasible region:
Vertex x y Z = 2x + 3y
O(0,0) 0 0 0
A(4,0) 4 0 8
B(4,2) 4 2 14
C(2,4) 2 4 16 Maximum value
D(0,5) 0 5 15
Conclusion:
Hence the maximum value of Z will be 16 when x = 2 and y = 4, therefore the factory should
produce 2 units of 1st product and 4 units of 2nd product in order to get the maximum profit
of $ 16.
Summary: