Linear Programming (Optimization) 2 Examples Minimize & Maximize

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video you're gonna learn how to work with linear programming problems so let's dive in the first thing you want to know is how to work with the constraints the feasible region and your objective function what you're trying to minimize or maximize so just a bird's eye view what you're trying to do is you're trying to graph these linear inequalities and what you get is an overlapping region that satisfies all those constraints or those inequalities and this red region here I'm just showing you an example this would represent what's called our feasible region and if you pick any point in that region it satisfies the constraints but what's interesting is that at the vertices at these points on this polygon that's formed here will give you either a maximum value or a minimum value depending on what you're trying to find so let's go ahead and do a basic example first where we're trying to minimize and then we're gonna do a word problem where we're gonna try to maximize okay so for number one our objective function is this Z equals 2x plus 3y and what we want to do is we want to minimize Z we want to find the smallest value for Z now that constraints this is what these are our restrictions or these are our inequalities we want to graph to get our feasible region so X is greater than equal to 0 that's a vertical line and greater than we're gonna be shading to the right Y is greater than or equal to 0 y equals lines are horizontal lines and that's gonna be greater than that's gonna be above so what that does is that puts us in the first quadrant we've got two more we've got 3x plus 6 y is greater than equal to 24 what I'm going to do for this one is I'm just going to make a table and find the x and y intercepts so if X is 0 3 times 0 is 0 so I'm just going to cover that up divide both sides by 6 so you can see that Y is going to equal 4 and then if I set Y to 0 0 times 6 is 0 and if I divide by 3 to both sides X is going to equal 8 so that's just a quick way this is called the intercept method of graphing inequality so we've got 0 4 1 2 3 4 that's going to put us right here and 8 0 1 2 3 4 5 6 7 8 0 and I'm just going to draw a solid line because it's equal to and then when you graph using the X and y intercepts like this you want to pick a point on either side of this line and test it to see if it makes it true so for example if I put zero zero in that's the origin this test point here is zero greater than equal to 24 well no so that means we wouldn't want to shade on this side of the line we want to shade on this side of the line so let me go ahead and just draw some lines just so we know we're on this side okay for the second inequality Y is greater than or equal to negative 3 X plus 9 so we see that the y-intercept is 9 so that's going to be 1 2 3 4 5 6 7 8 9 the slope is negative 3 which is like negative 3 over 1 so we're going to go down 3 or 1 down 3 over 1 etc so let me just kind of draw this in okay something like that and this one Y is by itself and when y is greater then that means that we're going to be shading above the line so what that means is I'm going to be shading on this side of the line so let me just draw some lines just to illustrate some shading here ok like that now you can see that we were above the x-axis we were to the right of the y-axis were above this line and we're above this line so what happens here is that where do all these regions overlap well they're overlapping right here here here in like this so basically if I kind of go back and shade this a little bit darker here it's gonna put us in this region here now this is what's referred to as an unbounded region because you can see it keeps going like this it keeps going over to it like that and so you know continues forever and ever but what we're gonna do now is we're gonna pick the points these vertices along this region here so we're gonna take this point here which was the point let's see 1 2 3 4 5 6 7 8 9 so 0 9 we're to take this point here which we're gonna solve for in a minute and then we're gonna take this point here which is 1 2 3 4 5 6 7 8 comma 0 now how do we find this point here this is probably the toughest part of the problem well remember this is this line and this is this line and we're trying to find where the intersects so that's these two lines here so what we're gonna do is we're going to treat them like equations not inequalities now if we're just going to treat them like lines we want to find the intersection point and I think the easiest way to do this one is to use substitution so if Y is equal to negative 3x plus 9 let's put that in place of Y here in this equation so we get 3x plus 6 times negative 3x plus 9 is equal to 24 so let's go ahead and solve this distribute that gives us negative 18x plus 54 bring down the 3x this comes out to negative 15 X subtract the 54 that's negative 30 and divide both sides by negative 15 and X is equal to 2 now if we take 2 and we put it back in here you get negative 3 times 2 is negative 6 plus 9 is 3 so you can see Y is equal to 3 and that's the coordinates of this point right here 2 comma 3 so now what we're gonna do is we're going to take these vertices put them into our objective function and see which one gives us the minimum value the smallest value so let's go ahead and put 0 in for X 9 and for y so that's going to be 2 times 0 which is 0 3 times 9 is 27 0 plus 27 is 27 so for this point we get a value of 27 let's put in 2 & 3 so 2 4 X 2 times 2 is 4 3 times 3 is 9 4 plus 9 is 13 okay at that point and then if we pick 8 0 2 times 8 is 16 3 times 0 0 16 plus zero is 16 so which one gave us the minimum value it looks like this one right here 13 so to minimize you would want there to be 2 of whatever the X quantity is 3 whatever whatever the Y quantity is and that's going to give you a minimum value of 13 so let's go ahead and dive into a word problem now where we're gonna maximize the profit before we dive into this word problem if you're new to the channel and we haven't met yet my name is Mario of Mario's math tutoring and my goal for this channel is to make learning math less stressful so that you can raise your grade pass your class and go on to pursue your dreams so I'm a full time math tutor I work with students every day and what I do is I try to find simplest and easiest and most understandable way to do some of these problems and I take it and try to condense it down and put it into these videos so that you can benefit from from my tutoring as well so if that's something you're interested in check out more videos on my Mario's math tutoring YouTube channel but let's dive into number two a company produces two bikes a mountain bike in a road bike it takes three hours to assemble a mountain bike and takes four hours to assemble a road bike the total time available to assemble bikes is 60 hours the company wants to have at least twice as many mountain bikes as road bikes to sell the company makes a profit of $200 per road bike and $100 per mountain bike how many of each bike should be made to maximize the profit so that's kind of a lot of words there and usually what I recommend when you're doing these story problems is just kind of read through real quickly you don't have to get everything the first time and then usually what you want to focus on on these optimization these linear programming problems is is the last sentence that'll you tell you the story as far as what you're looking to to maximize or minimize and it'll also tell you what your variables are so let's do that so it says how many of each bike should be made to maximize the profit so we know we're trying to maximize profit and we're trying to figure out how many rode bikes on how many mountain bikes so why don't we call the mountain bikes ax and we're gonna call the road bikes Y okay so on our graph here I'm just gonna say X is mountain bikes and Y over here is going to be the road bikes okay so now let's look at what are called the constraints these are our restrictions or limitations see how it says it takes three hours to assemble a mountain bike and four hours to assemble a road bike but you only have sixty hours available so can you work more than 60 hours no it has to be less than or equal to 60 so we've got three hours to assemble a mountain bike we have four hours to assemble a road bike but the amount of time spent assembling has to be less than or equal to 60 hours now notice like see if you assembled like four mountain bikes well four times three hours per mountain bike that's 12 hours assembling mountain bikes right or if you did five road bikes five times four hours to assemble one road bike that's 20 hours spent and you want to make sure that two less than or equal to 60 now what other constraints are there well we know that you can't assemble like a negative number of bikes right so right off the bat we know that X has to be greater than or equal to 0 the number of mountain bikes and the number of road bikes also has to be greater than because 0 so what that does is it puts us you know in this first quadrant because X is greater than equal to 0 y is greater than 0 those are gonna overlap in the first quadrant but we also have one more constraint here it says the company wants to have at least twice as many mountain bikes as road bikes to sell right so they want to have at least twice as many mountain bikes so the number of mountain bikes X has to be at least that's greater than or equal to twice as many road bikes okay so maybe mountain bikes are more popular right but what's interesting about this inequality is seeing we have an X by itself we could rearrange is to get Y by itself but we'll do that in a minute the first thing we want to do though is we want to look at a couple different ways to graph these like you see how this one's kind of like in a standard form see how the variables are on the Left numbers on the right usually when it's in this form I like to use the intercept method I set X to 0 and I solve for y and I set Y to 0 and I solve for X you don't have to do that if you want you can rearrange the equation and solve for y and put it into y equals MX plus B form a lot of students prefer that method but let's try and do the intercept method for this inequality so X is 0 3 times 0 is 0 I'm going to cover that up since it's nothing divide both sides by 4 that means that Y is 15 if Y is 0 4 times 0 is 0 that's nothing cover that up divide by 3 you can see X is going to be 20 when y is 0 so let's plot those points so 0 15 it's right there 20 0 that's going to be right there we're gonna draw a solid line since this is equal to right and then what I'm gonna do is I'm gonna do a test point I'm going to pick the origin 0 0 if I put 0 in for X and Y that makes a 0 is 0 less than or equal to 60 yes so that means where this test point is that that's true so you want to shade on that side of the the line and remember we were in the first quadrant because of these two constraints for the last one though you see how this is X is greater than equal to Y let's get Y by itself so we're going to divide both sides by two and so that gives you one-half X is greater than or equal to Y and I'm gonna flip this whole inequality so it's actually y is less than or equal to one-half X so let's go ahead and graph this one now the y-intercept is 0 the slope is 1/2 so I'm going up 1 over 2 now see really I went up 5 over 10 but because the scale on the x and y axis is the same you can think of it it's just going up one unit over to two steps and then let's repeat that so up one over two would put you right about there and this one is also equal to so it's gonna be a solid line like this right but Y is less than now when you have the Y by itself okay on one side of the inequality if Y is less than Y controls that up and down right so less that means we're shading below this line if you want you can do a test point you can pick a point over here see if it makes the inequality true if it's false you shade the other side of this true you would shade where that test point is so that means we're gonna be shading below this line right now you can see where are the overlapping or below this line we're below this line we're above the x-axis were to the right of the y-axis it's going to be right in this region right here it kind of forms like a triangular region the main thing that we're interested in are now are the vertices of that feasible region okay that polygon that's formed right so we know this point that's easy 0 0 we know this point that's easy that's 20 comma 0 how do we find this point that's probably the toughest part about the problem right well it looks like this is the intersection of these two lines y equals 1/2 X we're just going to treat like an equation and this one here 3x plus 4y equals 60 I think the easiest thing to do is to do a substitution so if y equals 1/2 X I'm going to put 1/2 X here so that comes out to 3x plus 4 times 1/2 X because we're putting 1/2 X and for y equals 60 we're just treating it like an equation 4 times 1/2 is 2x Plus 3x that's 5x divided by five you can see X's coming out to 12 if we put 12 back in here or here it doesn't matter either one 1/2 times 12 is 6 so our Y value equals 6 so this point is really right here at 12 comma 6 now all we have to do is test which one of these points is going to give us the maximum profit because that's what we're trying to maximize now we didn't write the formula for the profit equation yet so let's do that profit equals you make $100 per mountain-bike so it's a hundred times X and you make $200 for each roadbike so that's gonna be plus 200 Y so we're going to do is we're going to take each points in this fees I you know on the vertices of this feasible region we're gonna plug it into our profit equation of course if you sell 0 mountain bikes and 0 road bikes 100 times 0 200 times 0 that's a profit of 0 okay if we do this point over here 20 mountain bikes and 0 road bikes that's gonna be 20 times 100 is 2,000 plus 0 so this is going to give us a profit of 2,000 and if we do 12 comma 6 if we put 12 in for X and 6 + 4 y that gives us 1200 plus 6 times 200 is also 1200 so this is giving us a profit here of 2400 and so which one was the greatest since we were trying to maximize profit well 2400 is larger than 2000 larger than 0 so this is going to maximize our profit if we make 12 mountain bikes and 6 road bikes that will satisfy the constraints or the restrictions but still you know keep the profit at them at a maximum so if you want to see another example I did another video on linear programming follow me over to that video right there and I'll show you how to work with that one
Info
Channel: Mario's Math Tutoring
Views: 145,887
Rating: undefined out of 5
Keywords: linear programming, objective function, optimize, maximize, minimize, precalculus, inequalities, Mario's Math Tutoring, feasible region, constraints
Id: Y7e7DCsDUMY
Channel Id: undefined
Length: 15min 7sec (907 seconds)
Published: Mon May 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.