Linear Programming Graphical Method
Linear Programming Graphical Method
Linear Programming Graphical Method
Example:
Consider a small business to own just one production machine with a
capacity of eight hours of work daily.
CONSTRAINT: The machine is available for only 8hrs/day
Possible
Hours/unit Profit/unit(Rs.)
product
A 2 3
B 4 7
C 1 2
D 5 6
E 3 4
LINEAR PROGRAMMING
LEVEL 1
A 8/2 = 4 4*3 = 12
B 8/4 = 2 2*7 = 14
C 8/1 = 8 8*2 = 16
A 2 ½ 3
B 4 3 7
C 1 4 2
D 5 1 6
E 3 2 4
LINEAR PROGRAMMING
A
Machine 1 Machine 1
B
C Available Available
D for for
E 8 hrs/day 8 hrs/day
CONSTRAINTS
LINEAR PROGRAMMING
A 2 ½ 4 8 3 12.0
B 4 3 2 1.3 7 9.10
C 1 4 8 1 2 2.0
D 5 1 1.6 4 6 9.60
E 3 2 2.7 2 4 8.0
LINEAR PROGRAMMING
Graphical Method:
• Can be used for not more than 3 variables
• NOT generally used for solving real – world LP
problems
Inequalities and equations
Say 5 watches cost Rs 2500
5X = Rs 2500
X = Rs 500/-
But many business problems cannot be expressed in the
form of nice, neat equations.
LINEAR PROGRAMMING
i.e., 5X ≤ Rs 2500/-
Example
Manufacture produces two products,
a) Automobile engine pistons
b) Connecting rod pins
Production of each product requires processing in two
departments,
(1) The lathe department
(2) The drill press department
Department 1 has upto 32 hours available.
Department 2 can handle upto 34 hours of work
LINEAR PROGRAMMING
Contd…….
Manufacturing one piston requires 3 hours in Dept.1
and 1 hour in Dept. 2
Manufacturing one pin requires 2 hours in Dept.1 and 4
hours in Dept.2
Profit contribution is Rs 5 per piston and Rs 6 per pin
Company has no difficulty in selling all the pistons and
pins it can produce.
Manufacturer’s problem is to determine the best
possible combination of pistons and pins to produce in
order to maximise profits.
NOTE: Possible profit is limited by time constraints in each
department
LINEAR PROGRAMMING
In mathematical form,
Maximise: P = 5X1 + 6X2
Subject to these constraints,
3X1 + 2X2 ≤ 32
X1 + 4X2 ≤ 34
X1 ≥ 0
X2 ≥ 0
Step 1 Formulate the problem mathematically
Step 2 Graph Constraint
Step 3 Test the corner points of the feasible solution.
GRAPHICAL METHOD
CONSTRAINT EQUATION 1
3X1 + 2X2 ≤ 32
Such that
X1 ≥ 0 ; X2 ≥ 0
FOR X1 = 0 X2 = 16
X2 = 0 X1 = 10⅔
X2
16 B(0,16)
14
12
10
3X1 + 2X2 ≤ 32
8
2 C(10⅔,0)
X1
A 4 8 12 16 20 24
GRAPHICAL METHOD
CONSTRAINT EQUATION 1
• Any combination of pistons & pins on line BC will use up
all the 32 hours available in Dept.1
• Example for 8 pistons & 4 pin
• Any point on left of line ( say 2,6) will result in unused
capacity
X2
16 B(0,16)
14
12
10
3X1 + 2X2 ≤ 32
8
6 (2,6)
4
2 C(10⅔,0)
X1
A 4 8 12 16 20 24
GRAPHICAL METHOD
CONSTRAINT EQUATION 1
• Any point on right of line (say 10,10) needs – exceed the number
of hours => any combination of pistons & rings which lie on right
side of line BC is not possible without violating the constraint
X2
16 B(0,16)
14
12
10 (10,10)
8
3X1 + 2X2 ≤ 32
6 (2,6)
4 (8,4)
2
C(10⅔,0)
X1
A 4 8 12 16 20 24
GRAPHICAL METHOD
CONSTRAINT EQUATION 2
X1 + 4X2 ≤ 34
Such that X1 ≥ 0 ; X2 ≥ 0
For X1 = 0 X2 = 8½
X2 = 0 X1 = 34
Similar logic for points lying on
a) the line EF
b) Left of line EF
c) Right of line EF
as that of constraint equation 1
X2
12
10
E(0,8½)
8
X1 + 4X2 ≤ 34
6
4
2 F(34,0)
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
X2
16 B(0,16)
14
Dept. 1
12
10
E(0,8½)
8 D
Dept. 2
6
44
2 C(10⅔,0) F(34,0)
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
• Any point outside the common area violates one or the other
constraint, or some resource remains underutilised.
For example
a) 2 pistons & 10 pins require
3(2) + 2 (10) = 26 hr of Dept.1
& 1(2) + 4(10) = 42 hr of Dept.2
X
Dept.1 underutilised & Dept.2 exceeded
2
16 B
14
12
10 (2,10)
E
8 D
6
44 (4,3)
(14,2)
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
X2
16 B
14
12
10 (2,10)
E FIGURE 6
8 D
6
44 (4,3)
(14,2)
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
What will be the most profitable combination of pistons & pins ?
Assume profit level of Rs 30
Rs 30 = Rs 5X1 + Rs 6X2
When X1 = 0 X2 = 5
& X2 = 0 X1 = 6
Check for profit level of Rs 45
X2
16 B
14 Note that all profit lines are parallel
12
10
E
8 D
6
45 = 5X1 + 6X2
4 30 = 5X1 + 6X2
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
• By going farther from the origin the value of profit function
increases
12
FIGURE 8
X2
16 B
14
12
45 = 5X1 + 6X2
6
4 30 = 5X1 + 6X2
2 C F
X1
A 4 8 12 16 20 24 28 32 36
LINEAR PROGRAMMING
Exchange Rates
Move/ Examine the four corner points
A(0,0) - No pin, no piston, no profit
10⅔ 0
1 1½ Rs 4
9⅔ 1½
1 1½ Rs 4
8⅔ 3
1 1½ Rs 4
7⅔ 4½
1 1½ Rs 4
6⅔ 6
Rs 69.33
6 7 Rs 72
LINEAR PROGRAMMING
What effect would a change in the profit contribution of each product have on the
feasible solution area? Or, did the objective function play any part in defining the
area of feasibility solutions? NO
X2
16 B
14
12
10
3X1 + 12X2 = 102
E
8 D
6 3X1 + 12X2 = 48
4
2
C F
X1
A 4 8 12 16 20 24 28 32 36
ALTERNATE OPTIMA
Can any change in the objective function alter the combination of pistons & pins?
Assume profit contribution is Rs 3 per piston and Rs 12 per pin
P = Rs 3X1 + Rs 12X2
Points Profit
A(0,0) 3(0)+12(0) =0
10
3X1 + 12X2 = 102
E NOTE: All points on line ED,
8 D
represent diff. combinations of
6 3X1 + 12X2 = 48
pistons & pins yield the same
4 maximum profit.
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
• Assume that the pistons and pins had to be processed in a third department having 60 hours
available.
• A piston requires two hours and a pin requires four hours in the third department.
Third Constraint: 2X1 + 4X2 ≤ 60 (Dept.3)
2
C F
X1
A 4 8 12 16 20 24 28 32 36
GRAPHICAL METHOD
A minimisation problem
Objective function is to minimise costs subject to certain constraints.
Suppose an animal food company has developed a new dog food consisting of
two ingredients, A and B, which cost Rs 3 and Rs 5 per pound respectively.
Each pound of ingredient A contains 6 units of protein, 2 units of fat and 2
units of carbohydrate.
Each pound of ingredient B contains 2 units of protein, 4 units of fat and 10
units of carbohydrates.
Each bag of the dog food should contain at least 18 units of protein, 16 units of
fat and 20 units of carbohydrates
Company’s problem is to find the best combination of ingredients A and B
which will meet the minimum requirements of protein, fat and carbohydrate at
the least cost
GRAPHICAL METHOD - minimisation problem
Units of Nutrients in
Ingredients Min units
Nutrients of Nutrient
A (Rs 3/lb) B (Rs 5/lb) required
Protein 6 2 18
Fat 2 4 16
Carbohydrate 2 10 20
GRAPHICAL METHOD - minimisation problem
• Let optimum combination of A & B = X1 & X2
• Minimise Cost C = Rs 3X1 + Rs 5X2
subject to constraints of
6X1 + 2X2 ≥ 18 units of protein
2X1 + 4X2 ≥ 16 units of fat
2X1 + 10X2 ≥ 20 units of carbohydrates
X1 ≥ 0 X2 ≥ 0
• Graph the equations of constraints
• Test the corner points of the feasible solutions area
o When both types of inequalities are involved
o When besides inequalities; equality also is involved
o Problem with no feasible solutions
o A three-dimensional problem
GRAPHICAL METHOD - minimisation problem
6X1 + 2X2 ≥ 18
6
6X1 + 2X2 ≥ 18
5
X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD - minimisation problem
• With the objective function C = Rs 3X1 + Rs 5X2
Least cost combinations will be at points
A(0,9) : Rs 3(0) + Rs 5(9) = Rs 45
B(2,3) : Rs 3(2) + Rs 5(3) = Rs 21
X2 C(6 ⅔ ,⅔) : Rs 3(6 ⅔) + Rs 5(⅔) = Rs 23.33
D(10,0) : Rs 3(10) + Rs (0) = Rs 30
9
A(0,9)
6
AREA OF FEASIBLE
SOLUTIONS
5
4
B(2,3)
3
2 C(6⅔, ⅔)
1 D(10,0)
X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD - minimisation problem
• Optimum solution is at point B(2,3)
i.e., 2 lb of ingredient A, 3 lb of ingredient B
Thus each bag will weigh 5 lb,
So cost per pound = Rs 21/5 = Rs 4.20
X2 Examine the constraint function
Protein 6X1 + 2X2 = 18 units/ 5 lb bag
9 A
Fats 2X1 + 4X2 = 16 units/5 lb bag
8
Carbohyd. 2X1 + 10X2 = 34 units/5 lb bag > 20 units
7 reqd.
FIGURE 13
6
Observe that if excess of
5
carbohydrate is reduced – cost
4 increases
B
3
2
C
1
3X1 + 5X2 = 21 D
X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD
• When both types of inequalities are involved
Maximise P = Rs 2X1 + Rs 1X2
Subject to:
3X1 + 4X2 ≤21
X2 6X1 + 5X2 ≤ 30
4X1 + 6X2 ≥ 24
9
6 6X1 + 5X2 ≤ 30
5
3X1 + 4X2 ≤21
4
3
4X1 + 6X2 ≥ 24
2
X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD
• If one of the constraints in a problem is represented by an
equality (instead of inequality)
• Add a constraint 7X1 + 2X2 = 14 to the previous problem
X2
The feasible solution area
9
reduces to a line segment KE
8 7X1 + 2X2 = 14
7
5
K FEASIBLE SOLUTION AREA
4
3
E
2
X1
1 2 3 4 5 6 7 8 9 10
GRAPHICAL METHOD
4 5X1 + 6X2 ≥ 30
3
X2
(0,5½,0) FIGURE 17
5
5
10
(0,0,3⅔)
5
10 (11,0,0)
X1
X3
GRAPHICAL METHOD – a 3-dimensional problem
X2
10
3X1 + X2 + X3 ≤ 10
X1 + 2X2 + 3X3 ≤ 11
5
5
5 10
15
10
15
X1
X3 X1 + 4X2 + X3 ≤ 15
FIGURE 18
GRAPHICAL METHOD – a 3-dimensional problem
X2
10
3X1 + X2 + X3 ≤ 10
X1 + 2X2 + 3X3 ≤ 11
5
5
5 10
(2,3,1) 15
10
15
X1
X3 X1 + 4X2 + X3 ≤ 15
FIGURE 18
GRAPHICAL METHOD – a 3-dimensional problem
X2
PLOTS OF PROFIT PLANES
5
5
X1
X3
FIGURE 19
GRAPHICAL METHOD – a 3-dimensional problem