1 Chapter 3 LINEAR PROGRAMMING GRAPHICAL SOLUTION 3.1 SOLUTION METHODS Once the problem is formulated by setting appropriate objective function and constraints, the next step is to solve it. Solving LPP is nothing but determining the values of decision variables that maximizes or minimizes the given effective measure satisfying all the constraints. There are many methods for solving LPP which are listed below. 1. Graphical method. 2. Analytical method or trial and error method. 3. Simplex method. 4. Big-M method. 5. Two phase simplex method. 6. Dual simplex method. 7. Revised simplex method The graphical method is used for solving linear programming problem with two decision variables only. If there are more than two decision variables, then the problem is to be solved using analytical methods. In this chapter graphical method for solving linear programming problems is discussed. The analytic methods are discussed in Chapter TERMINOLOGY Solution: The set of values of decision variables (j = 1, 2,... n) which satisfy the constraints is said to constitute solution to meet problem. Feasible Solution: The set of values of decision variables X j (j = 1, 2,... n) which satisfy all the constraints and non-negativity conditions of an linear programming problem simultaneously is said to constitute the feasible solution to that problem. Infeasible Solution: The set of values of decision variables X j (j = 1, 2,... n) which do not satisfy all the constraints and non-negativity conditions of the problem is said to constitute the infeasible solution to that linear programming problem. Basic Solution: For a set of m simultaneous equations in n variables (n > m), a solution obtained by setting (n m) variables equal to zero and solving for remaining m variables is called a basic feasible solution.
2 24 Operations Research The variables which are set to zero are known as non-basic variables and the remaining m variables which appear in this solution are known as basic variables: Basic Feasible Solution: A feasible solution to LP problem which is also the basic solution is called the basic feasible solution. Basic feasible solutions are of two types; (a) Degenerate: A basic feasible solution is called degenerate if value of at least one basic variable is zero. (b) Non-degenerate: A basic feasible solution is called non-degenerate if all values of m basic variables are non-zero and positive. Optimum Basic Feasible Solution: A basic feasible solution which optimizes (maximizes or minimizes) the objective function value of the given LP problem is called an optimum basic feasible solution. Unbounded Solution: A basic feasible solution which optimizes the objective function of the LP problem indefinitely is called unbounded solution. 3.3 THEOREMS OF LINEAR PROGRAMMING While obtaining the optimal solution to the LP problem by the graphical method, the statement of the following theorems of linear programming are used. 1. The collection of all feasible solutions to an LP problem constitutes a convex set whose extreme points correspond to the basic feasible solutions. 2. There are a finite number of basic feasible solutions within the feasible solution space. 3. If the convex set of feasible solutions of the system of simultaneous equations: ax = b, x ³ 0, is a convex polyhedron, then at least one of the extreme points gives an optimal solutions. 4. If the optimal solution occurs at more than one extreme point, the value of the objective function will be the same for all convex combinations of these extreme points. 3.4 GRAPHICAL METHOD If there are two variables in an LP problem, it can be solved by graphical method. Let the two variables be x 1 and x 2. The variable x 1 is represented on x-axis and x 2 on y-axis. Due to non-negativity condition, the variables x 1 and x 2 can assume positive values and hence the if at all solution exists for the problem, it lies in the first quadrant. The steps used in graphical method are summarized as follows: Step 1: Replace the inequality sign in each constraint by an equal to sign. Step 2: Represent the first constraint equation by a straight line on the graph. Any point on this line satisfies the first constraint equation. If the constraint inequality is type, then the area (region) below this line satisfies this constraint. If the constraint inequality is of ³ type, then the area (region) above the line satisfies this constraint. Step 3: Repeat step 2 for all given constraints. Step 4: Shade the common portion of the graph that satisfies all the constraints simultaneously drawn so far. This shaded area is called the feasible region (or solution space) of the given LP problem. Any point inside this region is called feasible solution and provides values of x 1 and x 2 that satisfy all constraints. Step 5: Find the optimal solution for the given LP problem. The optimal solution may be determined using the following methods.
3 Linear Programming Graphical Solution 25 Extreme Point Method: In this method, the coordinates of each extreme point are substituted in the objective function equation, whichever solution has optimum value of Z (maximum or minimum) is the optimal solution. Iso-Profit (Cost) Function Line Method: In this method the objective function is represented by a straight line for arbitrary value of Z. Generally the objective function line is represented by a dotted line to distinguish it from constraint lines. If the objective is to maximize the value of Z, then move the objective function line parallel till it touches the farthest extreme point. This farthest extreme point gives the optimum solution. If objective is to minimize the value of Z, then move the objective function line parallel until it touches the nearest extreme point. This nearest extreme point gives the optimal solution. Example 1: Solve the following LPP using graphical method. Maximize Z = 3 x x 2 Subject to x 1 + x x 1 + x Solution: Represent x 1, on x-axis and x 2 on y-axis. Represent the constraints on x and y axis to an appropriate scale as follows: Replace the inequality sign of the first constraint by an equality sign, the first constraint becomes x 1 + x 2 = 450 This can be represented by a straight line x If x 1 = 0, then x 2 = 450 If x 2 = 0, then x 1 = 450 The straight line of the first constraint equation passes through coordinates (0, 450) and (450, 0) as shown in Fig Fig. 3.1
4 26 Operations Research Any point lying on this line satisfies the constraint equation. Since the constraint is inequality of type, to satisfy this constraint inequality the solution must lie towards left of the line. Hence mark arrows at the ends of this line to indicate to which side the solution lies. Replace the inequality sign of the second constraint by an equality sign, then the constraint equation is 2 x 1 + x 2 = 600 This constraint equation can be represented by straight line If x 1 = 0 then x 2 = 600 If x 2 = 0 then x 1 = 300 The line passes through co-ordinates (0, 600) and (300,0) as shown in Fig Any point lying on this straight line satisfies the constraint equation. Since the constraint is inequality of type, the solution should lie towards left of the line to satisfy this constraint inequality. The shaded area shown in figure 3.1 satisfies both the constraints as well as non-negative condition. This shaded area is called the solution space or the region of feasible solutions. To Find Optimal Solution Extreme Point s Method: Name the corners or extreme points of the solution space. The solution space is OABCO. Find the coordinates of each extreme point, substitute them in objective function equation and find the value of Z as below: Extreme point Coordinates x 1 x 2 Z A B C Extreme point C gives the maximum value of Z. Hence, the solution is x 1 = 0, x 2 = 450 and maximum Z = Iso-Profit Line Method: Assume any value of Z. For convenience, assume Z equal to the product of coefficients of x 1 and x 2. (In this case Z = 3 4 = 12, since x 1 and x 2 are in terms of hundreds, let Z = 1200). Then the objective function becomes Z = 1200 = 3 x x 2 If x 1 = 0, x 2 = 300 If x 2 = 0, x 1 = 400 The objective function line passes through coordinates (0, 300) and (400, 0) and is represented by dotted line in Fig Any point lying on this objective function line will have Z = If this line is moved towards origin, Z value decreases. If it is moved away from origin, Z value increases. Hence move this dotted line away from origin to increase the value of Z until it couches the farthest extreme point. The farthest extreme point that the dotted line passes is point C. Hence, the coordinates of point C will give the values of x 1 and x 2 at which Z is maximum. Hence, x 1 = 0, x 2 = 450 and Z max = 450.
5 Linear Programming Graphical Solution 27 Example 2: Solve the following LPP using graphical method Max Z = 5 x x 2 Subject to x 1 + x x x x x 2 35 Solution: Replace all inequality sign by equality sign and represent the constraint equations by straight lines as follows: x 1 + x 2 = 4 If x 1 = 0 then x 2 = 4 If x 2 = 0 then x 1 = 4 The straight line of this equation passes through (0,4) and (4,0) 3 x x 2 = 24 If x 1 = 0 then x 2 = 3 If x 2 = 0 then x 1 = 8 The straight line of this equation passes through (0,3) and (8,0) 10 x x 2 = 35 If x 1 = 0 then x 2 = 5 If x 2 = 0 then x 1 = 3.5 The straight line of this equation passes through (0, 5) and (3.5, 0) Fig. 3.2 Take appropriate scale on x and y axis and mark 8 units on x-axis and mark 8 units on x-axis and 5 units on y-axis, represent the first constraint by straight line as shown in Fig Since all the constraints are inequalities of type to satisfy the constraint the solution should lie towards left of
6 28 Operations Research the respective lines. Shade the common portion of the graph which gives the solution space. The constraints define the boundary of the solution space. Extreme Point Method: There are five extreme points (or vertices or corners of the solution space which are named as 0, A, B, C and D. Find the coordination of each point, substitute them in objective function equation and determine the value of Z. This is given in Table 3.2. Since the maximum value of Z is 24.8, point C gives the optimal solution. The optimal solution is x 1 = 1.6, x 2 = 2.3, Z max = Extreme points Coordinates x 1 x 2 Value of Z A B C D ISO-Profit Line Method: Assume an arbitrary value of Z. It is advised to assume the value of Z as the product of coefficients of x 1 and x 2 of the objective function. In this problem these coefficients are 5 and 7 and hence Z is assumed as 35. \ 35 = 5 x x 2 Represent this by a straight line. If x 1 = 0, then x 2 = 5 and if x 2 = 0, then x 1 = 7. This objective function line passes through coordinates (0, 5) and (7, 0) and is represented by a dotted line. Move this dotted line parallel until it touches the farthest extreme point. The point C is the farthest extreme point and hence gives the optimal solution. The coordinates of point C are (1.6, 2.3). Thus optimal solution is x 1 = 1.6, x 2 = 2.3, Maximum Z = Example 3: Solve the following LPP using graphical method. Minimize Z = 5 x x 2 Subject to x 1 + x 2 ³ 2 x 1 8 x 2 9 Solution: Replace the inequality of first constraint by equality sign x 1 + x 2 = 2 If x 1 = 0, x 2 = 2 If x 2 = 0, x 1 = 2 Represent the equation by straight line as shown in Fig Since the constraint is inequality of ³ type the solution lies to the right side of this line. The second constraint equation is x 1 = 8 which is represented by vertical line. Since constraint inequality is of type, the solution lies on left side of this line.
7 Linear Programming Graphical Solution 29 The third constraint equation is x 2 = 9 which can be represented by horizontal line. Since the constraint inequality is of type the solution lies below this line as shown in Fig The shaded area gives the solution space. Fig. 3.3 To Find Optimal Solution Extreme Point Method: The corners or extreme points of the solution space are named as A, B, C, D, E. Find the coordinates of each extreme point, substitute the values of x 1 and x 2 in objective function to find the value of Z at each extreme point. Extreme points Coordinates x 1 x 2 Value of Z A B C D E Extreme point E gives the minimum value of Z and hence the optimal solution is x 1 = 0, x 2 = 2 and Minimum Z = 8. Iso-Cost Line Method: Assume Z = 20, then objective function equation Z0 = 5 x x 2 If x 1 = 0, x 2 = 5 If x 2 = 0, x 1 = 4 The dotted line passes through coordinates (0, 5) and (4, 0). Move this objective function line parallel till it touches the nearest extreme point of the solution space. As seen in Fig.3.3 the nearest
8 30 Operations Research extreme point at which dotted line touches the solution space is point E. Hence point E gives the minimum value of Z at which x 1 = 0, x 2 = 2 and Z = 8. Example 4: Find the maximum and minimum value of Z given by Z = 3 x x 2. Subject to 5 x x x x x x 2 ³ x x 2 ³ 80 Solution: 5 x x 2 = 200 passes through coordinates (0, 50) (40, 0) 3 x x 2 = 150 passes through coordinates (0, 30) (50, 0) 5 x x 2 = 100 passes through coordinates (0, 25) (20, 0) 8 x x 2 = 80 passes through coordinates (0, 20) (10, 0) The constraints are represented as shown in Fig. 3.4 with vertices of the solution space A, B, C, D, E. Extreme points Coordinates Value of Z x 1 x 2 A B C D E Fig. 3.4
9 Linear Programming Graphical Solution 31 The minimum value of Z is 60 and maximum value is 142. The constraint 8 x x 2 ³ 80 is not deciding the solution space and hence is known as redundant constraint. 3.5 SPECIAL CASES IN LINEAR PROGRAMMING Alternate (or Multiple) Optimal Solutions So far we have solved linear programming problems using graphical method. For each one of the problems, there was one optimal solution (unique solution). However, in certain cases, a given LP problem may have more than one (multiple) optimal solutions. Each of such optimal solutions is termed as alternative optimal solution. When the objective function line is moved parallel to touch either nearest or farthest extreme point, if the objectives function line coincides either the farthest or nearest boundary of the solution space, then the problem is said to possess multiple optimal solution. In other words, the slope of the objective function is same as that of the constraint forming the boundary of the solution space. Example 5: Use the graphical method to solve the following LP problem. Maximize Z = 10 x x 2 Subject to 5 x x 2 30 x x 2 18 Solution: The constraints are plotted as usual on graph as shown in Fig The solution space is given by O, A, B, C. The value of Z at each of the extreme points is given below. As is clear from table, that extreme point A and B, both gives the optimal solution. Hence, the problem has multiple optimal solutions. Coordinates Extreme points Value of Z x 1 x 2 O A B 6/7 60/7 60 C Iso-Profit Line Method: To represent the objective function by straight line, assume Z = 30. Then 30 = 10 x x 2 If x 1 = 0, x 2 = 5 If x 2 = 0, x 1 = 3 Represent the objective function by a dotted line as shown in Fig If this line is moved parallelly away from the origin, instead of touching an extreme point, it coincides with the boundary of the solution space i.e., AB. It means that points A and B and any point on the line AB gives the
10 32 Operations Research optimal solution. Consider a point y on the AB, its coordinates being (4, 3.333), the value of Z = 60. Fig Unbounded Solution Some of the LP problem may not have a finite solution. The values of one or more decision variables and the value of the objective function are permitted to increase infinitely without violating the feasibility condition, then the solution is said to be unbounded. It is to be noted that the solution may be unbounded for maximization type of objective function. This is because in minimization type of objective function, the lower boundary is formed by non-negative condition for decision variables. Example 6: Solve the following LPP using graphical method. Max Z = 3 x x 2 Subject to x 1 x 2 ³ 1 x 1 + x 2 ³ 3 4.5x x 2 ³ 3 Solution: x 1 x 2 = 1 If x 1 = 0, x 2 = 1 If x 2 = 0, x 1 = 1 x 1 x 2 = 1 passes through (0, 1) (1, 0) x 1 + x 2 = 3 If x 1 = 0, x 2 = 3 If x 2 = 0, x 1 = 3
11 Linear Programming Graphical Solution 33 x 1 + x 2 = 3 passes through (0, 3) (3, 0) 4.5x x 2 ³ 3 If x 1 = 0, x 2 = 3 If x 2 = 0, x 1 = 2 4.5x x 2 ³ 3 passes through (0, 3) (2, 0) The solution space is in Fig Assume Z = 6 then 6= 3 x x 2 passes through (0, 3) (2, 0). Move the objective function line till it touches the farthest extreme point of solution space. Since there is no closing boundary for the solution space, the dotted line can be moved to infinity. That is Z will be maximum at infinite values of x 1 and x 2. Hence the solution is unbounded. Note: In an unbounded solution, it is not necessary that all the variables can be made arbitrarily large as Z approaches infinity. In the above problem if the second constraint is replaced by x 1 2, then, only x 1 can approach infinity and x 1 cannot be more than two Infeasible Solution Fig. 3.6 Infeasibility is a condition when constraints are inconsistent (mutually exclusive) i.e., no value of the variable satisfy all of the constraints simultaneously. There is not unique (single) feasible region. It should be noted that infeasibility depends solely on constraints and has nothing to do with the objective function. Example 7: Maximize Z = 3 x 1 2 x 2 Subject to x 1 + x x x 2 ³ 4 Solution: x 1 + x 2 = 1 passes through (0, 1) (1, 0)
12 34 Operations Research 2 x x 2 = 4 passes through (0, 2) (2, 0) To satisfy the first constraint the solution must lie to the left of line AB. To satisfy the second constraint the solution must lie to the right of line CD. There is no point (x 1, x 2 ) which satisfies both the constraints simultaneously. Hence, the problem has no solution because the constraints are inconsistent. Fig. 3.7 Example 8: Solve the following LPP using graphical solution Maximize Z = 8 x x 2 Subject to 3 x x 2 = 15 5 x x 2 = 10 Solution: 3 x x 2 = 15 passes through (0, 3) (5, 0) 5 x x 2 = 10 passes through (0, 5) (2, 0) Fig. 3.8 shows the graphical solution. Fig. 3.8
13 Linear Programming Graphical Solution 35 Since there is only a single solution point A (20/19, 45/19), there is nothing to be maximized. The solution for the problem is x 1 = 20/19 and x 2 = 45/19. REVIEW QUESTIONS 1. Explain the graphical method of solving an LP problem. 2. Explain in brief. (a) Feasible solution (b) Basic feasible solution (c) Optimal solution 3. What is meant by the term feasible region? Why this must be a well-defined boundary for maximization problem? 4. Define Iso Profit and Iso Cost lines. How do they help to obtain a solution to an LP problem? 5. Generally it is stated that an LP problem has a feasible region that has infinite number of solutions. Explain. 6. Under what condition an LP problem has (a) Alternate (or multiple) optimal solution. (b) Unbounded solution. (c) No solution. 7. When do you get a feasible region represented by point? EXERCISE PROBLEMS (i) Max Z = 4 x x 2 s/t x x 2 6 x 1 + x 2 2 (ii) Max Z = 3 x x 2 s/t x 1 + x 2 ³ x x x x [Ans. Unbounded] [Ans. Infeasible solution] (iii) Min. Z = 3 x x 2 s/t 3 x x x 1 x 2 ³ 2 2 x x 2 ³ 12 x 1 4 x 2 ³ 2 [Ans. x 1 = 3, x 2 = 2, Z min = 19] (iv) Min. Z = x x 2 s/t x x 2 10 x 1 + x 2 6
14 36 Operations Research x 1 x 2 2 [Ans. x 1 = 2, x 2 = 0, Z min = 2] (v) Min. Z = 5 x 1 2 x 2 s/t 2 x x 2 ³ 1 [Ans. x 1 = 0, x 2 = 1/3, Z min = 2/3] (vi) Max. Z = x x 2 s/t 3 x x x x 2 10 [Ans. x 1 = 0, x 2 = 4/3, Z max = 4] (vii) Max. Z = 2 x x 2 s/t x 1 + x 2 ³ 1 5 x 1 x 2 ³ 0 x 1 + x 2 6 x 1 5 x 2 0 x 2 x 1 ³ 1 x 2 3 [Ans. x 1 = 4, x 2 = 3, Z max = 17] (viii) Find the maximum and minimum value of Z given by Z = 5 x x 2 s/t x 1 + x x x 2 ³ 3 0 x x 2 3 [Ans. x 1 = 3, x 2 = 3, Z max = 24]