WWW.CEMC.UWATERLOO.CA The CENTRE for EDUCATION in MATHEMATICS and COMPUTING Intermediate Math Circles Wednesda November 21 2012 Inequalities and Linear Optimization Review: Our goal is to solve sstems of linear inequalities and to graph the regions corresponding to them. We will connect this topic to linear optimization. To graph a linear inequalit: 1. Graph the corresponding linear inequalit. To do this, find an two points on the line, plot them and draw a line passing through them. The and intercepts of the line often work well for the two points. If the inequalit is a strict inequalit ( < or > ), the line is drawn as a dashed line. 2. Select a test point that is clearl not on the line to substitute into the inequalit. (a) If the test point satisfies the inequalit, shade the region that includes the test point. (b) If the test point does not satisf the inequalit, shade the region that does not include the test point. Eample 1: Sketch the inequalit 2 + < 4. Since the inequalit is strict, a dashed line is drawn. First, graph 2 + = 4 using an method (intercept method used here). 2 + = 4 2 0 0 4 Test the point (0, 0). LS = 2(0) + (0) = 0 < 4 = RS. Hence (0, 0) is in the region, so shade below the line. 1
Eample 2: Sketch the inequalit 3 + 0. Since it is not a strict inequalit, we use a solid line. Graph 3 + 0 using an method. 3 + = 0 0 0-3 1 1-3 Test the point (5, 0). LS = 3(0) + (5) = 5 > 0 = RS. Hence (5, 0) is in the region, so shade above the line. To graph more than one linear inequalit, we graph each inequalit as before. The feasible region is the part of the graph in which each point satisfies ever inequalit at the same time. We ma also be interested in the points that make up the corners of the feasible region. These points could be where lines cross the or aes, or intersections of pairs of lines. Eample 3: Sketch the feasible region of + 4 + 2 7 + = 4 Graph + = 4 and + 2 = 7 using an method. (1, 3) + 2 = 4 4 0 0 4 7 0 0 3.5 Test (0, 0) Test (0, 0) LS = +, RS = 4 LS = + 2, RS = 7 LS = 0 < 4 = RS LS = 0 < 7 = RS Therefore both test points are in their respective regions. To find the point of intersection, subtract the first equation from the second equation. + = 4 (1) + 2 = 7 (2) = 3 (2) (1) Substitute = 3 into (1); + (3) = 4 and hence = 1. Therefore the point of intersection is (1, 3). 2
Eample 4: Sketch the region for the sstem 3 + 2 + Graph 3 + = 2 + = = -3 + = -2 A: (2, 4) = 0-2 3 7 0 0 0 0 5 5 C: (1, 1) B: (3, 3) + = Test (0, 0) Test (0, 0) Test (3, 0) 0 > -2 0 < 0 < 3 Not in Region In Region Not in Region For the sake of completeness, the intersection points are solved for below. 3 + = 2 (1) 3 + = 2 (1) = (1) + = (2) = (2) + = (2) (1) (2) (2) (1) (1) (2) 3 = 2 3 + = 2 + = 4 = 8 2 = 2 2 = = 2, = 4 (A) = 1, = 1 (C) = 3, = 3 (B) These points have been indicated on the graph. Eample 5: Maimize P = 4 3 subject to the above constraints. The feasible region gives us all possible pairs of (, ) that satisf ever constraint (inequalit). The intersection points are the corners of the feasible region. There is a theorem that states that the corner points of a feasible region maimize or minimize the objective function. In this case, we want to maimize our objective function, which is P = 4 3 (ou could also have been asked to find the minimum value of the function). To find the corner point which maimizes the objective function, substitute each point and compare the values. The point which gives the highest value is the point which maimizes the objective function. Point P = 4 3 A (2, 4) P = 4(2) 3(4) = 4 B (3, 3) P = 4(3) 3(3) = 3 C (1, 1) P = 4(1) 3(1) = 1 B inspection, B produces the maimum value; hence b the theorem stated above, it maimizes the objective function. Therefore, the maimum value of P (subject to the constraints) is 3 when = 3 and = 3. 3
Eample : Minimize: C = 4 2 Subject to: 3 + 2 + 5 5 0 0 Since 0, we want points on the -ais or to the right of the -ais. Since 0, we want points on or above the -ais. Combining the two constraints, we onl want points in the first quadrant and on the positive and aes. Graph (5/, 5/) 3 + 2 = + 5 = 5 = 0-2 3 7 0 0 0 0 5 5 Test: (0, 0) (0, 0) (0, 5) 0 < 0 < 5 5 > 0 In Not in In Intersection Points The intersection points that occur on the aes are eas to see. To find the intersection point of the lines = and + 5 = 5, use substitution. Since =, substitute this into + 5 = to obtain = 5. Solving gives = 5. Since the intersection point satisfies =, = 5 ( 5 as well. Hence the point is, 5 ). It remains to minimize the objective function C = 4 2. Point C = 4 2 (0, 1) C = 4(0) 2(1) = 2 (0, 3) P = 4(0) 2(3) = ( 5, 5 ) P = 4( 5 ) 2(5 ) = 10 The minimum value is clearl -. Hence when = 0 and = 3, the objective function C is minimized (subject to the constraints). 4
Usuall in real world problems, the objective function and constraints are not given. We have to translate the problem into a mathematical model which we can then solve. In order to do this: 1. Define our variables. 2. State the objective function. 3. Determine appropriate constraints. Eample 7: A farmer is miing two tpes of food, brand X and brand Y, for his cattle. Each serving is required to have at least 0 grams of protein and at least 30 grams of fat. Brand X has 15 grams of protein, 10 grams of fat and costs 80 cents per unit. Brand Y contains 20 grams of protein, 5 grams of fat, and costs 50 cents per unit. How much of each brand should be used so that his cost is minimized while still satisfing the requirements for the cattle? Solution 1. Let represent the amount of Brand X to bu. Let represent the amount of Brand Y to bu. Let C represent the cost of purchasing the food. 2. Objective Function: C = 0.8 + 0.5 3. Constraints: 15 + 20 0 10 + 5 30 0 0 (Protein amount) (Fat amount) (Cannot bu negative amounts) Graph (0, ) 15 + 20 = 0 10 + 5 = 30 4 0 0 3 3 0 0 Test (0, 0) Test (0, 0) 0 0 0 30 Not in Region Not in Region (4, 0) 5
It remains to find the points of intersection/corner points which are used to determine the minimize cost. The intercepts are easil seen; it remains to find the intersection of the two lines: 10 + 5 = 30 1 15 + 20 = 0 2 4 1 40 + 20 = 120 1 2 15 + 20 = 0 25 = 0 = 0 25 = 2.4 Substituting this value into 1 : 24 + 5 = 30 5 = Hence the third intersection point is (2.4, 1.2). = 1.2 Inputting these points into the objective function and comparing: Point C = 0.8 + 0.5 (4, 0) C = 0.8(4) + 2(0) = 3.2 (0, ) C = 0.8(0) + 0.5() = 3 (2.4, 1.2) P = 0.8(2.4) + 0.5(1.2) = 2.52 So (2.4, 1.2) produces the minimal value, and hence minimizes the objective function. Therefore, the minimum cost (subject to the constraints) is $2.52 when 2.4 units of brand X and 1.2 units of brand Y are used.