LP Graph
LP Graph
(Graphical Method)
Professor Dr. Ishrat Jahan,
Head
Department of Business
Administration
Southern University Bangladesh
Linear Programming:
The Graphical Method
The only case where it has a practical
value is in the solution of small
problems with two decisions variables
and only a few constraints, or problems
with two constraints and only a few
decision variables.
Model Formulation
• XYZ Corporation products two models of color TV sets (say
set A & set B). The corporation is in the market to make
money; that is its objective is profit maximization. The profit
realized is Tk.300 from set A and Tk.250 from set B.
2 x1 x2 40................(i )
x1 3x2 45................(ii )
x1 ox2 12................(iii )
If x1 =0, then in equation no (1) x2 =40 [0, 40]
If x2 =0, then in equation no (2) x1 =20 [20, 0]
3 E (12, 0)
• Now we have been plotted the above
points into the following graph:
• Now we have got feasible area OEGC
valuation of Conner point
valuation of Conner point
Points/ x1 x2 Objective function Total
Corner 300 x1 +250x2 Value
Point
0 0 0 300x0+250x0 0
E 12 0 300x12+250x0 3600
G 12 11 300x12+250x11 6350
(Max)
C 0 15 300x0+250x15 3750
Therefore 12 units of x1 product and 11
units of x2 product will give maximum
profit, i.c Tk. 6350
Workings( For G point)
x1 +3x2 =45-----(i)
x1 =12--------(ii)
Now putting the value of x1=12 in equation no. (i)
12+3x2=45
3x2=45-12=33
x2=11
G(12,11)
slack or surplus
• A slack or surplus value is reported for
each of the constraints. The term "slack"
applies to less than or equal constraints,
and the term "surplus" applies to greater
than or equal constraints. If a constraint is
binding, then the corresponding slack or
surplus value will equal zero.
Slack Variables
• In an optimization problem, a slack
variable is a variable that is added to an
inequality constraint to transform it into an
equality. Introducing a slack variable
replaces an inequality constraint with an
equality constraint and a non-negativity
constraint on the slack variable
Slack Variables
Slack Variables
In addition to the optimal solution and the expected profit, the management of
XYZ will probably want information about the production time requirement
for each production operation. We can determine this information by
substituting the optimal X1 and X2 values into the constraints of our linear
program. For the XYZ problem the production time requirements are as
follows:
2(12) + 1(11) =35 (Labor Constraint)
1(12)+3(11)=45 (Machine time Constraint)
1(12)+0(11) =12 (Marketing Constraint)
The complete solution tells management that the
production of 12 set of A and 11 set of B will require only
35 labor hours, i.e (40 –35) =5 labor hours will remain
idle.
But production of same number of set A and set B will require all
available machine hours. Again producing 12 number of set A
exactly satisfies the marketing constraint. The 5 hours of unused
labor hours are referred to as slack for the constrained. In linear
programming terminology, any unused or idle capacity for a
<=constraint is referred to as the slack associated with the
constraint.
A factory manufactures two articles A and B. To
manufacture the article A, a certain machine has to
be worked for 1.5 hours and in addition a craftsman
has to work for 2 hours. To manufacture the article
B, the machine has to be worked for 2.5 hours and
in addition the craftsman has to work for 1.5 hours.
In a week the factory can avail of 80 hours of
machine time and 70 hours of craftsman’s time. The
profit on each article A is $5 and that on each article
B is $4. If all the articles produced can be sold
away, find how many of each kind should be
produced to earn the maximum profit per week.
Formulate the linear programming problem using
graphical solution procedure.
• X1= Number of units of article A
• X2= Number of units of article B
Max z 5x1 4x2
Subject to,
1.5 x1 2.5 x 2 80
2 x1 1.5 x 2 70
x1 , x 2 o
First of all we have to convert all inequalities into the following equation
1.5 x1 2.5 x 2 80 (i )
2 x1 1.5 x 2 70 (ii )
From the equation no (1)
when, x1 0, then
1.5 0 2.5 x 2 80
80
x2 32
2.5
(0,32)
Again, equation no (1) Let X 2 0
1.5 x1 0 80
x1 53.33,
If x1 0, then in equation no (2) x2 46.7 [0, 46.7]
If x2 0, then in equation no (2) x1 35 [35, 0]
Now we have got the following points namely :
No. of equation
(A) 0, 32
1
B) (53.33, 0)
C(0, 46.7)
2
D (35, 0)
• Now we have been plotted the above
points into the following graph:
• Now we have got feasible area OEGC
valuation of Conner point
valuation of Conner point
Points/ x1 x2 Objective function Total
Corner 5 x1 +4x2 Value
Point
0 0 0 5x0+4x0 0
E 35 0 5x35+4x0 175
G 20 20 5x20+4x20 180
(Max)
C 0 32 5x0+4x32 128
• Hence to maximize profit the company
should manufacture 20 units of product A
and 20 units of product B per week.
A diet problem
• A comparison shopper is trying to select the
cheapest combination of two foods to meet daily
vitamin needs. The vitamin needs call for at least
40 units of vitamin W, 50 units of vitamin X, 49
units of vitamin Y. Each gm of food A provides 4
units of W, 10 units of X and 7 units of Y. Each
gm of food B provides 10 units of W, 5 units of X
and 7 units of Y. Food A cost 5 tk/gm and Food
B cost 8 tk/gm. Formulate the linear
programming problem using graphical solution
procedure.
Decision Food Content of vitamins types Cost per
Variables unit
W X Y
X1
A 4 10 7 5
X2
B 10 5 7 8
at least
Vitamins
40 50 49
required
Model Formulation
Min C 5A 8B
Subject to,
4 A 10 B 40(Vita min W )
10 A 5 B 50(Vita min X )
7 A 7 B 49(Vita min Y )
A 0, B 0( Non negativity )
No. of equation
A=0, B=4 (0,4)
1
B= 0, A=10(10,0)
R 5 2 5x5+8x2 41(MIN)
S 0 10 5x0+8x10 80
• Here minimize C=41 At R(5,2)