3 Linear Programming A Geometric Approach u Graphing

  • Slides: 67
Download presentation
3 Linear Programming: A Geometric Approach u Graphing Systems of Linear Inequalities in Two

3 Linear Programming: A Geometric Approach u Graphing Systems of Linear Inequalities in Two Variables u Linear Programming Problems u Graphical Solutions of Linear Programming Problems u Sensitivity Analysis

3. 1 Graphing Systems of Linear Inequalities in Two Variables

3. 1 Graphing Systems of Linear Inequalities in Two Variables

Graphing Linear Inequalities u We’ve seen that a linear equation in two variables x

Graphing Linear Inequalities u We’ve seen that a linear equation in two variables x and y has a solution set that may be exhibited graphically as points on a straight line in the xy-plane. u There is also a simple graphical representation for linear inequalities of two variables:

Procedure for Graphing Linear Inequalities 1. Draw the graph of the equation obtained for

Procedure for Graphing Linear Inequalities 1. Draw the graph of the equation obtained for the given inequality by replacing the inequality sign with an equal sign. ✦ Use a dashed or dotted line if the problem involves a strict inequality, < or >. ✦ Otherwise, use a solid line to indicate that the line itself constitutes part of the solution. 2. Pick a test point lying in one of the half-planes determined by the line sketched in step 1 and substitute the values of x and y into the given inequality. ✦ Use the origin whenever possible. 3. If the inequality is satisfied, the graph of the inequality includes the half-plane containing the test point. ✦ Otherwise, the solution includes the half-plane not containing the test point.

Examples u Determine the solution set for the inequality 2 x + 3 y

Examples u Determine the solution set for the inequality 2 x + 3 y 6. Solution u Replacing the inequality with an equality =, we obtain the equation 2 x + 3 y = 6, whose graph is: y 7 5 2 x + 3 y = 6 3 1 – 5 Example 1, page 158 – 3 – 1 1 3 5 x

Examples u Determine the solution set for the inequality 2 x + 3 y

Examples u Determine the solution set for the inequality 2 x + 3 y 6. Solution u Picking the origin as a test point, we find 2(0) + 3(0) 6, or 0 6, which is false. u Thus, the solution set is: y 7 5 2 x + 3 y 6 2 x + 3 y = 6 3 1 – 5 Example 1, page 158 – 3 – 1 (0, 0) 1 3 5 x

Graphing Systems of Linear Inequalities u The solution set of a system of linear

Graphing Systems of Linear Inequalities u The solution set of a system of linear inequalities in two variables x and y is the set of all points (x, y) that satisfy each inequality of the system. u The graphical solution of such a system may be obtained by graphing the solution set for each inequality independently and then determining the region in common with each solution set.

Examples u Graph x – 3 y > 0. Solution u Replacing the inequality

Examples u Graph x – 3 y > 0. Solution u Replacing the inequality > with an equality =, we obtain the equation x – 3 y = 0, whose graph is: y 3 x – 3 y = 0 1 – 5 – 3 1 – 3 3 5 x

Examples u Graph x – 3 y > 0. Solution u We use a

Examples u Graph x – 3 y > 0. Solution u We use a dashed line to indicate the line itself will not be part of the solution, since we are dealing with a strict inequality >. y 3 x – 3 y = 0 1 – 5 – 3 1 – 3 3 5 x

Examples u Graph x – 3 y > 0. Solution u Since the origin

Examples u Graph x – 3 y > 0. Solution u Since the origin lies on the line, we cannot use the origin as a testing point: y 3 x – 3 y = 0 1 (0, 0) – 5 – 3 1 – 3 3 5 x

