-
-
Today we'll discuss
section 12.2 and continue
-
our study of combinatorics.
-
And I'll begin by
reminding you that we've
-
talked about using lists, and
tables, and tree diagrams.
-
And more importantly, we
introduced a counting principle
-
as a counting technique.
-
I want to add to that.
-
Our tool box for counting
things will continue to grow.
-
Suppose we are arranging
a promotional photo
-
shoot for three celebrities.
-
And if you like
Star Wars, you'll
-
recognize these as
Luke, Han, and Yoda.
-
And I'm asking the question, in
how many ways can we line them
-
up together for a photo?
-
-
If you're just going to
list them by brute force,
-
one way is to just leave them
in the order they appear now.
-
You've got Luke, Han and Yoda.
-
And then you need to figure
out how many ways you
-
can move things around to
get a different arrangement.
-
Suppose I decide to keep
Luke in the first position
-
and switch Han and Yoda.
-
That would put Yoda
in the second position
-
and Han in the third position.
-
And there's no other
arrangement that leaves
-
Luke in the first position.
-
So maybe now I'll
slide Luke over
-
into the second position,
put Luke in the middle.
-
That means I could put Han
on the left of Luke and Yoda
-
on the right.
-
Or I could switch that and
put Yoda on the left and Han
-
on the right.
-
If you think about it,
there's no other arrangement
-
that leaves Luke in the middle.
-
So let's move Luke
over to the far right.
-
Now let's put Han
first, Yoda second,
-
leaving Luke in
the third position.
-
The only other thing I can
do is switch Han and Yoda.
-
And that's a sixth
way to do this.
-
And as you can see, I put Luke
in every possible position.
-
And then I've switched
the other two around Luke,
-
so there's no
other way to do it.
-
And the answer would be six.
-
You could do this with
a tree diagram as well.
-
If you were to break
it out that way,
-
you could start off
with Luke and branch
-
to either Han, and
Yoda, and so forth.
-
But the point is,
either way you do it,
-
there are six possible ways of
arranging three people in line
-
to take a photo.
-
Each of those six
orderings is called
-
a permutation of those objects.
-
So there are six permutations
of three things taken together.
-
Fortunately, there's a
quick way to calculate
-
the number of permutations,
and it involves
-
something called a factorial.
-
And the definition involves
an exclamation point.
-
Here it says, n
exclamation point.
-
That's read, n factorial.
-
And n factorial is defined
to be n times n minus 1,
-
times n minus 2, continuing that
pattern to count down to one.
-
-
Now, hold that thought.
-
We're going to go
off and explore
-
this idea of a factorial, and
we'll come back to this spot.
-
So remember this spot,
and we'll come back to it.
-
Going back and diverting and
talking about factorials,
-
the n exclamation point
is read, n factorial.
-
And the calculation
is simply whatever
-
number is to the left of
the exclamation point.
-
You start with that,
and then you count down
-
until you get to one,
and you take the product.
-
So 4 factorial is 4
times 3 times 2 times 1,
-
which happens to be 24.
-
6 factorial would be 6 times 5
times 4 times 3 times 2 times
-
1, which is 720.
-
1 factorial-- you start
at 1, and you count down
-
till you get to 1.
-
Well, you're already at 1,
so 1 factorial is just 1.
-
There is one
special case that we
-
need that doesn't
follow that pattern.
-
As long as n is 1, or 2, or 3,
or 4, or any counting number,
-
you can use this formula.
-
But there is a need
occasionally for us
-
to define what happens when
you get zero factorial.
-
And it turns out that zero
factorial is, by definition,
-
equal to one.
-
I'm not going to talk about why.
-
At this point, it
doesn't matter.
-
But in order for our
factorials to work
-
the way we want them
to work, we have
-
to define zero
factorial to be one.
-
That's the one that you
just have to memorize.
-
It doesn't follow the
pattern for the others.
-
Now, you can play with this.
-
But you probably can see,
just by the definition,
-
that factorials can
get big really fast.
-
So it's nice to know that
your Casio FX-260 does
-
have a Factorial button.
-
If you look at your calculator,
the Factorial button
-
is above the number
three on the calculator.
-
So that means you have to
press Shift to get to it.
-
So if I ask you to
calculate 8 factorial,
-
you would press eight.
-
Then you would do Shift-3.
-
Shift-3 takes you to factorial.
-
And you don't even
have to press Equal To,
-
and you'll get 40,320.
-
Now that we know how to
calculate factorial, let's
-
go back to the spot I asked
you to remember earlier
-
and pick up from there.
-
Remember, we were
here, just after we'd
-
done these permutations
of Luke, Han, and Yoda
-
and found out that there were
six ways we could line them up
-
for a photo.
-
-
The important point
here, though, I
-
want to emphasize
is that it turns out
-
that the number of permutations
is actually n factorial where
-
n is how many distinct
objects you have.
-
So here, you have three people,
so it will be 3 factorial.
-
And 3 factorial is 3 times
2 times 1, which is 6.
-
Notice it matches
what we got earlier.
-
So rather than having
to actually write out
-
every permutation, we can
just use the factorial formula
-
and get there very quickly.
-
And again, just for emphasis,
that's exactly the same answer
-
we got when we just
did it by brute force.
-
Now, you need to remember this.
-
This is a very
important result. If you
-
want to count permutations
of indistinct objects,
-
all you need to do is
calculate n factorial.
-
Occasionally though, we're
interested in counting
-
the number of
different arrangements
-
of a group of objects.
-
Now let's go back to the
example that we began with.
-
That's Luke, Han, and Yoda.
-
But what if we added
a fourth person?
-
What would that do?
-
What if we added Princess Leia?
-
Well, now that we
know that factorials
-
do the counting for
us, all we have to do
-
is calculate 4 factorial
instead of 3 factorial.
-
The 4 factorial is 4 times 3
times 2 times 1, which is 24.
-
So there are 24 different
arrangements possible
-
if you got four people.
-
And knowing that
form is good enough
-
when the number of
objects you're arranging
-
is the same as the
number of objects you
-
have to choose from because--
-
For example, in the last
exercise, we had four people,
-
and we lined them all
four up for a photo.
-
But what if you were doing
something slightly differently?
-
Suppose we had a
bicycle built for two,
-
and we wanted to pick
two of those four people
-
and put them on the
bicycle built for two.
-
Also keep in mind, if you're
looking for the number of ways
-
you could do that, a person
sitting on the front seat
-
would be different than
that same person sitting
-
on the back seat.
-
So we will look at the
number of arrangements.
-
We're choosing from
the four celebrities,
-
but we can only take them two
at a time to get a photo of them
-
on a bicycle built for two.
-
So this time, the count
is slightly different.
-
I don't want to take
them all four at time.
-
How do you deal with that?
-
Well, let's play with this.
-
I'm going to just
randomly reach up and grab
-
two of the celebrities.
-
I'll take Luke and Leia.
-
Put Luke on the front seat
and Leia on the back seat--
-
so that would be my
first arrangement.
-
Now you need a strategy to
go through every possibility
-
in an organized fashion.
-
So I decided I'm going to
leave Leia on the back seat
-
and swap everyone else out.
-
So if Leia stays on the back
seat, and I take Luke off,
-
I can put Han in Luke's place.
-
That's the second possibility.
-
Again, I want to keep
Leia on that back seat
-
as long as possible.
-
So now the only
other way to do that
-
is to put Yoda on
the front seat.
-
That's a third possibility.
-
At this point, Leia has
to come off the back seat,
-
or I don't get any more
unique arrangements.
-
So I'll take Leia
off the back seat
-
and put Luke on the back seat.
-
And then I'll start
on the left, and I'll
-
pair Luke on the back seat
with Leia on the front seat.
-
That's a fourth arrangement.
-
I'm going to leave
Luke on the back seat
-
and take everyone else
on the front seat.
-
I've already used Leia, so I'll
move Leia off and take Han.
-
So now I'm leaving
Luke on the back seat,
-
Han goes in the front seat.
-
Again, if I leave
Luke where he is
-
and take Han off
and put Yoda, that
-
gives me yet a
sixth possibility.
-
There's nothing else
I can do and leave
-
Luke on the back seat.
-
So I'll take Luke
off the back seat now
-
and put Han on the back seat.
-
And I'll start on the left and
let Leia be on the front seat.
-
That's a seventh arrangement.
-
Keeping Han in the
back seat, now I
-
can put Luke on the front seat.
-
That's an eighth arrangement.
-
Leaving Han on the back seat, I
can put Yoda on the front seat.
-
That's a ninth arrangement.
-
Now there's nothing else
I can do and still leave
-
Han on the back seat, so I'll
bump Han off the back seat
-
and put Yoda on the back seat.
-
And then I'll start
on the left again.
-
So Han is off.
-
Yoda goes in the back seat,
Leia on the front seat.
-
That's a tenth arrangement.
-
Leaving Yoda in the
back seat, now I'll
-
put Luke on the front seat.
-
That's an 11th arrangement.
-
And finally, leaving
Yoda in the back seat,
-
I can put Han on the front seat.
-
And that's a 12th arrangement.
-
And there's really
nowhere else to go.
-
So there are 12 permutations
of four objects--
-
and this is important--
taken two at a time.
-
So I'm still trying to
arrange four objects,
-
but I'm only taking
them in pairs.
-
This is an important distinction
because, if you're not
-
taking them all, you've
got to know how many you
-
are taking at a time.
-
And that's extremely important.
-
So in the previous example,
when we took four people,
-
we took all four at a time.
-
That turned out just
to be a factorial.
-
4 factorial is 24.
-
But when we took
them two at a time,
-
it turned out to be only 12.
-
We learn, if we do take them
all, we just use the factorial,
-
as I mentioned.
-
The question is, is
there also a formula
-
if you don't take
all of them at once?
-
And the answer turns
out to be lucky for us--
-
yes, there is.
-
And here's what we need.
-
A permutation is an ordering
of distinct objects.
-
You often think of them as
being in a straight line.
-
If we select r distinct objects
from a set of n objects--
-
in other words, you're only
taking them r at a time--
-
and arrange them
in some order, we
-
call this a permutation of
n objects taken r at a time.
-
It's denoted quite often with
a capital P and subscripts n
-
on the left and r on the
right, or just a capital P
-
and have n comma
r in parentheses.
-
Both of those notations
are common ways
-
to list a permutation of n
objects taken r at a time.
-
And here's the formula.
-
The formula for that is
n factorial up top and n
-
minus r factorial down bottom.
-
We're not going to
prove this, but we're
-
going to use the
result, nevertheless.
-
Now let's apply that formula
to the bicycle-built-for-two
-
problem and see if we get that
same answer, which was 12,
-
that we got earlier.
-
So let's plug them in.
-
We had four people, so n is 4.
-
We took them two at
a time, so r is 2.
-
So if you plug in 4
for n and 2 for 4,
-
you get 4 factorial over the
quantity 4 minus 2 factorial.
-
Or 4 factorial over
4 minus 2 factorial
-
is 4 factorial over 2 factorial.
-
4 factorial's 4 times
3 times 2 times 1.
-
2 factorial's 2 times 1.
-
That's 24 over 2, which is 12--
-
gives us exactly the same
answer we got before.
-
-
And just like for the
factorial, there's
-
a Permutation button on
your calculator as well.
-
It's above the number one.
-
That is the permutation button.
-
It's above the one, so you have
to press Shift to access it.
-
So if I want to
calculate permutation
-
of four things taken two at a
time, here are the keystrokes.
-
Press the four.
-
Do Shift-1, which takes
you to the permutation.
-
Then you put in the
two, which is the r.
-
And in order to get
that to calculate,
-
you have to press Equal.
-
For the factorial you
didn't have to press Equal.
-
You just have one
number, and you
-
hit the Factorial-Shift
combination.
-
But when you're
plugging in two numbers,
-
you have to press Equal
after the second number
-
to get the calculation
to take place.
-
And in this case,
you would end up
-
with 12, which again is the
same answer we got earlier.
-
-
So a very important formula--
-
this is the formula for
the permutation of it
-
n things taken all r at a time.
-
Just to practice, if I ask you
to evaluate the permutation
-
to four things taken two at
a time times the permutations
-
of eight things
taken four at a time,
-
you would calculate the
permutation to four combination
-
two first, which is
four, Shift-1, press two.
-
Then you want to hit Equal To.
-
Then you do the
multiplication symbol.
-
Then you do a permutation
of eight things,
-
so you press eight.
-
Then you do Shift-1 again.
-
Then you press four.
-
And to make it do the
calculation, you press Equal.
-
-
And you'll get 20,160.
-
So that's just practice
using the calculator
-
with permutations.
-
-
There is one more interesting
fact that I like mentioning.
-
In that formula above,
if n is equal to r,
-
you would get the permutations
of n things taken n at a time.
-
And if you plug that
into the formula above,
-
you'll get n factorial
over n minus n factorial.
-
Well, n minus n is 0,
and 0 factorial is 1.
-
So you get n factorial over
1, which is just n factorial.
-
So if you don't believe it,
try it on your calculator.
-
If n and r are the same
number for a permutation,
-
it's just the same
thing as just doing
-
the factorial of that number.
-
You don't have to know that, but
it is a nice, interesting fact.
-
Now, suppose we've got two
of these four celebrities.
-
And we're going to choose them
as before on the bicycle built
-
for two except, this time, we're
not putting them on a bicycle.
-
We're going to give them a star
on the Hollywood Walk of Fame.
-
The difference is important.
-
On the bicycle built for
two, the order mattered.
-
Sitting on the front seat
was different from sitting
-
on the back seat.
-
But if I'm just choosing
two people to get a star,
-
it doesn't matter what
order I chose them in.
-
It's an important distinction.
-
So for instance, if the two
chosen were Han and Yoda,
-
it doesn't matter if I
do Han/Yoda or Yoda/Han.
-
In the example on the bicycle
built for two, it did matter.
-
It decided which one was
on the front of the bike.
-
But for the stars,
it doesn't matter.
-
Problems like that, where
the order doesn't matter,
-
has a special name.
-
It's called a combination.
-
Those type problems are
combination problems.
-
Now, we've already written
out the 12 arrangements
-
for the bicycle built for two.
-
And we can see that what
happens is, with the stars,
-
the order doesn't matter.
-
So we can actually
look back at the answer
-
we got for the
bicycle built for two
-
and just eliminate
the duplicates.
-
In other words, if
you've got Leia and Han,
-
and you've got Han and Leia, if
you're just giving them a star,
-
it doesn't matter what
order they were chosen in.
-
So really, four is
a duplicate of one,
-
so you can just get rid of four.
-
And the same thing is
true going down the list.
-
If you've got Leia
and Han, that's
-
the same as Han and Leia,
which is number seven.
-
So you can get rid of the
seven, and you keep moving down.
-
Number three is Leia and
Yoda, so you can also
-
get rid of number 10,
which is Yoda and Leia.
-
So you don't need
that duplicate.
-
Giving them stars, the
order doesn't matter.
-
And as you move down the
list, you've got Luke and Han.
-
And the number eight
is Han and Luke,
-
so you can get rid
of number eight.
-
Number six is Luke and Yoda,
and number 11 is Yoda and Luke,
-
so you can get rid
of that number 11.
-
It's a duplicate.
-
And then, finally,
you've got Han and Yoda,
-
and number 12 is Yoda and Han.
-
So you can get rid of number 12.
-
And that leaves
you simply with six
-
where you're just
giving them a star.
-
The order doesn't matter.
-
Is there a formula for that?
-
Yes, there is.
-
It has to do with
the combination.
-
A combination is a subset
of a set of distinct objects
-
where order is not important.
-
If we select r objects
from a set of n objects
-
without regard to order,
we call this a combination
-
of n objects taken r at a time.
-
And it's often written exactly
as for a permutation, except we
-
use capital C
instead of capital P.
-
So we could put
the capital C there
-
with the subscript of n on
the left and r on the right.
-
Or we can write capital C
with n comma r in parentheses.
-
So the capital P for
permutation changes
-
to capital C for combination.
-
And there is your formula.
-
Combination of n
things take r at a time
-
is n factorial in the numerator.
-
And the denominator is the
product of r factorial and n
-
minus r factorial.
-
That's the formula when
order doesn't matter.
-
If we apply that to that
Hollywood Walk of Fame star
-
problem, remember, we
got an answer of six
-
when we did it by brute force.
-
Let's see if we get the
same answer by plugging in.
-
In this problem, if we
had four people taken two
-
at a time where order
doesn't matter--
-
so it's a combination--
-
plugging into that
formula for a combination,
-
we get 4 factorial over the
product of 2 factorial and 4
-
minus 2 factorial.
-
Well, that's 4 factorial over
2 factorial times 2 factorial.
-
4 factorial is 4 times
3 times 2 times 1,
-
and 2 factorial is 2 times 1.
-
If you write all that out, 4
times 3 times 2 times 1 is 24.
-
And 2 times 1 times
2 times 1 is 4.
-
And 24 divided by 4--
-
big surprise-- is six.
-
It's exactly the same answer as
when we did it by brute force.
-
So these formulas allow
you to get to the count
-
much faster than having
to do it by brute force.
-
And again, you won't
be surprised to know
-
that there is a button on
your calculator for that.
-
It's above the
number two, and you
-
have to press the
Shift key to access it.
-
So if I were to calculate
the combination of four
-
things taken two at a
time, I would press four,
-
then I'd do Shift-2.
-
Then I would press
two, which is the r.
-
And to calculate it,
you hit Equal To,
-
and you'll come up
with the number six.
-
Again, it's the same
answer we got before.
-
-
Now, one of the things
you'll come across
-
when you're doing
these is that, when
-
you read a problem, sometimes
you have to figure out,
-
is it a permutation
or is a combination?
-
For example, suppose there are
10 different books in a box,
-
and four of them are to
be arranged on a shelf.
-
How many different
arrangements are possible?
-
You're taking 10 books.
-
And you're going to
take four of them
-
and arrange them on a shelf.
-
Well, if you're arranging them
on a shelf, by definition,
-
order matters.
-
So that makes it a--
-
-
right.
-
It makes it a permutation,
because order matters.
-
If you get that
wrong, of course,
-
your answer will be wrong.
-
You have to know here
that order matters.
-
You're making arrangements.
-
By definition, that's order.
-
So I use the
permutation formula,
-
plugging 10 in for
n and 4 in for r--
-
10 books, four at a time.
-
So that's 10 factorial
over 6 factorial.
-
And if you do the calculation,
that comes out of a 5,040.
-
There are 5,040
different arrangements
-
of 10 books taking four
at a time on a bookshelf.
-
You could also do this
problem, just FYI,
-
by using the counting
principal directly.
-
You could think of it as a
fourth-stage experiment where
-
you're choosing book number one,
book number two, book number
-
three, and book number four.
-
And if you think about
it, you have 10 books.
-
So for your first stage
of the experiment,
-
you can choose any of the 10.
-
But once that first
book has been chosen,
-
you only have nine left to
choose for the second position,
-
and eight for the
third position,
-
and seven for the
fourth position.
-
And 10 times 9 times 8
times 7, believe it or not,
-
is also 5,040.
-
So you could actually
do that problem
-
by the counting principal.
-
And you'll find that
to be true quite a lot.
-
The counting principal is
kind of a bedrock principle.
-
And sometimes, you
can use it in place
-
of using one of
these other formulas,
-
if you really want to.
-
But it is the same answer,
either way you do it.
-
If you wanted to do that on your
calculator, you'd type in 10,
-
hit Shift-1, which is the
permutation combination.
-
Then you'd press four, and
that would give you 5,040.
-
Let's do another example.
-
Suppose we got that 10
different books again.
-
But this time, Jan wants
to choose four of them
-
to read while
going on some trip.
-
Maybe she's taking them
into the car with her.
-
How many different
arrangements are possible?
-
Now, how is that different from
putting books on a bookshelf?
-
If you're putting
books on a bookshelf,
-
you're arranging the books
in a different order.
-
Here, Jan doesn't care
which book is chosen first.
-
She is simply going
to grab four books
-
and bring them with
her on the trip.
-
Order doesn't matter at all.
-
The order she picks those books
is totally irrelevant to Jan.
-
That means it's a combination.
-
Again, if you get
that wrong, you're
-
going to get the answer wrong.
-
It's a combination because
order does not matter.
-
Once you figure that out, you
use a combination formula--
-
again, plugging 10 in
for n and 4 in for r.
-
And you end up with 10
factorial over the product
-
of 4 factorial and 6 factorial.
-
And that comes out to be 210.
-
And again, if you wanted
to do that calculation
-
with your calculator--
-
10 factorial over 6 factorial.
-
And if you want to do that
calculation in your calculator,
-
you'd type in 10,
hit Shift-2, which
-
gives you the combination.
-
And then you'd do
four, and Equal To,
-
and that gives you
the same answer.
-
So even though I'm giving you
the formulas for combinations
-
of permutations,
really you just need
-
to know how to do
it on a calculator,
-
and you can avoid having to
plug into these formulas.
-
So I'm doing it sort
of just to reinforce
-
that these formulas really
do give you the right result.
-
But I'm also pointing out that
the calculator is the fastest
-
and best way to do it.
-
Sometimes, a problem requires
the use of more than one
-
counting tool.
-
So in order to discuss
problems like that,
-
it's probably a good time to
go back and remind ourselves
-
of all the tools we've
developed so far.
-
Remember, we talked about lists,
tables, and tree diagrams.
-
We talked about the
counting principle.
-
We talked about the permutation
formula as a factorial.
-
Remember, factorial is a special
type of permutation where
-
you take them all the time.
-
We've talked about permutations
when you don't take them
-
all at a time.
-
You take n objects r at a time.
-
We've talked about combinations
where order doesn't matter.
-
So we're building
a tool box of tools
-
that help us count arrangements
of things and different items
-
that we want to count.
-
Let's look at a
particular example.
-
Suppose a committee
of four people
-
is chosen from eight
women and eight men.
-
How many different committees
are possible consisting
-
of two women and two men?
-
Well, here, order isn't
important on the committee.
-
You pick two people to be on
a committee, or four people,
-
or eight people.
-
But what order you put
them on the committee
-
is totally irrelevant,
so we're going
-
to use combinations
to count this.
-
But there's really
two different stages.
-
One stage is to
choose the women,
-
and the other stage
is to choose the men.
-
So even though,
for choosing women,
-
we know order doesn't matter,
we'll use combinations.
-
And for choosing men,
the order doesn't matter,
-
so we'll use combinations.
-
But since it's a
two-stage experiment,
-
it will be embedded inside
the counting principal.
-
In other words, the first
stage of the process
-
is the number of ways
to choose the two women.
-
The second stage of the
process is the number
-
of ways to choose the men.
-
And we find those
two quantities.
-
We multiply together by
the counting principle.
-
And that gives us the
total arrangements.
-
So because the women being
chosen is a combination--
-
again, because order
doesn't matter--
-
we use the combination formula.
-
There are eight women.
-
Who want to choose two.
-
So that's eight women,
chosen two at a time.
-
And it's a combination,
because order doesn't matter.
-
Then, if you go to the men,
there are also eight men.
-
It doesn't have to be the same.
-
But in this case, there
are also eight men.
-
And you're also
choosing two men.
-
So that would be the combination
of eight men taken two
-
at a time.
-
And the product of
those two calculations
-
give you the total.
-
So now we've got to calculate
the combination of eight
-
things taken two at a time.
-
Well, that is eight,
Shift-2 for combination.
-
Press two, because that's the r.
-
And hit Equal To, and
that gives you 28.
-
And just by happenstance, notice
that the other combination
-
is also a combination of eight
things taken two at a time.
-
So it turns out that
that's also going to be 28.
-
It doesn't have to be the same.
-
But in this case, it is.
-
So there are a total
of 28 times 28, which
-
is 784 different ways you can
choose two women and two men
-
to be on the committee if there
are eight women and eight men
-
to start with.
-
And notice that the
combination calculation
-
was used for each stage in
the counting principle, which
-
had two stages.
-
Choosing the women
was the first stage.
-
Choosing the men was
the second stage.
-
-
That's an important
point to remember.
-
This is a process.
-
This is an example
where you actually
-
have two of your tools
going on at the same time.
-
You're using the
combination formula,
-
but you're also embedding
that inside of the counting
-
principle.
-
If five cards are
randomly chosen
-
from a standard deck of
cards, how many hands
-
contain four queens?
-
Now, you've got five cards.
-
And they told you that you
had to have four queens.
-
So even though they
didn't come right out
-
and say it, by
implication, there's
-
got to be another card
that's not a queen that's
-
chosen as the fifth card.
-
You sort of have to read
between the lines there.
-
You're choosing five cards.
-
They told you what four
of them have to be.
-
So there's still a
fifth card involved.
-
So you're still
choosing five cards.
-
They just told you what they
wanted four of them to be.
-
But the basic thing here
is, order isn't important.
-
So we can use combinations
to count this.
-
We don't care what order
we draw these cards in.
-
We're just going to
put them into our hand,
-
and they're going
to be in our hand.
-
It doesn't matter what
order we drew them.
-
So it's a combination.
-
But like the previous
problem, it really
-
involves two subtasks.
-
There are two stages
to this experiment.
-
One stage is choosing
the four queens,
-
and the other stage is choosing
the one that wasn't a queen--
-
the fifth card.
-
-
So if you think about
queens versus non-queens,
-
every standard deck
has four queens.
-
That means-- 52 minus 4.
-
That means 48 cards
are not queens.
-
So I'm thinking the deck is
being partitioned into queens
-
and not queens.
-
There are four queens in the
deck, which means the other 48
-
cards are non-queens.
-
So embedding this in
the counting principle,
-
I want to choose
my queens first.
-
So the first stage
of the process
-
is the number of ways to
choose the four queens.
-
Once I've chosen
the four queens,
-
then I want to choose
one of the other cards.
-
There are only four
queens in the deck,
-
so the other card has to be
something other than a queen.
-
So since it's a combination,
if I'm choosing queens,
-
there are only four
queens in the deck,
-
and I want to
choose four queens.
-
So that's a combination of four
queens taken four at a time.
-
For the non-queens, again,
order doesn't matter.
-
But this time, there
are 48 non-queens,
-
and I only want to
choose one of them.
-
So that's a combination of 48
things taken one at a time.
-
And if you do the
calculation for a combination
-
of four things taken four at
a time, that's four Shift-2.
-
And then r is also 4,
and you hit Equal To,
-
and it comes out to be 1.
-
-
And if you do combination
of 48 things taken one
-
at a time, you type
in 48, you Shift-2.
-
Then you press 1,
which is the r.
-
And you press Equal To,
and you end up with 48.
-
And 1 times 48 is 48--
-
again, another problem where
you're using two of your tools.
-
You're using the
combination tool inside
-
of the counting principle tool.
-
If five cards are
randomly chosen
-
from a standard deck of
cards, how many hands
-
contain exactly two
twos and two eights?
-
It's very similar to
the other problem.
-
And again, for the
same reason as was
-
true for the other problem,
order doesn't matter.
-
So these are going
to be combinations.
-
And also like the
last problem, it's
-
actually going to be a counting
principle problem at the base.
-
But this time, there
are three subtasks,
-
or there are three stages.
-
This is a three-stage
experiment.
-
The first stage, you're
going to choose your twos.
-
The second stage, you're
going choose your eights.
-
And if you're going to choose
two twos and two eights,
-
and there are five
cards, that means
-
you also got to
choose a fifth card.
-
So think about this.
-
You're going to take the number
of ways to choose your twos--
-
your two twos.
-
You're going to find the number
of ways to choose your eights.
-
And then you're going to
find the number of ways
-
to choose your one more card.
-
That makes the fifth card.
-
That can't be a two or
an eight, because we only
-
want exactly two twos
and exactly two eights.
-
So if that third card were
either a two or an eight,
-
we would have more than two
twos or more than two eights.
-
So going back,
choosing your twos
-
is a combination, because
order doesn't matter.
-
There are four twos
in the deck, and we
-
want to choose two of them.
-
So that's a combination of four
things taken two at a time.
-
Then we want to move the eights.
-
Again, there four
eights in the deck,
-
and we want to
choose two of them.
-
So that's also a combination
of four things taken two
-
at a time.
-
Now, the last one--
think about it.
-
You want it to not be
an eight, not be a two.
-
Well, there are four twos,
and there are four eights.
-
So for that fifth card,
order still doesn't matter.
-
But there are only 44 of them,
because 52 minus 4 minus 4--
-
take away the four twos
and the four eights--
-
leave only 44 cards.
-
So that last card has to
come from the 44 cards that
-
aren't twos or eights.
-
And when you do the
calculation, the combination
-
of four things
taken two at a time
-
is four, Shift-2, two, Equals.
-
And that comes out to be six.
-
Well, that actually--
for the eights,
-
it comes out to be exactly
the same-- four, Shift-2,
-
two, Equals.
-
That's also six, because it is
exactly the same combination.
-
And then, finally, combination
of 44 things taken one
-
at a time-- that's 44,
Shift-2, one, Equals.
-
And that comes out to be 44.
-
And then, by the
counting principal,
-
you multiply those
numbers together--
-
6 times 6 times 44--
-
and you end up with 1,584.
-
So if you choose five cards
randomly from a standard deck
-
of cards, there are
1,584 different hands
-
that contain exactly
two twos and two eights.
-
Let's look at a couple
of extra problems.
-
Suppose I ask you to
evaluate this product.
-
It's the product of
two combinations.
-
The first combination is eight
things chosen five at a time.
-
The second combination is nine
things taken four at a time.
-
So the easiest way is
to use your calculator.
-
And remember that the Shift-2
combination is the combination
-
key.
-
So you type in eight,
Shift-2, five, hit Equal To--
-
that gives you the first
combination value--
-
then times.
-
Now you start the
second combination.
-
That will be nine,
Shift-2, four.
-
When you hit Equal, you will
get the final answer of 7,056.
-
How about this?
-
The planning committee
for a class reunion
-
must elect a president,
secretary, and treasurer.
-
In how many ways can
this be accomplished
-
if there are 25 members?
-
I'm actually going to show you a
couple of ways you can do this.
-
First of all, it
is a permutation,
-
because order matters.
-
The president,
secretary, and treasurer
-
is different than if
you switch positions.
-
That's a different arrangement.
-
So order matters.
-
It's a permutation.
-
In fact, it's
equivalent to a problem
-
we've done earlier where we
were taking a group of people,
-
and pulling some out, and
lining them up for photos.
-
And we wanted to know how
many ways we could do that--
-
same thing here with the
president, secretary,
-
and treasurer.
-
So this is a permutation of 25
things taken three at a time.
-
With the calculator and
the Shift-1 keystroke
-
that gives you the
permutation, we
-
type in 25 Shift-1 for
permutation, then enter tree.
-
And when you hit Equal
To, you get 13,800.
-
So there are 13,800 ways
you could take 25 members
-
and make them
president, secretary,
-
and treasurer of the group.
-
But there is a second way
you could look at this.
-
You could think of it as
a straightforward counting
-
principle problem.
-
If you did it that way, you
could think of the number
-
of ways to make these selections
as being a three-stage
-
process--
-
the number of ways to choose
the president, times the number
-
of ways to choose the secretary,
times the number of ways
-
to choose a treasurer.
-
It's just a standard
counting principal problem.
-
If you do it that
way, obviously,
-
when you're choosing
a president,
-
you can choose any
of the 25 members.
-
But the president can't also
be secretary or treasurer.
-
So when you go to
the next position,
-
you have to eliminate the
person you chose for president.
-
So you only have 24 members to
choose from for the secretary.
-
And then, by the time you get
to the treasurer position,
-
you've already
chosen two people.
-
So those two people are out of
the running to be treasurer.
-
That leaves only 23 people.
-
And if you multiply
25 times 24 times
-
23, which is what the counting
principle tells you to do,
-
you'll get the same 13,800 ways.
-
So either way is
fine-- whichever
-
way makes most sense to you.
-
-
Along the way, I've been
building up our tool box.
-
I want to go through
this one more time.
-
We started off with a list,
and tables, and tree diagrams.
-
Then we moved to the
counting principle.
-
Then we talked
about n factorial,
-
which is a special permutation
where you take everything
-
all at once, like n
things n at a time.
-
Then you have the permutation,
where you have n objects,
-
but you're only taking
them r at a time.
-
Then you move to
the combinations,
-
where you're taking n
objects r at a time,
-
but order doesn't matter.
-
That's where we stand
with our tool box
-
for doing these
type of problems.