Math 438 ACTIVITY 9: WHY: Graphical Solution of [Two – variable] Linear Programming Problems The Extreme Value Theorem tells us that if one restriction is met [the objective function is ppropriately bounded on the feasible region], we can solve LP problems by searching through the extreme points of the feasible region. This activity illustrates a solution technique for linear programming problems with two variables. The solution technique is not practical in general because of the two-dimension limitation, but it does demonstrate the meaning of the Extreme Value Theorem and illustrates the proof in the two-dimensional case. It also gives us a visualization for understanding our eventual solution process. LEARNING OBJECTIVES: 1. Discover how to plot a feasible region and find the extreme points and direction vectors. 2. Discover the geometric and algebraic meanings of the Extreme Point Theorem. 3. Understand the role of visualization in learning. CRITERIA: 1. The depth of understanding of the solution methodology demonstrated in your answers to the Critical Thinking Questions. 2. Success in applying the methodology to homework and quiz problems. METHODOLOGY: 1. Plot Feasible Region 2. Find Extreme Points and Direction Vectors 3. Test for Boundedness 4. Test Extreme Points 5. Check Answer Graph the bounding hyperplanes and shade in the correct halfspaces. Solve pairs of bounding hyperplane equations which represent intersections at extreme points. Find direction vectors of bounding rays (if any) Find how the value of z changes along direction vectors - check for upper/lower bound Substitute the extreme points into the objective function to find the optimal solution. Make sure that the solution is reasonable and that the objective function is bounded. RESOURCES: 1. Section 3.1: Strategic Mathematics. 2. 40 minutes PLAN: Work through the models and answer the Critical thinking questions. MODEL 1: The LP problem representing exercise 1.6. Recall that this problem can be written as follows: maximize subject to: 1. Plot Feasible Region 2. Find Extreme Points and Direction Vectors 10y1 + 300y2 0.2y1 + 30y2 ≤ 0.05 1.5y1 + 35y2 ≤ 0.07 y1 ≥ 0, y2 ≥ 0 Graph the bounding hyperplanes and shade in the correct halfspaces. Solve pairs of bounding hyperplane equations which represent intersections at extreme points. Find direction vectors of bounding rays (if any) We need to solve the following pairs of equations (because the intersections of these hyperplanes form the extreme points - the other two intersections are of no interest for now): A.) 0.2y1 + 30y2 = 0.05 y1 = 0 1.5y B.) 1 + 35y2 = 0.07 y2 = 0 C.) y1 = 0 y2 = 0 D.)0.2y1 + 30y2 = 0.05 1.5y1 + 35y2 = 0.07 To solve D, Multiply the first equation by 15 and the second by -2 and add to get: 380y2 = 0.61 and so y2 = .0016 and y1 = .01 Thus, the extreme points are: (0, 0) (0, .00167) (.01, .0016) (.0467, 0) Theregion is bounded: there are no bounding rays, and so no direction vectors. 3. Test for Boundedness Find how the value of z changes along direction vectors - check for upper/lower bound Since the feasible region is bounded, there are no direction vectors and the objective function will be bounded above (and below) since it is continuous. Plotting P = 10y1 + 300y2 for P = .5, .1, .8 shows why there is an upper bound on the values that can be obtained and shows that the largest feasible value will be on a line passing through a corner point (an extreme point) demonstrating the Extreme Point Theorem. 4. Test Extreme Points Substitute the extreme points into the objective function to find the optimal solution. The objective function values at the four extreme points are: Extreme Point (0, 0) (0, .00167) (.0092, .0016) (.0467, 0) 10y1 + 300y2 0 .5 .58 .467 Thus, the optimal solution is at (.01, .0016) with the objective function value 0.58. 5. Check Answer Make sure that the solution is reasonable and that the objective function is bounded. We have discovered that the pill manufacturer should charge a penny for the price of a milligram of vitamin B 1 and 0.16 cents for a milligram of vitamin C. This ensures that the equivalent value of the vitamins in the two cereals per ounce remains less than or equal their costs per ounce. Since the feasible region was bounded we know that the objective function has to be bounded. DISCUSSION: Step 1. Plot the Feasible Region It is important to carefully graph each inequality on the same graph and shade in the intersection of the halfspaces obtained. Check that the origin satisfies the inequality if you have indicated that it is in the halfspace you claim satisfies the inequality. It helps to choose a point in the feasible region you have shaded and make sure it satisfies all the inequalities. Step 2. Find Extreme Points and Direction Vectors From the graph of the feasible region you can tell which of the points formed by intersecting the boundaries are extreme points. Solve the pairs of equations which intersect at the extreme points for their coordinates. Be careful not to include any intersection points which do not lie in the feasible region. Don't forget to keep the feasible region in the first octant to satisfy the restrictions that all variables ≥ 0. If the feasible region is unbounded, there will be two rays (possibly parts of the x 1 – and x2 – axes) that extrend toward infinity. The positive (increasing x1 or x2 ) directions of these will be the direction vectors Step 3. Test for Boundedness If the feasible region is bounded as it was in Model 1, the objective function will be bounded above and below. If the feasible region is unbounded and the problem is to minimize the objective function, the proof of the Extreme Point Theorem shows us the function will be unbounded only if it continually grows smaller as we move along some direction vector. We can test for boundedness by the following steps: 1. Evaluate z at some extreme point of the feasible region. 2. Move in the direction of one of the direction vectors to a new point – preferably outside the convex hull of the extreme points - and evaluate z 3. Select another point along the other (there will only be two) direction vector from the initial point (again, preferably outside the convex hull of the extreme points) and evaluate z . If either of these values is smaller than the z value at the initial point, then CTYi is negative for the corresponding direction vector Yi and the objective function is unbounded on the feasible region; otherwise f is bounded on the feasible region and we can proceed to step 4. Step 4. Test Extreme Points We can plug the extreme points into the objective function to find the one which minimizes (or maximizes if the problem is a maximization one) the objective function. If there are many extreme points, you can identify the optimal one by plotting the objective function as in step 3 and sweeping it across the feasible region in such a way that the z values decrease (or increase for a maximization problem). The last extreme point hit by the graph of the objective function will be the optimal solution point. Step 5. Check Answer Substitute the optimal solution into all the inequalities to make sure it satisfies them all. Double check the boundedness of the feasible region and the boundedness of the objective function if the feasible region is not bounded. Try to translate the answer into the terms of the problem. MODEL 2: Exercise 1.5 on page 44. This problem is stated as follows: minimize subject to Step 1. Step 2. Plot the Feasible Region .05x1 + .07x2 0.2x1 + 1.5x2 ≥ 10 30x1 + 35x2 ≥ 300 x1 ≥ 0, x2 ≥ 0 [shown below] Find Extreme Points and Direction Vectors The extreme points are (0, 8.6) (50,0) and the intersection of 0.2x1 + 1.5x2 ≥ 10. and 30x1 + 35x2 ≥ 300 which is (2.65, 6.3). The region is unbounded – the bounding rays are the x1-axis to the right of (50, 0) and the x2 -axis above (0, 8.6), so the direction vectors can be written as (1,0) and (0,1) Step 3. Test for Boundedness The feasible region is unbounded, so we have to test the function: 1.) We calculate the objective function at a point in the feasible region (pick a corner so we can re-use the result if we get lucky) At (50,0) the value of the objective function is z = .05 (50) + .07 (0) = 2.5 2.) Adding 10 times the direction vector (1,0) gives us the point (60,0). At this point, z = .05(60) + .07(0) = 3.0 which is not smaller than our initial z. 3.) Adding 10 times the direction vector (0,1) to the initial point gives (50, 10). At this point, z = .05(50) + .07(10) = 3.2 - which is not smaller than our initial z. Neither direction vector causes a decrease in z - so the function is bounded below on this feasible region. [z is not bounded above - but we don't care about that because we are minimizing]. Step 4. Test Extreme Points Of all the extreme points, (2.65, 6.3)gives the smallest value for z. Increasing either x 1 or x2 (from these values) leads to an increase in cost [check this] so this is the minimum solution. Step 5. Check Answer The optimal solution seems to be for the mother to purchase 2.65 ounces of Crackle and 6.3 ounces of Snap for a minimum cost of 58 cents to satisfy the minimum daily requirements. This seems reasonable. CRITICAL THINKING QUESTIONS: 1. 2. 3. 4. 5. 6. How can you check algebraically/numerically whether the model 2 answer is correct? [What happens to z as we move away from the optimal solution – staying in the feasible region] Do it. If the feasible region to a linear programming problem is a polytope, (bounded) why are you guaranteed to get an optimal solution? What is wrong with the following purely algebraic procedure for finding the solution to a (two-variable) linear programming problem? Procedure: Solve each pair of constraints simultaneously. Plug each of the points you get into the objective function. The one which yields the smallest (or largest for a maximization problem) value of the objective function is the optimal solution. If one of the constraints in a two-variable linear programming problem is an equality (“=”) constraint, what is the dimension of the feasible region? If there are two equality constraints with different slopes, what is the feasible region dimension? What would happen if the objective function for Model 2 (same feasible region) was .05x 1 - .07x2 [still minimizing]? Is this result consistent with the Extreme Point Theorem ? If we can find the extreme points and direction vectors of the feasible region of a problem with three or more variables (difficult to graph, but might be possible), can we find the solution by the technique given here? [Plugging the extreme points into the objective function, checking for correct sort of boundedness along direction vectors]