# Question about permutations when n = k

1. Aug 10, 2013

### CuriousBanker

So the general formula for permutations as I understand it is n!/(n-k)!

but what if n=k?

so lets say you want to see how many ways you can seat 5 people in 5 chairs.

then the answer would be 5!/(5-5)! which would be undefined...but logically it should be defined

what did I misunderstand here?

2. Aug 10, 2013

### rubi

(5-5)! = 0! = 1 (by definition), so the term is well-defined and gives you 5! = 120.

3. Aug 10, 2013

### Number Nine

The number of ways to seat 5 people in 5 chairs is 5!.
There are 5 choices of a seat for the first person, 4 for the second, 3 for the third...

This follows the convention that $0! = 1$.

4. Aug 10, 2013

### CuriousBanker

Oh, I did not realize that 0! = 1. I'm not really sure how 0! = 1 makes any sense, but yeah, logically I assumed the answer was just 5!, I was just confused by plugging numbers into the actual formula, how to divide by 0!

5. Aug 10, 2013

### rubi

It's just a definition. You define the factorial recursively by $0! = 1$ and $n! = n (n-1)!$ for all natural numbers. With this definition, you can compute all the factorials, for example:
$3! = 3 \cdot 2! = 3 \cdot 2 \cdot 1! = 3 \cdot 2 \cdot 1 \cdot 0! = 3 \cdot 2 \cdot 1 \cdot 1 = 6$

6. Aug 11, 2013

### MathJakob

How many ways are there to arrange 0 objects? There is 1 way.

$3! = \frac{4!}{4} = \frac{24}{4} = 6$

$2! = \frac{3!}{3} = \frac{6}{3} = 2$

$1! = \frac{2!}{2} = \frac{2}{2} = 1$

$0! = \frac{1!}{1} = \frac{1}{1} = 1$

Last edited: Aug 11, 2013
7. Aug 11, 2013

### CuriousBanker

The intuition behind there only being 1 way to arrange 0 objects makes sense....but what about the formula? Why is 4! equal to 5!/4? Also wouldnt that be an infinite loop, like 4!=5!/4=6!/5....etc?

8. Aug 11, 2013

### MathJakob

Nope. $4!=\frac{5!}{5}=\frac{120}{5}=24$ This is not a formula it's a generalisation.

The actual formula is:

$n!=n\times(n-1)\times(n-2)\times(n-3)\times...(n-n)!$

$4!=4\times(4-1)\times(4-2)\times(4-3)\times(4-4)! = 24$ and remember $(4-4)! = 1$

Last edited: Aug 11, 2013
9. Aug 11, 2013

### CuriousBanker

Right, it's just that using that actual formula I don't see how 0! = 1, but I see how it makes sense intuitively

10. Aug 12, 2013

### MathJakob

Remember we have established that there is $1$ way to arrange $0$ objects. So $0!$ really just means $1$ and if that is true then $0!=1\times(1-1)!=1$

11. Aug 12, 2013

### CuriousBanker

Got it, so it's just a definition. Makes sense, thanks!

12. Aug 12, 2013

### jbriggs444

Yes, just a definition. But somewhat more general than you might expect.

If you add up a list of numbers with no entries, the sum is taken as zero. Zero is the additive identity. This is sometimes called an "empty sum".

If you multiply a list of numbers with no entries, the product is taken as one. One is the multiplicative identity. This can be called an "empty product".

A list that starts at entry number 1 and ends at entry number 0 is empty. That is a convention that is adhered to in programming languages such as Ada.

So the list of all the numbers from 1 on up to 0 is empty. If you multiply all the entries in that list together you get an empty product. An empty product is equal to 1.