Main content

## Permutations

Current time:0:00Total duration:5:33

# Factorial and counting seat arrangements

## Video transcript

- [Instructor] In this video
we are going to introduce ourselves to the idea of permutations, which is a fancy word for a
pretty straight forward concept, which is what are the number of ways that we can arrange things? How many different
possibilities are there? And to make that a little bit tangible, let's have an example with say a sofa. My sofa can seat exactly three people. I have seat number one
on the left of the sofa, seat number two in the middle of the sofa, and seat number three on
the right of the sofa. And let's say we're going
to have three people who are going to sit in these three seats, person A, person B, and person C. How many different ways
can these three people sit in these three seats? Pause this video and see if you can figure it out on your own. Well, there's several
ways to approach this. One way is just try to think through all of the possibilities. You could do it systematically. You could say alright, if I have person A in seat number one, then I could have person
B in seat number two, and person C in seat number three. And I could think of another situation. If I have person A in seat number one, I could then swap B and C. So it could look like that. And that's all of the situations, all of the permutations where
I have A in seat number one. So now let's put someone
else in seat number one. So now let's put B in seat number one, and I could put A in the
middle and C on the right. Or I could put B in seat number one, and then swap A and C. So C and then A. And then if I put C in seat number one, well I could put A in the
middle and B on the right. Or with C in seat number one, I could put B in the
middle and A on the right. And these are actually
all of the permutations and you can see that there are one, two, three, four, five, six. Now this wasn't too bad. And in general, if you're thinking about permutations of six things or three things in three spaces, you can do it by hand. But it could get very
complicated if I said, hey, I have 100 seats
and I have 100 people that are going to sit in them. How do I figure it out mathematically? Well the way that you would do it, and this is going to be a
technique that you can use for really any number of
people and any number of seats is to really just build off
of what we just did here. What we did here is we
started with seat number one and we said alright, how many
different possibilities are, how many different people
could sit in seat number one assuming no one has sat down before. Well, three different people
could sit in seat number one. You could see it right over here. This is where A is sitting
in seat number one, this is where B is sitting
in seat number one, and this is where C is
sitting in seat number one. Now for each of those three possibilities, how many people can
sit in seat number two? Well, we saw when A
sits in seat number one, there's two different
possibilities for seat number two. When B sits in seat number one, there's two different
possibilities for seat number two. When C sits in seat number
one, this is a tongue-twister, there's two different
possibilities for seat number two. And so, you're gonna have two
different possibilities here. Another way to think about it is, one person has already sat down here, there's three different
ways of getting that, and so there's two
people left who could sit in the second seat and we
saw that right over here, where we really wrote
out the permutations. And so how many different
permutations are there for seat number one and seat number two? Well, you would multiply. For each of these three you have two, for each of these three
in seat number one, you have two in seat number two. And then what about seat number three? Well, if you know who's in seat number one and seat number two,
there's only one person who can be in seat number three. And another way to think about it, if two people have already sat down, there's only one person who
could be in seat number three. And so mathematically, what
we could do is just say three times two times one. And you might recognize the mathematical operation factorial, which literally just means
hey, start with that number, and then keep multiplying
it by the numbers one less than that and
then one less than that all the way until you get to one. And this is three factorial, which is going to be equal to six, which is exactly what we got here. And to appreciate the power of this, let's extend our example. Let's say that we have five seats. One, two, three, four, five. And we have five people, person A, B, C, D, and E. How many different ways
can these five people sit in these five seats? Pause this video and figure it out. Well, you might immediately say well that's going to be five factorial, which is going to be equal to five times four times three times two times one. Five times four is 20. 20 times three is 60. And then 60 times two is 120. And then 120 times one is equal to 120. And once again, that makes a lot of sense. If no one's sat down, there's five different possibilities
for seat number one. And then for each of those possibilities, there's four people who
could sit in seat number two. And then for each of
those 20 possibilities in seat numbers one and two, well there's gonna be
three people who could sit in seat number three. And for each of these 60 possibilities, there's two people who can
sit in seat number four. And then once you know who's
in the first four seats, you know who has to
sit in that fifth seat. And that's where we got that 120 from.