# How we come up with the $(n-r+1)$ part in permutation formula.

So, I know that $$^nP_r= n(n-1)(n-2)\cdots(n-r+1)$$

And it seems quite obvious, but I'm struggling to comprehend why the last factor is $$n-r+1$$.

• Say there are n chairs and k people. How many ways can you seat the k people? n(n-1)(n-2)... Notice that the 2nd term is n-1, not n-2 like most people would think (maybe since it has a 2 in it). Therefore, the kth term will not be n-k, but n-k+1. So, the complete expansion is n(n-1)(n-1)...(n-k+1), which one can rewrite as n!/(n-k)!. Commented Jul 19, 2023 at 14:29
• Thanks, i got it, i know its stupid, but i got it now, thanks Commented Jul 19, 2023 at 14:30
• For what its worth, I dislike using "P" in notations like this. Of course you should match whatever notation your teacher or book is using currently, but after you get out of that class you can choose for yourself what notation to use and it is beneficial to be aware of all of the other notations that can be used. I personally prefer $n\frac{r}{~}$ like seen here as it makes certain things like the solution to the birthday problem easier to write, like $\dfrac{365\frac{20}{~}}{365^{20}}$ Commented Jul 19, 2023 at 14:32
• You can also write it as $(n-0)\cdots(n-(r-1))$, so the numbers being subtracted are $0,\cdots,r-1$. Commented Jul 19, 2023 at 15:56
• Thinking that it should be $(n-r)$ is a very common error for many problems, known as the "fencepost error" betterexplained.com/articles/… Commented Jul 19, 2023 at 16:05

$$^nP_r=\frac{n!}{(n-r)!}$$ $$=\frac{n(n-1)(n-2)\cdots(n-r+1)(n-r)!}{(n-r)!}$$ $$=n(n-1)(n-2)\cdots(n-r+1)$$

It seemed obvious but, I was struggling to express it mathematically I guess.

Without going into much detail, it can be understood like this -

Suppose we have $$n$$ distinct entities and we want to know the number of permutations we will get from taking $$r$$ entities into consideration,

we have $$1, 2, 3, 4, 5 \dots r$$ places to fill and $$n$$ elements to fill those places

The first place will be filled by $$n$$ ways, the Second by $$n-1$$, the third by $$n-2$$, the fourth by $$n-4$$, and so on, So the pattern is - for any place there are $$n - \text{no. of filled places}$$ objects left.

so for the r-th place we will have $$n - ( r- 1)$$ options, as $$(r-1)$$ places has been already filled.

So now it makes more sense that the last factor will be $$n - (r-1) = n - r + 1$$