Chapter - New Age International

advertisement
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-4.
3.2 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 Xj (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 Xj (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”.
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 x1 and x2. The variable x1 is represented on x-axis and x2 on y-axis. Due to non-negativity condition,
the variables x1 and x2 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 x1 and x2 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.
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 x1 + 4 x2
Subject to
x1 + x2 £ 450
2 x1 + x2 £ 600
x1, x2 ³ 0
Solution: Represent x1, on x-axis and x2 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
x1 + x2 = 450
This can be represented by a straight line x
If x1 = 0, then x2 = 450
If x2 = 0, then x1 = 450
The straight line of the first constraint equation passes through coordinates (0, 450) and
(450, 0) as shown in Fig. 3.1.
Fig. 3.1
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 x1 + x2 = 600
This constraint equation can be represented by straight line
If x1 = 0 then x2 = 600
If x2 = 0 then x1 = 300
The line passes through co-ordinates (0, 600) and (300,0) as shown in Fig. 3.1. 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
Z
x1
x2
0
0
0
0
A
300
0
900
B
150
300
1650
C
0
450
1800
Extreme point ‘C’ gives the maximum value of Z. Hence, the solution is x1 = 0, x2 = 450 and
maximum Z = 1800.
Iso-Profit Line Method: Assume any value of Z. For convenience, assume Z equal to the product
of coefficients of x1 and x2. (In this case Z = 3 × 4 = 12, since x1 and x2 are in terms of hundreds, let
Z = 1200). Then the objective function becomes
Z = 1200 = 3 x1 + 4 x2
If x1 = 0, x2 = 300
If x2 = 0, x1 = 400
The objective function line passes through coordinates (0, 300) and (400, 0) and is represented
by dotted line in Fig. 3.1. Any point lying on this objective function line will have Z = 1200. 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 x1 and x2 at which Z is maximum.
Hence, x1 = 0, x2 = 450 and Zmax = 450.
Linear Programming–Graphical Solution
27
Example 2: Solve the following LPP using graphical method
Max
Z = 5 x1 + 7 x2
Subject to
x 1 + x2 £ 4
3 x1 + 8 x2 £ 24
10 x1 + 7 x2 £ 35
x1, x2 ³ 0
Solution: Replace all inequality sign by equality sign and represent the constraint equations by
straight lines as follows:
x1 + x2 = 4
If x1 = 0 then x2 = 4
If x2 = 0 then x1 = 4
The straight line of this equation passes through (0,4) and (4,0)
3 x1 + 8 x2 = 24
If x1 = 0 then x2 = 3
If x2 = 0 then x1 = 8
The straight line of this equation passes through (0,3) and (8,0)
10 x1 + 7 x2 = 35
If x1 = 0 then x2 = 5
If x2 = 0 then x1 = 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. 3.2. Since all the
constraints are inequalities of ‘£’ type to satisfy the constraint the solution should lie towards left of
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 x1 = 1.6, x2 = 2.3, Zmax = 24.1.
Coordinates
Extreme points
Value of Z
x1
x2
0
0
0
0
A
3.5
0
17.5
B
2.4
1.6
23.2
C
1.6
2.3
24.1
D
0
3
21
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 x1 and x2 of the objective function. In this problem these coefficients
are 5 and 7 and hence Z is assumed as 35.
\
35 = 5 x1 + 7 x2
Represent this by a straight line.
If x1 = 0, then x2 = 5 and if x2 = 0, then x1 = 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 x1 = 1.6, x2 = 2.3, Maximum Z = 24.1.
Example 3: Solve the following LPP using graphical method.
Minimize
Z = 5 x 1 + 4 x2
Subject to
x 1 + x2 ³ 2
x1 £ 8
x2 £ 9
x1, x2 ³ 0
Solution: Replace the inequality of first constraint by equality sign
x1 + x2 = 2
If x1 = 0, x2 = 2
If x2 = 0, x1 = 2
Represent the equation by straight line as shown in Fig. 3.3. Since the constraint is inequality
of ‘³’ type the solution lies to the right side of this line.
The second constraint equation is x1 = 8 which is represented by vertical line. Since constraint
inequality is of ‘£’ type, the solution lies on left side of this line.
Linear Programming–Graphical Solution
29
The third constraint equation is x2 = 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. 3.3. 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 x1 and x2 in objective
function to find the value of Z at each extreme point.
Coordinates
Extreme points
Value of Z
x1
x2
A
2
0
20
B
8
0
40
C
8
9
76
D
0
9
36
E
0
2
8
Extreme point E gives the minimum value of Z and hence the optimal solution is x1 = 0, x2 = 2
and Minimum Z = 8.
Iso-Cost Line Method: Assume Z = 20, then objective function equation
Z0 = 5 x1 + 4 x2
If x1 = 0, x2 = 5
If x2 = 0, x1 = 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
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 x1 = 0, x2 = 2 and Z = 8.
Example 4: Find the maximum and minimum value of Z given by Z = 3 x1 + 4 x2.
Subject to
5 x1 + 4 x2 £ 200
3 x1 + 5 x2 £ 150
5 x1 + 4 x2 ³ 100
8 x1 + 4 x2 ³ 80
x1, x2 ³ 0
Solution:
5 x1 + 4 x2 = 200 passes through coordinates (0, 50) (40, 0)
3 x1 + 5 x2 = 150 passes through coordinates (0, 30) (50, 0)
5 x1 + 4 x2 = 100 passes through coordinates (0, 25) (20, 0)
8 x1 + 4 x2 = 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.
Coordinates
Extreme points
Value of Z
x1
x2
A
20
0
60
B
40
0
120
C
30
13
142
D
0
30
120
E
0
25
100
Fig. 3.4
Linear Programming–Graphical Solution
31
The minimum value of Z is 60 and maximum value is 142.
The constraint 8 x1 + 4 x 2 ³ 80 is not deciding the solution space and hence is known as
redundant constraint.
3.5 SPECIAL CASES IN LINEAR PROGRAMMING
3.5.1 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 x1 + 6 x2
Subject to
5 x1 + 3 x2 £ 30
x1 + 2 x2 £ 18
x1, x2 ³ 0
Solution: The constraints are plotted as usual on graph as shown in Fig. 3.5.
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
x1
x2
O
0
0
0
A
6
0
60
B
6/7
60/7
60
C
0
9
54
Iso-Profit Line Method: To represent the objective function by straight line, assume Z = 30.
Then
30 = 10 x1 + 6 x2
If x1 = 0, x2 = 5
If x2 = 0, x1 = 3
Represent the objective function by a dotted line as shown in Fig. 3.5. 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
32
Operations Research
optimal solution. Consider a point ‘y’ on the AB, its coordinates being (4, 3.333), the value of
Z = 60.
Fig. 3.5
3.5.2 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 x1 + 2 x2
Subject to
x1 – x2 ³ 1
x1 + x2 ³ 3
4.5x1 + 3 x2 ³ 3
x1, x2 ³ 0
Solution:
x1 – x2 = 1
If x1 = 0, x2 = –1
If x2 = 0, x1 = 1
x1 – x2 = 1 passes through (0, –1) (1, 0)
x1 + x2 = 3
If x1 = 0, x2 = 3
If x2 = 0, x1 = 3
Linear Programming–Graphical Solution
33
x1 + x2 = 3 passes through (0, 3) (3, 0)
4.5x1 + 3 x2 ³ 3
If x1 = 0, x2 = 3
If x2 = 0, x1 = 2
4.5x1 + 3 x2 ³ 3 passes through (0, 3) (2, 0)
The solution space is in Fig. 3.6.
Assume Z = 6 then
6 = 3 x1 + 2 x2 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 x1 and x2. 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 x1 £ 2,
then, only x1 can approach infinity and x1 cannot be more than two.
Fig. 3.6
3.5.3 Infeasible Solution
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 x1 – 2 x2
Subject to
x1 + x2 £ 1
2 x1 + 2 x2 ³ 4
x1, x2 ³ 0
Solution: x1 + x2 = 1 passes through (0, 1) (1, 0)
34
Operations Research
2 x1 + 2 x2 = 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 (x1, x2) 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 x1 + 5 x2
Subject to
3 x1 + 5 x2 = 15
5 x1 + 2 x2 = 10
x1, x2 ³ 0
Solution:
3 x1 + 5 x2 = 15 passes through (0, 3) (5, 0)
5 x1 + 2 x2 = 10 passes through (0, 5) (2, 0)
Fig. 3.8 shows the graphical solution.
Fig. 3.8
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 x1 = 20/19 and x2 = 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 x1 + 2 x2
s/t
– x1 + 2 x2 £ 6
– x1 + x 2 £ 2
x 1 , x2 ³ 0
[Ans. Unbounded]
(ii) Max Z = 3 x1 + 5 x2
³ 100
£ 400
£ 440
³0
[Ans. Infeasible solution]
(iii) Min. Z = 3 x1 + 5 x2
s/t
– 3 x1 + 4 x2 £ 12
2 x1 – x2 ³ –2
2 x1 + 3 x2 ³ 12
x1 £ 4
x2 ³ 2
x1, x2 ³ 0
[Ans. x1 = 3, x2 = 2, Zmin = 19]
s/t
x1 +
5 x1 + 10
6 x1 + 8
x 1,
x2
x2
x2
x2
(iv) Min. Z = – x1 + 2 x2
s/t
– x1 + 3 x2 £ 10
x 1 + x2 £ 6
36
Operations Research
x1 – x2 £ 2
x 1 , x2 ³ 0
[Ans. x1 = 2, x2 = 0, Zmin = –2]
(v) Min. Z = 5 x1 – 2 x2
s/t
2 x1 + 3 x2 ³ 1
x1, x2 ³ 0
[Ans. x1 = 0, x2 = –1/3, Zmin = –2/3]
(vi) Max. Z = x1 + 3 x2
s/t
3 x1 + 6 x2 £ 8
5 x1 + 2 x2 £ 10
[Ans. x1 = 0, x2 = 4/3, Zmax = 4]
x1, x2 ³ 0
(vii) Max. Z = 2 x1 + 3 x2
s/t
x1 + x2 ³ 1
5 x1 – x2 ³ 0
x1 + x2 £ 6
x1 – 5 x2 £ 0
x2 – x1 ³ –1
x2 £ 3
[Ans. x1 = 4, x2 = 3, Zmax = 17]
x1, x2 ³ 0
(viii) Find the maximum and minimum value of Z given by
Z = 5 x1 + 3 x2
s/t
x1 + x2 £ 6
2 x1 + 3 x2 ³ 3
0 £ x1 £ 3
[Ans. x1 = 3, x2 = 3, Zmax = 24]
0 £ x2 £ 3
Download