Examples u Graph x – 3 y > 0. Solution u Picking instead (3,

Examples u Graph x – 3 y > 0. Solution u Picking instead (3, 0) as a test point, we find (3) – 2(0) > 0, or 3 > 0, which is true. u Thus, the solution set is: y 3 x – 3 y = 0 1 (3, 0) – 5 – 3 1 3 – 1 x – 3 y > 0 – 3 5 x

Graphing Systems of Linear Inequalities u The solution set of a system of linear

Graphing Systems of Linear Inequalities u The solution set of a system of linear inequalities in two variables x and y is the set of all points (x, y) that satisfy each inequality of the system. u The graphical solution of such a system may be obtained by graphing the solution set for each inequality independently and then determining the region in common with each solution set.

Example u Determine the solution set for the system Solution u The intersection of

Example u Determine the solution set for the system Solution u The intersection of the solution regions of the two inequalities represents the solution to the system: y 4 x + 3 y = 12 4 4 x + 3 y 12 3 2 1 – 1 Example 4, page 159 1 2 3 x

Example u Determine the solution set for the system Solution u The intersection of

Example u Determine the solution set for the system Solution u The intersection of the solution regions of the two inequalities represents the solution to the system: y 4 3 x–y 0 x–y=0 2 1 – 1 Example 4, page 159 1 2 3 x

Example u Determine the solution set for the system Solution u The intersection of

Example u Determine the solution set for the system Solution u The intersection of the solution regions of the two inequalities represents the solution to the system: y 4 x + 3 y = 12 4 x–y=0 3 2 1 – 1 Example 4, page 159 1 2 3 x

Bounded and Unbounded Sets u The solution set of a system of linear inequalities

Bounded and Unbounded Sets u The solution set of a system of linear inequalities is bounded if it can be enclosed by a circle. u Otherwise, it is unbounded.

Example u The solution to the problem we just discussed is unbounded, since the

Example u The solution to the problem we just discussed is unbounded, since the solution set cannot be enclosed in a circle: y 4 x + 3 y = 12 4 3 x–y=0 2 1 – 1 1 2 3 x

Example u Determine the solution set for the system Solution u The intersection of

Example u Determine the solution set for the system Solution u The intersection of the solution regions of the four inequalities represents the solution to the system: y 7 5 3 1 – 1 Example 5, page 160 1 3 5 9 x

Example u Determine the solution set for the system Solution u Note that the

Example u Determine the solution set for the system Solution u Note that the solution to this problem is bounded, since it can be enclosed by a circle: y 7 5 3 1 – 1 Example 5, page 160 1 3 5 9 x

3. 2 Linear Programming Problems

3. 2 Linear Programming Problems

Linear Programming Problem u A linear programming problem consists of a linear objective function

Linear Programming Problem u A linear programming problem consists of a linear objective function to be maximized or minimized subject to certain constraints in the form of linear equations or inequalities.

Applied Example 1: A Production Problem u Ace Novelty wishes to produce two types

Applied Example 1: A Production Problem u Ace Novelty wishes to produce two types of souvenirs: type u u -A will result in a profit of $1. 00, and type-B in a profit of $1. 20. To manufacture a type-A souvenir requires 2 minutes on machine I and 1 minute on machine II. A type-B souvenir requires 1 minute on machine I and 3 minutes on machine II. There are 3 hours available on machine I and 5 hours available on machine II. How many souvenirs of each type should Ace make in order to maximize its profit? Applied Example 1, page 164

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information:

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information: Type-A Type-B Time Available Profit/Unit $1. 00 $1. 20 Machine I 2 min 180 min Machine II 1 min 300 min u Let x be the number of type-A souvenirs and y the number of type-B souvenirs to be made. Applied Example 1, page 164

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information:

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information: Type-A Type-B Time Available Profit/Unit $1. 00 $1. 20 Machine I 2 min 180 min Machine II 1 min 300 min u Then, the total profit (in dollars) is given by which is the objective function to be maximized. Applied Example 1, page 164

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information:

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information: Type-A Type-B Time Available Profit/Unit $1. 00 $1. 20 Machine I 2 min 180 min Machine II 1 min 300 min u The total amount of time that machine I is used is and must not exceed 180 minutes. u Thus, we have the inequality Applied Example 1, page 164

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information:

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information: Type-A Type-B Time Available Profit/Unit $1. 00 $1. 20 Machine I 2 min 180 min Machine II 1 min 300 min u The total amount of time that machine II is used is and must not exceed 300 minutes. u Thus, we have the inequality Applied Example 1, page 164

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information:

Applied Example 1: A Production Problem Solution u Let’s first tabulate the given information: Type-A Type-B Time Available Profit/Unit $1. 00 $1. 20 Machine I 2 min 180 min Machine II 1 min 300 min u Finally, neither x nor y can be negative, so Applied Example 1, page 164

Applied Example 1: A Production Problem Solution u In short, we want to maximize

Applied Example 1: A Production Problem Solution u In short, we want to maximize the objective function subject to the system of inequalities u We will discuss the solution to this problem in section 3. 3. Applied Example 1, page 164

Applied Example 2: A Nutrition Problem u A nutritionist advises an individual who is

Applied Example 2: A Nutrition Problem u A nutritionist advises an individual who is suffering from u u iron and vitamin B deficiency to take at least 2400 milligrams (mg) of iron, 2100 mg of vitamin B 1, and 1500 mg of vitamin B 2 over a period of time. Two vitamin pills are suitable, brand-A and brand-B. Each brand-A pill costs 6 cents and contains 40 mg of iron, 10 mg of vitamin B 1, and 5 mg of vitamin B 2. Each brand-B pill costs 8 cents and contains 10 mg of iron and 15 mg each of vitamins B 1 and B 2. What combination of pills should the individual purchase in order to meet the minimum iron and vitamin requirements at the lowest cost? Applied Example 2, page 165

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information:

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information: Brand-A Brand-B 6¢ 8¢ Iron 40 mg 10 mg 2400 mg Vitamin B 1 10 mg 15 mg 2100 mg Vitamin B 2 5 mg 1500 mg Cost/Pill Minimum Requirement u Let x be the number of brand-A pills and y the number of brand-B pills to be purchased. Applied Example 2, page 165

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information:

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information: Brand-A Brand-B 6¢ 8¢ Iron 40 mg 10 mg 2400 mg Vitamin B 1 10 mg 15 mg 2100 mg Vitamin B 2 5 mg 1500 mg Cost/Pill Minimum Requirement u The cost C (in cents) is given by and is the objective function to be minimized. Applied Example 2, page 165

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information:

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information: Brand-A Brand-B 6¢ 8¢ Iron 40 mg 10 mg 2400 mg Vitamin B 1 10 mg 15 mg 2100 mg Vitamin B 2 5 mg 1500 mg Cost/Pill Minimum Requirement u The amount of iron contained in x brand-A pills and y brand-B pills is given by 40 x + 10 y mg, and this must be greater than or equal to 2400 mg. u This translates into the inequality Applied Example 2, page 165

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information:

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information: Brand-A Brand-B 6¢ 8¢ Iron 40 mg 10 mg 2400 mg Vitamin B 1 10 mg 15 mg 2100 mg Vitamin B 2 5 mg 1500 mg Cost/Pill Minimum Requirement u The amount of vitamin B 1 contained in x brand-A pills and y brand-B pills is given by 10 x + 15 y mg, and this must be grater or equal to 2100 mg. u This translates into the inequality Applied Example 2, page 165

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information:

Applied Example 2: A Nutrition Problem Solution u Lets first tabulate the given information: Brand-A Brand-B 6¢ 8¢ Iron 40 mg 10 mg 2400 mg Vitamin B 1 10 mg 15 mg 2100 mg Vitamin B 2 5 mg 1500 mg Cost/Pill Minimum Requirement u The amount of vitamin B 2 contained in x brand-A pills and y brand-B pills is given by 5 x + 15 y mg, and this must be grater or equal to 1500 mg. u This translates into the inequality Applied Example 2, page 165

Applied Example 2: A Nutrition Problem Solution u In short, we want to minimize

Applied Example 2: A Nutrition Problem Solution u In short, we want to minimize the objective function subject to the system of inequalities u We will discuss the solution to this problem in section 3. 3. Applied Example 2, page 165

3. 3 Graphical Solutions of Linear Programming Problems

3. 3 Graphical Solutions of Linear Programming Problems

Feasible Solution Set and Optimal Solution u The constraints in a linear programming problem

Feasible Solution Set and Optimal Solution u The constraints in a linear programming problem form a u u u system of linear inequalities, which have a solution set S. Each point in S is a candidate for the solution of the linear programming problem and is referred to as a feasible solution. The set S itself is referred to as a feasible set. Among all the points in the set S, the point(s) that optimizes the objective function of the linear programming problem is called an optimal solution.

Theorem 1 Linear Programming u If a linear programming problem has a solution, then

Theorem 1 Linear Programming u If a linear programming problem has a solution, then it must occur at a vertex, or corner point, of the feasible set S associated with the problem. u If the objective function P is optimized at two adjacent vertices of S, then it is optimized at every point on the line segment joining these vertices, in which case there are infinitely many solutions to the problem.

Theorem 2 Existence of a Solution u Suppose we are given a linear programming

Theorem 2 Existence of a Solution u Suppose we are given a linear programming problem with a feasible set S and an objective function P = ax + by. a. If S is bounded, then P has both a maximum and a minimum value on S. b. If S is unbounded and both a and b are nonnegative, then P has a minimum value on S provided that the constraints defining S include the inequalities x 0 and y 0. c. If S is the empty set, then the linear programming problem has no solution: that is, P has neither a maximum nor a minimum value.

The Method of Corners 1. Graph the feasible set. 2. Find the coordinates of

The Method of Corners 1. Graph the feasible set. 2. Find the coordinates of all corner points (vertices) of the feasible set. 3. Evaluate the objective function at each corner point. 4. Find the vertex that renders the objective function a maximum or a minimum. ✦ If there is only one such vertex, it constitutes a unique solution to the problem. ✦ If there are two such adjacent vertices, there are infinitely many optimal solutions given by the points on the line segment determined by these vertices.

Applied Example 1: A Production Problem u Recall Applied Example 1 from the last

Applied Example 1: A Production Problem u Recall Applied Example 1 from the last section (3. 2), which required us to find the optimal quantities to produce of type-A and type-B souvenirs in order to maximize profits. u We restated the problem as a linear programming problem in which we wanted to maximize the objective function subject to the system of inequalities u We can now solve the problem graphically. Applied Example 1, page 175

Applied Example 1: A Production Problem u We first graph the feasible set S

Applied Example 1: A Production Problem u We first graph the feasible set S for the problem. ✦ Graph the solution for the inequality considering only positive values for x and y: y 200 (0, 180) 100 (90, 0) 100 Applied Example 1, page 175 200 300 x

Applied Example 1: A Production Problem u We first graph the feasible set S

Applied Example 1: A Production Problem u We first graph the feasible set S for the problem. ✦ Graph the solution for the inequality considering only positive values for x and y: y 200 100 (0, 100) (300, 0) 100 Applied Example 1, page 175 200 300 x

Applied Example 1: A Production Problem u We first graph the feasible set S

Applied Example 1: A Production Problem u We first graph the feasible set S for the problem. ✦ Graph the intersection of the solutions to the inequalities, yielding the feasible set S. (Note that the feasible set S is bounded) y 200 100 S 100 Applied Example 1, page 175 200 300 x

Applied Example 1: A Production Problem u Next, find the vertices of the feasible

Applied Example 1: A Production Problem u Next, find the vertices of the feasible set S. ✦ The vertices are A(0, 0), B(90, 0), C(48, 84), and D(0, 100). y 200 D(0, 100) 100 A(0, 0) C(48, 84) S B(90, 0) 100 Applied Example 1, page 175 200 300 x

Applied Example 1: A Production Problem u Now, find the values of P at

Applied Example 1: A Production Problem u Now, find the values of P at the vertices and tabulate them: Vertex P = x + 1. 2 y A(0, 0) 0 B(90, 0) 90 200 C(48, 84) 148. 8 D(0, 100) 120 y 100 A(0, 0) C(48, 84) S B(90, 0) 100 Applied Example 1, page 175 200 300 x

Applied Example 1: A Production Problem u Finally, identify the vertex with the highest

Applied Example 1: A Production Problem u Finally, identify the vertex with the highest value for P: ✦ We can see that P is maximized at the vertex C(48, 84) and has a value of 148. 8. Vertex P = x + 1. 2 y A(0, 0) 0 B(90, 0) 90 200 C(48, 84) 148. 8 D(0, 100) 120 y 100 A(0, 0) C(48, 84) S B(90, 0) 100 Applied Example 1, page 175 200 300 x

Applied Example 1: A Production Problem u Finally, identify the vertex with the highest

Applied Example 1: A Production Problem u Finally, identify the vertex with the highest value for P: ✦ We can see that P is maximized at the vertex C(48, 84) and has a value of 148. 8. ✦ Recalling what the symbols x, y, and P represent, we conclude that ACE Novelty would maximize its profit at $148. 80 by producing 48 type-A souvenirs and 84 type-B souvenirs. Applied Example 1, page 175

Applied Example 2: A Nutrition Problem u Recall Applied Example 2 from the last

Applied Example 2: A Nutrition Problem u Recall Applied Example 2 from the last section (3. 2), which asked us to determine the optimal combination of pills to be purchased in order to meet the minimum iron and vitamin requirements at the lowest cost. u We restated the problem as a linear programming problem in which we wanted to minimize the objective function subject to the system of inequalities u We can now solve the problem graphically. Applied Example 2, page 176

Applied Example 2: A Nutrition Problem u We first graph the feasible set S

Applied Example 2: A Nutrition Problem u We first graph the feasible set S for the problem. ✦ Graph the solution for the inequality considering only positive values for x and y: y (0, 240) 200 100 (60, 0) 100 Applied Example 2, page 176 200 300 x

Applied Example 2: A Nutrition Problem u We first graph the feasible set S

Applied Example 2: A Nutrition Problem u We first graph the feasible set S for the problem. ✦ Graph the solution for the inequality considering only positive values for x and y: y 200 (0, 140) 100 (210, 0) 100 Applied Example 2, page 176 200 300 x

Applied Example 2: A Nutrition Problem u We first graph the feasible set S

Applied Example 2: A Nutrition Problem u We first graph the feasible set S for the problem. ✦ Graph the solution for the inequality considering only positive values for x and y: y 200 100 (0, 100) (300, 0) 100 Applied Example 2, page 176 200 300 x

Applied Example 2: A Nutrition Problem u We first graph the feasible set S

Applied Example 2: A Nutrition Problem u We first graph the feasible set S for the problem. ✦ Graph the intersection of the solutions to the inequalities, yielding the feasible set S. (Note that the feasible set S is unbounded) y 200 S 100 Applied Example 2, page 176 200 300 x

Applied Example 2: A Nutrition Problem u Next, find the vertices of the feasible

Applied Example 2: A Nutrition Problem u Next, find the vertices of the feasible set S. ✦ The vertices are A(0, 240), B(30, 120), C(120, 60), and D(300, 0). y A(0, 240) 200 S B(30, 120) 100 C(120, 60) D(300, 0) 100 Applied Example 2, page 176 200 300 x

Applied Example 2: A Nutrition Problem u Now, find the values of C at

Applied Example 2: A Nutrition Problem u Now, find the values of C at the vertices and tabulate them: Vertex y A(0, 240) 200 A(0, 240) 1920 B(30, 120) 1140 C(120, 60) 1200 D(300, 0) 1800 S B(30, 120) 100 C = 6 x + 8 y C(120, 60) D(300, 0) 100 Applied Example 2, page 176 200 300 x

Applied Example 2: A Nutrition Problem u Finally, identify the vertex with the lowest

Applied Example 2: A Nutrition Problem u Finally, identify the vertex with the lowest value for C: ✦ We can see that C is minimized at the vertex B(30, 120) and has a value of 1140. Vertex y A(0, 240) 200 A(0, 240) 1920 B(30, 120) 1140 C(120, 60) 1200 D(300, 0) 1800 S B(30, 120) 100 C = 6 x + 8 y C(120, 60) D(300, 0) 100 Applied Example 2, page 176 200 300 x

Applied Example 2: A Nutrition Problem u Finally, identify the vertex with the lowest

Applied Example 2: A Nutrition Problem u Finally, identify the vertex with the lowest value for C: ✦ We can see that C is minimized at the vertex B(30, 120) and has a value of 1140. ✦ Recalling what the symbols x, y, and C represent, we conclude that the individual should purchase 30 brand-A pills and 120 brand-B pills at a minimum cost of $11. 40. Applied Example 2, page 176

3. 4 Sensitivity Analysis

3. 4 Sensitivity Analysis

Sensitivity Analysis u Sensitivity analysis consists of studying how significantly do changes in the

Sensitivity Analysis u Sensitivity analysis consists of studying how significantly do changes in the parameters of a linear programming problem affect its optimal solution. u We shall apply this analysis to Applied Example 1 that we discussed in the previous two sections (3. 1 and 3. 2).

Applied Example 1: A Production Problem u Recall that Applied Example 1 required us

Applied Example 1: A Production Problem u Recall that Applied Example 1 required us to find the optimal quantities to produce of type-A and type-B souvenirs in order to maximize profits. u In section 3. 2 we restated the problem as a linear programming problem in which we wanted to maximize the objective function subject to the system of inequalities Changes in the Coefficients of the Objective Function, page 187

Applied Example 1: A Production Problem u In section 3. 3, we found that

Applied Example 1: A Production Problem u In section 3. 3, we found that P is maximized at the vertex C(48, 84) and has a value of 148. 8. u Thus, ACE Novelty maximizes its profit at $148. 80 by producing 48 type-A souvenirs and 84 type-B souvenirs. y 200 D(0, 100) C(48, 84) 100 A(0, 0) S B(90, 0) 100 200 300 x

Applied Example 1: A Production Problem u How do changes in the coefficients of

Applied Example 1: A Production Problem u How do changes in the coefficients of the objective function affect the optimal solution? ✦ The objective function is ✦ The coefficient of x is 1, which tells us that the contribution to the profit for each type-A souvenir is $1. 00. ✦ We want to know by how much this coefficient can change without changing the optimal solution. ✦ Suppose the contribution to the profit of each type-A souvenir is $c, so that ✦ We need to determine the range of values for which the solution we determined remains optimal.

Applied Example 1: A Production Problem u How do changes in the coefficients of

Applied Example 1: A Production Problem u How do changes in the coefficients of the objective function affect the optimal solution? ✦ We can rewrite the profit equation (the isoprofit line) containing the c coefficient in slope-intercept form: ✦ The slope of the isoprofit line is –c/1. 2.

Applied Example 1: A Production Problem u How do changes in the coefficients of

Applied Example 1: A Production Problem u How do changes in the coefficients of the objective function affect the optimal solution? ✦ If the slope of the isoprofit line, –c/1. 2, exceeds that of the line associated with constraint 2, then the optimal solution shifts from point C to point D: y Constraint 1: (slope = – 2) 150 50 A Constraint 2: C D S (slope = – 1/3) B 100 200 300 x

Applied Example 1: A Production Problem u How do changes in the coefficients of

Applied Example 1: A Production Problem u How do changes in the coefficients of the objective function affect the optimal solution? ✦ If the slope of the isoprofit line, –c/1. 2, is less than that of the line associated with constraint 1, then the optimal solution shifts from point C to point B: y Constraint 1: (slope = – 2) 150 50 A Constraint 2: C D S (slope = – 1/3) B 100 200 300 x

Applied Example 1: A Production Problem u How do changes in the coefficients of

Applied Example 1: A Production Problem u How do changes in the coefficients of the objective function affect the optimal solution? ✦ Thus, as long as 0. 4 c 2. 4, the optimal solution of C(48, 84) remains unaffected. ✦ In other words, as long as the contribution to the profit of type-A souvenirs lies between $. 40 and $2. 40, Ace Novelty should still make 40 type-A souvenirs and 84 type-B souvenirs. ✦ This demonstrates that the parameter c in this problem is not sensitive. ✦ A similar sensitivity analysis can be conducted regarding the contribution to the profit of the type-B souvenir.

End of Chapter

End of Chapter