Linear Programming - Graphical Method

6
32 11.235 © Copy Right: Rai University OPERA TIONS RESEARCH Learning Outcomes 1. Graphical approach for generating optimal solutions to a LP problem. Dear students,during the preceding lectures, we have learnt how to formulate a given problem as a Linear Programming model. The next step, after the formulation, is to devise effective methods to solve the model and ascertain the optimal solution. Dear friends, we start with the graphical method and once having mastered the same, would subsequently move on to simplex algorithm for solving the Linear Programming model. But let’s not get carried away. First thing first. Here we go. We seek to understand the Importance of Graphical Method Of Solution In Linear Programming and seek to find out as to how the graphical method of solution be used to generate optimal solution to a Linear Programming problem. Once the Linear programming model has been formulated on the basis of the given objective & the associated constraint functions, the next step is to solve the problem & obtain the best possible or the optimal solution various mathematical & analytical techniques can be employed for solving the Linear- programming model. The graphic solution procedure is one of the method of solving two variable Linear programming problems. It consists of the following steps:- Step I Defining the problem. Formulate the problem mathematically. Express it in terms of several mathematical constraints & an objective function. The objective function relates to the optimization aspect is, maximisation or minimisation Crite- rion. Step II Plot the constraints Graphically. Each inequality in the constraint equation has to be treated as an equation. An arbitrary value is assigned to one variable & the value of the other variable is obtained by solving the equation. In the similar manner, a different arbitrary value is again assigned to the variable & the corresponding value of other variable is easily obtained. These 2 sets of values are now plotted on a graph and con- nected by a straight line. The same procedure has to be repeated for all the constraints. Hence, the total straight lines would be equal to the total no of equations, each straight line represent- ing one constraint equation. Step III Locate the solution space. Solution space or the feasible region is the graphical area which satisfies all the constraints at the same time. Such a solution point (x, y) always occurs at the comer. points of the feasible Region the feasible region is determined as follows: a. For” greater than” & “ greater than or equal to” constraints (i.e.;), the feasible region or the solution space is the area that lies above the constraint lines. b. For” Less Then” &” Less than or equal to” constraint (ie; ). The feasible region or the solution space is the area that lies below the constraint lines. Step IV Selecting the graphic technique. Select the appropriate graphic technique to be used for generating the solution. Two tech- niques viz; Corner Point Method and Iso-profit (or Iso-cost) method may be used we give below both there techniques, however, it is easier to generate solution by using the corner point method. a. Corner Point Method. i. Since the solution point (x. y) always occurs at the corner point of the feasible or solution space, identify each of the extreme points or corner points of the feasible region by the method of simultaneous equations. ii. By putting the value of the corner point’s co-ordinates [e.g. (2,3)] into the objective function, calculate the profit (or the cost) at each of the corner points. iii. In a maximisation problem, the optimal solution occurs at that corner point which gives the highest profit. iv. In a minimisation problem, the optimal solution occurs at that corner point which gives the lowest profit. b. Iso-Profit (or Iso-Cost) method. The term Iso-profit sign if is that any combination of points produces the same profit as any other combination on the same line. The various steps involved in this method are given below. c. Selecting a specific figure of profit or cost, an iso-profit or iso-cost line is drawn up so that it lies within the shaded area. d. This line is moved parallel to itself and farther or closer with respect to the origin till that point after which any further movement would lead to this line falling totally out of the feasible region. e. The optimal solution lies at the point on the feasible region which is touched by the highest possible iso-profit or the lowest possible iso-cost line. f. The co-ordinates of the optimal point (x. Y) are calculated with the help of simultaneous equations and the optimal profit or cost is as curtained. Dear students, let us now turn our attention to the important theorems which are used in solving a linear programming LESSON 7: LINEAR PROGRAMMING - GRAPHICAL METHOD

Transcript of Linear Programming - Graphical Method

Page 1: Linear Programming - Graphical Method

32 11.235© Copy Right: Rai University

OPER

AT

ION

S R

ES

EA

RC

H

Learning Outcomes1. Graphical approach for generating optimal solutions to a LP

