Main content

# Factorial and counting seat arrangements

Learn how to use permutations to solve problems involving ways to arrange things. Permutations involve using factorials to count all possible arrangements. This video also explores examples including arranging three people in three seats and five people in five seats.

## Want to join the conversation?

- Okay, so this makes sense, but what's a good explanation for why we multiply instead of add, other than simply saying "because it gives us the right answer"?(47 votes)
- We multiply because these quantities depend on each other. If they are independent of each other we add. Hope this helps!(24 votes)

- So what if there are 5 people and 15 chairs?(19 votes)
- Switch your frame of reference - choose people for the chairs, and not chairs for the people.(29 votes)

- Can we have factorials for negative numbers?(7 votes)
- Not typically. There is a generalization of the factorial function called the gamma function, but even this doesn't give values for negative integers (though it does for all other real numbers).(10 votes)

- What if we have 5 students (A,B,C,D,E) and 5 chairs, but A and B refuse to sit next to each other?(4 votes)
- There are 5! possible seating arrangements without the condition. From that, we subtract all arrangements where A and B sit next to each other.

The easiest way to do that is to count A and B as one person. But we need to careful, because if A and B sit next to each other, the order can be AB or BA.

Possible seating arrangements of 4 people = 4!

Since A and B can be arranged as either AB or BA, possible seating arrangements where A and B sit next to each other = 2 * 4!

5! - (2 * 4!) = 72

Proof of answer with a computer here: https://www.khanacademy.org/computer-programming/mind-mines/6427351516233728(11 votes)

- In this video Sal discuses how people can be arranged around a round table.

What if the table was in any other shape like a rectangle ? How can the number of arrangements be found then ?(3 votes)- If I'm not mistaken, then you can use the same method. I don't think the shape of the table matters. But please don't depend on this answer, I'm very, very new to calculus. Just wanted to help!(7 votes)

- What if the number of seats is greater than the number of people or people must sit in a certain seat? Then how would you do it?(4 votes)
- Good question. The permutation formula works, but you need to think of it in the right way. In this instance, you can think about how many ways you can put the SEATS under the PEOPLE. If you have 5 people and 8 seats where order matters, you can put the first person in any of the 8 seats (put any of the 8 seats under person 1), the second person in any of the remaining 7 (put any of the remaining seven seats under the second person), etc. This gives 8*7*6*5*4=8!/3!= 8 P 5(5 votes)

- I think a good analogy for this is to think of a branching tree diagram.

•

/ | \ *3

• • •

/ \ / \ / \ *2

• •• •• •

| || || | *1

• •• •• •

This is the same as saying: !3 which is 3*2*1 which is 6. Thus there are 6 possibilities. Or six nodes for the tree diagram. Each branch signifies the possibilities in which the node can branch off to or diversify.

Pardon the inaccuracy of the tree diagram. Feel free to correct and/or improve the analogy I made.(2 votes)- Your analogy of a branching tree diagram to explain the concept of permutations is a good one. The branches of the tree represent the possible choices or outcomes at each step, and the nodes represent the points at which a decision or choice is made. The number of branches at each node represents the number of choices available, and the number of nodes in the tree represents the number of steps or choices in the process.

To improve the accuracy of the analogy, you could add labels to the branches and nodes to make it clearer what each one represents. For example, you could label the branches with the choices available at each step, and label the nodes with the number of choices made so far. You could also add a final node at the end of the tree to represent the final outcome or result.

Overall, your analogy effectively captures the essence of permutations as a way of calculating the number of possible arrangements or orders of a set of objects or events.(5 votes)

- What about calculating 5.3! (FACTORIAL of decimal ) . .You ask google for that It gives

5.3! = 201.813275185 .

The Gamma Function can be used but is there simple explation how calculators (GOOGLE CALCULATOR) calculates it . Is there a simple algorithm ?(3 votes)- The gamma function is given as an integral, which can be approximated by evaluating a certain exponential function at a bunch of points, multiplying each value by a certain small number, and adding them up. I suspect this is roughly how Google computes it, though (being Google) it may use a more advanced algorithm than that.

For more on approximating integrals, try starting here on Khan Academy:

https://www.khanacademy.org/math/ap-calculus-ab/ab-accumulation-riemann-sums/ab-riemann-sums/v/simple-riemann-approximation-using-rectangles(2 votes)

- How many ways can six students be arranged on a bench seat with space for three?

I'm stuck(2 votes)- Well it works pretty much the same way as the other cases.

If you had six students and six seats, it would 6 * 5 * 4 * 3 * 2 * 1 = 6! = 720

But with only three seats you have 6 * 5 * 4 = 120

You start with seat one, there are six students so you six possibilities. On the next seat you only have 5 possibilities, because one has already sat down and on the next its four. After that, you stop, because there are no more seats to fill.(3 votes)

- this is great topic, however in programming word it's hard to code algorithm for Permutations(3 votes)

## 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.