Now if you didn't see my previous video, Trip
to Mars: The Setup, you had better go back
and check that out of this isn't going to
make any sense. Now, if you watched that video,
you watched as we took all these words and
interpreted it as this right down here. We
let x be the number of video games, y be the
number of movies, and we took all of these
conditions up here and turned them into these
inequalities. And out goal is to maximize
four x plus two y. We also had the condition
that x and y have to be nonnegative. You can't
have a negative number of video games or a
negative number of movies. And what we did
in the setup is that we graphed all of these
inequalities over here, and we saw that the
points that satisfy all three of these conditions
are the points that are on the graphs of all
three of these inequalities. And that came
out to be this region right here. And our
goal is still to maximize four x plus two
y. So we want to find the point (x, y) inside
this region, or on the boundary, that makes
four x plus two y as high as possible.
Now we will start looking for that point by
playing around a little bit. I am just going
to pick a point right in the middle there.
I am going to pick (50, 50) and see what happens.
Now at the point (50, 50), we get four x plus
two y equals 300. Now, of course we know we
can do better than this, right? Because we
can just move a little bit to the right here.
We can just increase x a tiny bit and check
this out. If I just increase x a little bit,
if O go over to (60, 50), then I get four
x plus two y is 340. So clearly, actually,
I can move x over a little bit more. I can
increase this a little bit. I can increase
x a little bit more, move a little bit more
to the right, I can go higher and higher and
higher. All the way out until I hit the boundary.
So, clearly, I don't want to be anywhere in
the middle. Because, if I am anywhere in the
middle, I can always increase four x plus
two y by moving a little over to the right.
So I don't want to pick any point in the interior.
No point in the interior is going to maximize
four x plus two y because I can always do
better by moving a little bit farther out.
So I definitely want to be out here on the
boundary somewhere. But where?
Where on the boundary do we want to be? Wait
a second! Check this out. This four x plus
two y equals 300. We can graph that! That's
just the equation of a line. Let's check this
out. This line, we know it goes through (50,
50) because we have the point right there,
that is how we found this in the first place.
This line also has slope negative two. If
I solve for y here, subtract four x from both
sides, and the divide by two, we will have
y equals 150 minus two x. Minus two x, that
tells me that the line has slope negative
two. And I happen to have a line with slope
negative two right here. So there it is. This
is the line through (50, 50) with slope negative
two. This is the graph of four x plus two
y equals 300.
Now, for this one, four x plus two y equals
340, the slope is still the same. I haven't
changed the coefficients of x or y, I have
just changed this out here. All the lines
that are four x plus two y equals something,
those all have slope negative two. You can
see that by just solving for y. Subtract the
four x, you get two y equals something minus
four x. Divide it by two. You get y equals
minus two x plus something divided by two.
Minus two x. The slope is still negative two.
So all the lines that look like four x plus
two y equals something, they are all parallel.
And check this out. This one is what we get
when we slide this line out just a little
bit. That brings us to the line four x plus
two y equals 340. So as we are sliding the
line outward, we are increasing this number
over here. That is all we are doing. So all
of these lines, four x plus two y equals something,
as the something gets higher and higher and
higher that is the same thing as moving this
line out farther and farther.
So what we are looking for here is this line,
I want this line to go out as far as it possibly
can but it still has to intersect something
in the blue region. I can't put the line out
here because it does not hit any point in
the blue region. This orange line won't ever
hit any of those points. So I still have to
make sure that I hit something in the blue
region. Now if I go here, through a boundary
point, I am through a boundary point, but
not through a corner point, I still clearly
can move rather to the right. Because, if
I am going through the boundary, but not through
a corner, then I am going to end up going
through the interior of this blue region again.
Clearly I can move this blue line out farther.
So where I know I am going to end up where
I can maximize this four x plus two y is when
I hit a corner. It is going to be one of the
corners. Now we don't know which corner. We
can tell by looking at this graph that it
sure looks like it is going to be that corner.
But, without drawing lines, we don't know
for sure. But we know it is going to be a
corner. The farthereset out line is going
to hit a corner, because, if I am going through
the interior, I know that I can definitely
mover farther out. If I am going through a
boundary, but not through a corner, then I
am still going to be able to move farther
out. So I know that the winning line is going
to go through one of the corners.
So now I know that all I have to do is test
each of these corners and see which one gives
me the highest value of four x plus two y.
And we know where all of these corners come
from. They come from the boundary lines here.
So, for example, this one down here is where
the red line hits the x-axis. There, the red
line comes from eight x plus three y equals
1200, so, when y is zero, x is 150. So this
corner point is (150, 0). And then this corner
point right here comes from the interection
of the yellow and and the red line. The yellow
is x plus y is 200. I can find the intersection
of that with the red line with a little substitution.
We can solve this for x, x is 200 minus y.
Substitute in down there, and we get eight
times (two hundred minus y) plus three y equals
1200, and we are just solving for this intersection
point right here. Over here we will have minus
eight y plus three y, that gives me a minus
five y. This comes to 1600. Subtract that
from ther 1200 over there, we get minus 400.
So y is 80. Then I can use this equation up
here, and I get x is 120.
So this is how we can find all of our corner
points. So I didn't even have to draw the
graph. The graph gave us good intuition. But
now that we now that all we have to do is
to test the corners here, we can solve these
systems of equations to figure out what all
of these corners are. Here, the next corner,
is where the yellow intersects the green.
Yikes! So what I will do first with the green
is to multiply through by five because those
decimals kind of freak me out. And I will
get x plus four y equals 650. Now if I take
this and subtract x plus y equals 200, I will
get three y equals 450. So that tells me that
y is 150. So x will have to be 50 because
x plus y equals 200 on the yellow line. So
that is this corner up here. And then last
is that corner right there where this right
here hits the y axis. That just means that
x is equal to zero. Divide by four, y is 162.5.
So these are the corners we have to worry
about. Of course, for this problemwe know
that we are going to be in one of these corners
out here. we have this line with slope of
negative two. Let's go ahead and test each
one.
For this corner, we put in (150, 0) into four
x plus two y, comes out to be 600. For this
corner, we put in (120, 80) there. Four times
120 is 480. Two times 80 is 160. That ives
us a total of 640. This corner up here, put
that in. Four times 50 is 200. Two times 150
is 300. That gives us a total of 500. And
then for this one, I am just going to be multiplying
two times 162.5, that's going to be tiny compared
to these others. So this point comes out with
the highest value. This one is the winner,
as our graph suggested it would be. And we
see that we need 120 video games and 80 movies.
So, there's more. I want to make sure we really
understand this. What we are going to do here
is that we are going to change the problem
just a little bit. Just a little bit to see
that it is not always this corner that's the
winner. Imagine that instead of these four
hour video games, I had video games that are
going to take six hours. These are really
good video games. Much better video games
than the other ones were. Now here we are
trying to maximize six x plus two y. And the
same thing, we graph all of this stuff. We
got the allowable region here. Everything
holds exactly the same, except here, instead
of lines of slope negative two, we are looking
at lines of slope negative three, like this
one for example. And the reason for that is
that what we are trying to maximize here is
six x plus two y. So we are going to have
equations like six x plus two y equals something,
I am going to use k. Now, again, if we solve
for y here, we get, two y equals minus six
x plus k. Divide through by two. We get y
equals minus three x plus k. That is why we
looking at lines with slope negative three.
Whichever one of these comes out to be the
winner, we are going to have a line with slope
negative three. We want the one that is going
to be fartherest out. Just like before. And
it looks like it is going to be this point
this time, this corner instead of this one.
But, once again, we test. It is clear that
we don't really have to test these two. These
two aren't going to win. I mean, if you want
to go ahead and look at that one, put in 50,
you get 300. Put in 150 for y, you get another
300. That comes out to be 600. But looks what
happens when we try this point here. Six times
120 gives us 720, we are already above that.
Two times 80 gives us another 160. So 160
and the 720 that we already have gives us
880 for that point. But then, when we put
this point in, the (150,0), six times 150,
that gives us 900. So six x plus two y is
900 for that point out there. This point out
here is the winner now. So, for this setup,
when the video games take six hours, when
you have really good video games, we want
to go ahead and get 150 of the video games.
And we are not going to be able to get any
movies at all because we are restricted. And
we can see which restrictions restricts us
right here, which one ties this up is this
red line. This red line, we are at the boundary
of the red line. So it's the money restriction
that prevents us from being able to get more
movies or more video games.
So let's take a look at one more set up. Imagine
that the video games are really bad. These
are just one hour video games. Very, very
boring video games. Now, here, we are trying
to maximize x plus two y. And we think of
it the same way. Each point we pick in here,
well, x plus two y equals something. We will
call that k. And, again, we solve for y. And,
this time, we see that all of these lines
have slope negative one half. Now we are looking
at lines more like this. And, of course, I
happen to have a line with slope negative
one half right here. And we want to go as
far out as we can, as far out as we can, as
far out as we can. And this time, it looks
like it is this corner up here that is going
to be the one that provides the maximum value
of x plus two y. Let's go ahead and check
that out.
So we will start out with this point down
here. If we put in (150, 0) in there, we will
just get 150. Now if we put in (120, 80),
we will get 120 plus two times 80. Two times
80 is 160, 160 and the 120 gives us 280. Now
(50, 150), put in 50 here we get 50 plus 300.
That gives us 350. And then lastly I will
put in this one. That gives us 162.5 for y,
that will give me a 325 right there. So this
point does indeed, this is the corner that
gives us the largest possible value of x plus
two y. So, in this scenario, with the bad
video games, we want to buy 50 video games
and get 150 movies and I am only going to
be able to waste 350 hours doing this.
This is a lot better because I get to waste
900 hours. I need to find myself some really
good video games. Got any suggestions?
