Basically this is what I've found, and I'm pretty sure it works:

For questions where you want to find how many ways letters can be arranged so that the letters are in a certain order (ie the letter "a" precedes the letter "b"), you can use the following:

Consider you wanted to arranged 'n' letters and you want 'k' of those letters to be in a particular order, like the question in this thread (the letters of koala need to be in order, so in this case n=12 and k=5). Then the following is what you do (I think):

For k=2, amount of arrangements is:

which is just the '(n-1)'th triangular number.

This can also be written as:

For k=3, amount of arrangements is:

For k=4, amount of arrangements is:

For k=5, amount of arrangements is:

Etc.

I'm going to go through this post and make sure I haven't did a typo or something and make sure everything is correct as well.

But notice how the number on top of the summations always goes down by 1? It goes from n-1, to n-2, to n-3, to n-4, etc. And you just keep adding a summation each time basically.

## Bookmarks