# How many ways can we order a set of $n$ elements?

If you have $n$ CDs to arrange sequentially on a shelf, say for $1 \le n \le 20$, how many ways can they be ordered? Please also explain the solution steps.

-
I am not willing to repeat: Given that you have 355 rep and a silver badge, I assume you know the workings of the forym but still you post questions in this manner. I will downvote for now, and if you rephrase your question into a more polite form, I am willing to retract that vote. Please understand and help the forum move on. –  user21436 Feb 13 '12 at 8:07

There are $n!$ ways of ordering them, where the exclamation mark represents factorial, which itself is a special case of the gamma function.
The reasoning is that you have $n$ choices for the first (assume leftmost) object. Then for the next, there are $n-1$ choices remaining, and so on, until in the last place, there is only one choice. By a counting principle from combinatorics (sometimes called the rule of product or fundamental rule of counting), the total number of ways is then the product $$(n)\cdot(n-1)\cdots3\cdot2\cdot1=n!$$ This process is also called sampling without replacement (with ordering), but usually in the context of sampling, the order of draws is unimportant, and only the resulting set of objects drawn (without regard to order) is significant. And when all objects are drawn and order is significant, the process of assigning an order to each object (or reassigning orders starting from an arbitrary numbering of them) is also equivalent to defining a permutation of the objects.
Think about choosing them in some order. First you have $n$ objects to choose from, then $n - 1$ then $n - 2$ and so on. Thus $n!$ is your solution.