problem.Dear students,during the preceding lectures, we have learnt howto formulate a given problem as a Linear Programming model.The next step, after the formulation, is to devise effectivemethods to solve the model and ascertain the optimalsolution.Dear friends, we start with the graphical method and oncehaving mastered the same, would subsequently move on tosimplex algorithm for solving the Linear Programming model.But let’s not get carried away.First thing first.Here we go.We seek to understand the Importance of Graphical MethodOf Solution In Linear Programming and seek to find out as tohow the graphical method of solution be used to generateoptimal solution to a Linear Programming problem.Once the Linear programming model has been formulated onthe basis of the given objective & the associated constraintfunctions, the next step is to solve the problem & obtain thebest possible or the optimal solution various mathematical &analytical techniques can be employed for solving the Linear-programming model.The graphic solution procedure is one of the method ofsolving two variable Linear programming problems. It consistsof the following steps:-

Step IDefining the problem. Formulate the problem mathematically.Express it in terms of several mathematical constraints & anobjective function. The objective function relates to theoptimization aspect is, maximisation or minimisation Crite-rion.

Step IIPlot the constraints Graphically. Each inequality in the constraintequation has to be treated as an equation. An arbitrary value isassigned to one variable & the value of the other variable isobtained by solving the equation. In the similar manner, adifferent arbitrary value is again assigned to the variable & thecorresponding value of other variable is easily obtained.These 2 sets of values are now plotted on a graph and con-nected by a straight line. The same procedure has to be repeatedfor all the constraints. Hence, the total straight lines would beequal to the total no of equations, each straight line represent-ing one constraint equation.

Step IIILocate the solution space. Solution space or the feasible regionis the graphical area which satisfies all the constraints at the same

time. Such a solution point (x, y) always occurs at the comer.points of the feasible Region the feasible region is determinedas follows:a. For” greater than” & “ greater than or equal to” constraints

(i.e.;), the feasible region or the solution space is the areathat lies above the constraint lines.

b. For” Less Then” &” Less than or equal to” constraint (ie; ).The feasible region or the solution space is the area that liesbelow the constraint lines.

Step IVSelecting the graphic technique. Select the appropriate graphictechnique to be used for generating the solution. Two tech-niques viz; Corner Point Method and Iso-profit (or Iso-cost)method may be used we give below both there techniques,however, it is easier to generate solution by using the cornerpoint method.a. Corner Point Method.

i. Since the solution point (x. y) always occurs at the cornerpoint of the feasible or solution space, identify each of theextreme points or corner points of the feasible region bythe method of simultaneous equations.ii. By putting the value of the corner point’s co-ordinates[e.g. (2,3)] into the objective function, calculate the profit (orthe cost) at each of the corner points.iii. In a maximisation problem, the optimal solution occursat that corner point which gives the highest profit.iv. In a minimisation problem, the optimal solution occursat that corner point which gives the lowest profit.

b. Iso-Profit (or Iso-Cost) method. The term Iso-profit signif is that any combination of points produces the sameprofit as any other combination on the same line. Thevarious steps involved in this method are given below.

c. Selecting a specific figure of profit or cost, an iso-profit oriso-cost line is drawn up so that it lies within the shadedarea.

d. This line is moved parallel to itself and farther or closerwith respect to the origin till that point after which anyfurther movement would lead to this line falling totally outof the feasible region.

e. The optimal solution lies at the point on the feasible regionwhich is touched by the highest possible iso-profit or thelowest possible iso-cost line.

f. The co-ordinates of the optimal point (x. Y) are calculatedwith the help of simultaneous equations and the optimalprofit or cost is as curtained.

Dear students, let us now turn our attention to the importanttheorems which are used in solving a linear programming

LESSON 7:LINEAR PROGRAMMING - GRAPHICAL METHOD

Page 2: Linear Programming - Graphical Method

© Copy Right: Rai University11.235 33

OPER

AT

ION

S R

ES

EA

RC

Hproblem. Also allow me to explain the important terms used inLinear programming.Here we go.

Important TheoremsWhile obtaining the optimum feasible solution to the linearprogramming problem, the statement of the following fourimportant theorems is used:-

