Let’s jump straight in. Suppose I have a collection of n different objects, where n is some unknown but fixed whole number. Suppose I want to arrange k of them in a row on my shelf, where k is some unknown but fixed whole number less than or equal to n. In how many ways can this be done?

This is a counting problem. You are being asked to count how many of something there are. The answer will be a formula involving the unknown quantities n and k. Counting is often thought of as being easy. While it is true that the things which must be counted are easy to describe (I have just done so in a couple of sentences), this does not mean that the problem of counting them is easy. So, in this post I continue my quest to explain some basic things about counting and how to do it.

Mathematics is is hard, that’s why we start with modest goals: Imagine that you are the proud owner of four different ornamental candles. You wish to put two of these on the mantelpiece above the fireplace, as one does. One candle will go on the left-hand side and one on the right. In how many ways can you decorate the mantelpiece thus, using two of your four candles?

The answer is twelve. That seems like quite a lot of different ways, if you ask me. How can one calculate this number? Well, in the other two posts of the series, I have gone on and on about something which I have dubbed as our ‘fundamental observation’ when it comes to these kinds of counting problems. What is this fundamental observation? And what does it mean in the context of this new problem?

This latest example is somewhat similar to the cinema-seats example discussed in the previous post: I have four things (people, candles,…) and I want to arrange some of them in some order. Originally, we were concerned with arranging all of them – i.e. with seating all four friends. This time however, not all of the objects will be used. To illustrate my point, note that the analogous question for friends and seats would be: In how many different ways can two seats be filled by a group a four people?

Once again we can turn to our fundamental rule. Talking in the language of candles now, I ask myself: In how many ways can I place a candle on the left-hand side? Well, I have four candles and one of them needs to be put there, so this is obviously four. I am now left with three candles, from which I must choose one for the  right-hand side. One has to now see that for each and every choice of candle for the left-hand side there are three choices of candle for the right-hand side. The ‘each and every’ part of the previous sentence means that the number of ways (three) in which I can ornament the right-hand side does not depend on the candle which I chose to go on the left-hand side. This is our fundamental observation; the answer is indeed 4 x 3 = 12.

Suppose instead now that I have five different candles from which to choose. What happens then? Well, now I have five choices for the left-hand side, after which I have four for the right-hand side. There are 5 x 4 = 20 arrangements. I could easily swap ‘left’ here with ‘right’ and it would not make any difference to the validity of the argument. If I had six candles there would be 30 arrangements and so forth.

### Pattern Spotting

All we did in the previous paragraph was spot the pattern that was ‘emerging’ and carry it on a bit. We have enough information to make a general conjecture: There are n x (n-1) ways of placing two objects in two empty spaces when you have objects from which to choose. After all, our method of argument or ‘proof’ would be exactly the same as with four candles. There are n choices for the first space and for each and every such choice, there are n-1 choices remaining for the second space.

We are doing well, but much more follows naturally: Why stop at two spaces to be filled? Doesn’t our argument apply even more generally? Let’s see: Suppose I had three spaces to fill with 5 objects. I could choose from 5 for the first space, from 4 for the second and from 3 for the third… For each and every way in which the first two spaces could be filled, there are three ways in which the last place can be filled… This seems to be working.

We now have enough information to make an even more general observation, completely dealing with counting problems of this form. Allow me to quickly introduce a bit of terminology: Suppose I am filling k spaces using n objects (like in the introduction), or, equivalently, arranging k objects, where each object is taken from a set of n objects. Then, each possible way in which I can do this is called a permutation and the quantity I am interested in counting is called the number of permutations of k objects from n. To arrive at this number I proceed along the lines we have discussed: There are n choices for the first space to be filled… (n-1) choices for the second space… n-2 choices for the third…    …   …  and (n-k+1) for the k$^{th}$. The only potentially tricky bit is to work out that the , but one can only spell out so much, so I leave that to you.

Let’s record what we know: The number of permutations of k objects from n is n x (n-1) x (n-2) x … x (n-k+1). If you are comfortable with the standard notation introcued in the previous post, i.e. that n! = n x (n-1) x (n-2) x … x 3 x 2, then you will be able to deduce that the number of permutations of k objects from n is is n!/(n-k)!