Theorems IThe feasible solution space constitutes a convex set.

Theorems IIwithin the feasible solution space, feasible solution correspondto the extreme ( or Corner) points of the feasible solutionspace.

Theorem III There are a finite number of basic feasible solution with thefeasible solution space.

Theorem IV The optimum feasible solution, if it exists. will occur at one, ormore, of the extreme points that are basic feasible solutions.Note. Convex set is a polygon “Convex” implies that if anytwo points of the polygon are selected arbitrarily then straightline segment Joining these two points lies completely withinthe polygon. The extreme points of the convex set are the basicsolution to the linear programming problem.

Important TermsSome of the important terms commonly used is linearprogramming are disclosed as follows:

i. Solution Values of the decision variable x;(i = 1,2,3, in) satisfying theconstraints of a general linear programming model is known asthe solution to that linear programming model.

ii. Feasible Solution Out of the total available solution a solution that also satisfiesthe non-negativity restrictions of the linear programmingproblem is called a feasible solution.

iii. Basic SolutionFor a set of simultaneous equations in Q unknowns (p Q) asolution obtained by setting (P - Q) of the variables equal tozero & solving the remaining P equation in P unknowns isknown as a basic solution.The variables which take zero values at any solution are detainedas non-basic variables & remaining are known as-basic variables,often called basic.

iv. Basic Feasible SolutionA feasible solution to a general linear programming problemwhich is also basic solution is called a basic feasible solution.

v. Optimal Feasible Solution

vi. Optimal Feasible SolutionAny basic feasible solution which optimizes (ie; maximise orminimises) the objective function of a linear programmingmodes known as the optimal feasible solution to that linearprogramming model.

vii. Degenerate SolutionA basic solution to the system of equations is termed asdegenerate if one or more of the basic variables become equalto zero.I hope the concepts that we have so far discussed have beenfully understood by all of you.Friends, it is now the time to supplement our understandingwith the help of examples.

ExampleX Ltd wishes to purchase a maximum of3600 units of aproduct two types of product a. & are available in the marketProduct a occupies a space of 3 cubic Jeet & cost Rs. 9 whereasoccupies a space of 1 cubic feet & cost Rs. 13 per unit. Thebudgetary constraints of the company do not allow to spendmore than Rs. 39,000. The total availability of space in thecompany’s godown is 6000 cubic feet. Profit margin of both theproduct a & is Rs. 3 & Rs. 4 respectively. Formulate as a linearprogramming model and solve using graphical method. Youare required to ascertain the best possible combination ofpurchase of a & so that the total profits are maximized.

Solution Let x1 = no of units of product α &

x2 = no of units of product β

Then the problem can be formulated as a P model as follows:-Objective function, Maximise 21 x4x3Z +=

Constraint equations :- int)ConstraUnitsMaximum(3600xx 21 ≤+

6000xx3 21 ≤+ (Storage area constraint)

39000x13x9 21 ≤+ (Budgetary constraint)

0xx 21 ≤+

Step ITreating all the constraints as equality, the first constraint is

3600xx 21 =+

Put ∴=⇒= 3600xox 21 The point is (0, 3600)

Put ∴=⇒= 3600xox 12 The point is (3600, 0)

Draw is graph with x1 on x-axis & x2 on y-axis as shown in thefigure.

Step IIDetermine the set of the points which satisfy the constraint:

3600xx 21 =+This can easily be done by verifying whether the origin (0,0)satisfies the constraint. Here,0+0 = 3600. Hence all the points below the line will satisfy theconstraint.

Step IIIThe 2nd constraint is: 6000xx3 21 ≤+

Put 6000xox 21 =⇒= and the point is ( 0, 6000)

Put 200xox 12 =⇒= and the point is ( 200, 0)

Now draw its graph.

Page 3: Linear Programming - Graphical Method

34 11.235© Copy Right: Rai University

OPER

AT

ION

S R

ES

EA

RC

H

Step IVLike it’s in the above step II, determine the set of points whichsatisfy the constraint 6000xx3 21 ≤+ . At origin;

600000 <+ Hence, all the points below the line will satisfy theconstraint.

Step VThe 3rd constraint is: 39000x12x9 21 ≤+Put 3000xox 21 =⇒= & the point is (0, 3000)

Put

=⇒= 0,

313000isintpothe&

313000xox 12

Now draw its graph.

Step VIAgain the point (0,0) ie; the origin satisfies the constraint

39000x12x9 21 ≤+ . Hence, all the points below the line willsatisfy the constraint.

Step VIIThe intersection of the above graphic denotes the feasibleregion for the given problem.

Step VIII

Finding Optimal SolutionAlways keep in mind two things: -i. For ≥ constraint the feasible region will be the area, which

lies above the constraint lines, and for ≤ constraints, it willlie below the constraint lines.This would be useful in identifying the feasible region.

ii. According to a theorem on linear programming, an optimalsolution to a problem (if it exists) is found at a cornerpoint of the solution space.

Step IXAt corner points ( O, A, B, C), find the profit value from theobjective function. That point which maximize the profit is theoptimal point.

Corner Point W-Ordinates Objective Func 21 43 xxZ +=

Value

O A C

(0,0) (0,3000) (2000,0)

Z=0+0 Z=0+4x3000

Z=0+3x2000+0

0 12,000 6,000

For point B, solve the equation 39000x12x9 21 ≤+

And 6000x6x3 21 ≤+ to find point B

( ,BA +∴ these two lines are intersecting)ie, 6000xx3 21 =+ …(1)

39000xx9 21 =+ …(2)

Multiply equ (i) by 3 on both sides:18000x3x9 21 =+⇒ …(3)

___39000x13x9 21 =+

…(4)

————————21000x10 2 −=−

2100x 2 =∴

Put the Value of x2 in first equation:1300x1 =⇒

At point (1300,2100)

21 x4x3Z +=

2100x41300x3 +=

= 12,300 which is the maximum value.

ResultThe optimal solution is:No of units of product 1300=α

No of units of product 2100=β

Total profit, = 12300 which is the maximum.Well friends, it’s really very simple.Isn’t it?Let’s consider some more examples.

ExampleGreatwell Ltd. Produces & sell two different types of productsP1 & P2 at a profit margin of Rs. 4 & Rs. 3 respectively. Theavailability of raw materials the maximum no of productionhours available and the limiting factor of P2 can be expressed interms of the following in equations:

102x21x4 ≤+

82x381x2 ≤+

62x ≤02x,1x ≥

Formulate & solve the LP problem by using graphical methodso as to optimize both P1 & P2

SolutionObjective: Maximise 21 x3x4Z +=

Since the origin (0,0) satisfies each and every constraint, allpoints below the line will satisfy the corresponding constraints.

Page 4: Linear Programming - Graphical Method

© Copy Right: Rai University11.235 35

OPER

AT

ION

S R

ES

EA

RC

HConsider constraints as equations & plot then as under:

102x21x4 ≤+put 5x01x =⇒= and the point is (0,5) …(1)

Put 25x02x =⇒= and the point is ( 5/2, 0)

8x28

x2 21 =+ …(2)

put 32x01x =⇒= and the point is (, 3)put 41x02x =⇒= and the point is ( 4, 0)x1 = 6 …(3)The area under the curve OABC is the solution space. Theconstraint x1=6 is not considered since it does not contain thevariable x2.

Getting optimal solution.

Corner Point Co-ordinates Obj.-Func. 21 34 xxZ +=

Value

0 A B

C

(0,0) (0,3)

* (5/2,0)

Z=0+0 Z=0+3x3

* 8

254 2 == xxZ

0 9 *

10

Point B is the intersection of the curves &10x2x4 21 =+

8x38x2 21 =

Solving as system of simultaneous equation:Point B is ( 8/5, 9/5

21 x3x4Z +=∴

5/59)5/9(3)5/8(4 =+=ResultThe optimal solution is:Not of units of P2 = 9/5Total profit = 59/5Remarks. Since 8/5 & 9/5 units of a product can not beproduced, hence these values must be rounded off. This is thelimitation of the linear programming technique.

ExampleFresh Products Ltd. Is engaged in the business of breadingcows quits farm. Since it is necessary to ensure a particular levelof nutrients in their diet, Fresh Product Ltd. Buys two productsP1 & P2 the details of nutrient constituents in each of which areas follows:

Nutrient Type Nutrient Constituents in the product

Minimum nutrient requirements

P1 P2 A B C

36 3 20

6 12 10

108 36 100

The cost prices of both P1 & p2 are Rs. 20 per unit & Rs. 40 perunit respectively.Formulate as a linear programming model & solve graphicallyto ascertain how much of the products P1 & p2 must be

purchased so as to provide the cows nutrients not less then theminimum required?

Solution

Step 1

Mathematical formulation of the problemLet x1 and x2 be the number of units of product P1 and p2.The objective is to determine the value of these decisionvariables which yields the minimum of total cost subject toconstraints. The data of the given problem can be summarizedas bellow:

Decision Variables

Number of Product

Type of Nutrient Constituent Cost of Product

A B C X1 X2

1 2

36 6

3 12

20 10

20 40

Min. Requirement

108 36 100

The above problem can be formulated and follows:Minimize 21 x40x20Z += subject to the constraints:

Step 2Graph the Constraints Inequalities. Next we construct the graphby drawing a horizontal and vertical axes, viz., x1 axes in theCartesian X1 OX2 plane. Since any point satisfying the condi-tions 01 ≥x and 02 ≥x lies in the first quadrant only, search fororthe desired pair (x1, x2) is restricted to the points of the firstquadrant only.

The constraints of the given problem are plotted as describedearlier by treating them as equations:

100x10x20and;36x12x3;108x6x36 212121 =+=+=+

Since each of them happened to be ‘greater than or equal totype’, the points ( x1,x2) satisfying them all will lie in the regionthat falls towards the right of each of these straight lines.The solution space is the intersection of all these regions in thefirst quadrant. This is shown shaded in the adjoining figure.

Step 3Locate the solution point. The solution space is open withB,P,Q and C as lower points.

Page 5: Linear Programming - Graphical Method

36 11.235© Copy Right: Rai University

OPER

AT

ION

S R

ES

EA

RC

H

Note 1. For ≥ constraints soln. Space is above the constraintline, as space2. Now, consider only corner Pb of the sdn. Space according toLP therein.

Step 4Value of objective function at corner points.

Corner points Co-ordinates of Corner Points (x1,x2)

Objective function

21 4020 xxZ += Value

B P Q C

(0,18) (2,6) (4,2) (12,0)

20(0) + 40(18) 20(2) + 40(6) 20(4) + 40(2) 20(12) + 40(0)

720 280 160 240

Step 5Optimum value of the objective function . Here, we find thatminimum cost of Rs. 160 is found at point Q(4,2), i.e., x1 = 4and x2 = 2Hence the first should purchase 4 units of product P1 and 2units of product P2 in order to maintain a minimum cost ofRs. 160.

ExampleA firm manufactures & sells two product p1 & p2 at a profit ofRs. 45 per unit & Rs. 80 per unit respectively. The quantities ofraw materials required for both p1 & p2 are given below:

Product Raw Materials P1 P2 R1 R2

5 10

20 15

The maximum availability of both R1 & R2 is 400 & 450 unitsrespectively.You are required to formulate as a CP model & solve using thegraphical method.

SolutionTo find the second point let us assume that the entire amountof input A is used to produce the produce I and no unit ofproduct II is produced, i.e., X2 = 0. Therefore x1 ≤ i.e., the firmcan produce either 80 or less then 80 units of product I. If wetake the maximum production x1 = 80. So the second point is(80,0) and this point Q in graph denotes product of 80 unitsof product I and zero unit of product II.

By joining the two points P (0,20) and Q (80,0) we get a straightline shows the maximum quantities of product I and productII that can be produced with the help of input A. The areaPOQ is the graphic representation of constraint .400x20x5 21 ≤ Itmay be emphasized here that the constraint is represented by

the area POQ and not be the line PQ. As far as the constraint ofinput A is concerned, production is possible at any point on theline PQ or left to it [dotted area in the graph.]In a similar way the second constraint .450x15x10 21 ≤

45, 0 be drawn graphically. For this purpose we obtain twopoints as follows:a. If production of product I is zero, the maximum

production of product II is units. Point R ( 0,30) representsthis combination in graph.

b. If production of product II is zero, the maximumproduction of product I is 45 units. Point S ( 45, 0) in thegraph represents this combination.

By joining points R and S we get a straight line RS. This lineagain represents the maximum quantities of product I and IIthat can be produced with the help of input B. ROS representsthe feasibility region as far as the input B is concerned.After plotting the two constraints next step is to find out thefeasibility region. Feasibility region is that region in the graphwhich satisfies all the constraints simultaneously. Region POSTin third graph represents feasible region. This region POSTsatisfies first constraint as well as second constraint. ROS is thefeasible region under first constant. But out of this RPT regiondoes not fulfill second constraint. In a same way region POQ isthe feasibility under constraint second but out of this, regionTSQ does not satisfy constraint first.

Region POST thus satisfies first constraint as well as secondconstraint and is thus feasible region. Each point in the feasibleregion POST satisfies both the linear constraints and istherefore a feasible solution. Non-negative constraints are alsobeing satisfied in this region because we are taking first quadrantof the graph in which both the axes are positive. The feasibleregion is covered by the linked boundary PTS.The corner points on the kinked boundary P, T and S are calledas extreme points.

Page 6: Linear Programming - Graphical Method

© Copy Right: Rai University11.235 37

OPER

AT

ION

S R

ES

EA

RC

HExtreme points occur either at the inter-section of the twoconstraints (T in this example’ or at the intersection of oneconstraint and one axis (P and S in our example).These extreme points are of great significance in optimalsolution. Optimal solution will always be one of the theseextreme points.Final step in solving linear programming problem with the helpof graph is to find out the optimal solution out of manyfeasible solution in the region POST. For this purpose we willhave to introduce objective function into our graph. Ourobjective function is :-

21 x80x45Z += Or 12 x45Zx80 −=

13 x8045

80Zx −= Or 12 x

169

80Zx −=

Our objective function which is linear has negative slope.It is plotted as dotted line z 1z1 in the following z 1z1 is in-factIso-profit line. The different combinations of I and product IIof this line yield same profits ( say 20 units ) firm. Any line (parallel to this line ) which is higher ( right to this z 1z1 linesignifies higher profit level ( say 25 units ) a line which is lowerto the line z 1z1 implies lower profit above graph; z 1z1 linerepresenting a specified level of profit be moved rightward stillremaining in the feasible region. In words profits can be increasestill remaining in the feasible.

However, this is possible only up to z nzn. Different combina-tion on z nzn give the first a same level of profits. Point T(24,14) is in the feasible region POST and also on line z nzn. Inother words this point ‘T’ represents a combination of the twoproducts which can be produced under the combination ofunputs and profits are maximum possible. Point T representsoptimum combination. z nzn iso-profit line, though signifyhigher profit is not in the feasible region. The firm, therefore,should produce 24 units of product I and 14 units of productII. Its profits will be maximum possible, equal to :-Z=45x1+80x2 = (45)(24) +(80)(14)= 1080 +1120 =Rs. 2200.Optimum combination can be found also, without theintroduction of profits function in our graph. As written abovethe corner points. P, T and S of the kinked cover of feasibleregion POST are called as extreme point and optimum T and Syields Maximum profit to the firm.Point P, x1 = 0 x2 = 20Z=45x1+80x2 = 45(0) +80(20) = Rs. 1600

Point T, x1 = 24, x2 = 0Z=45x1+80x2 = (45)(24) +(80)(14) = Rs. 2200Point S, x1=45, x2 = 0Z=45x1+80x2 = (45)(245 +(80)(0) = Rs. 2025So combination T (24,14) is the intimation and Rs. 2200 is themaximum possible level of profits.Dear students, we have now reached the end of our discussionscheduled for today.See you all in the next lecture.Bye.