# Factorial and combinatorial numbers

Combinatorics is the branch of mathematics that devotes itself to looking for methods to count a set of elements or for the way to group elements of a set.

For example,

There is a group of $5$ boys, Alejandro, Bernardo, Carlos, David and Ernesto, and you must select $2$ to do something. Now we wonder: how many possibilities of electing these two boys do we have?

One choice might be Alejandro and Carlos, or also David and Bernardo. But if we have to try all the possibilities by hand we would need a lot of time! Nevertheless, the combinatorial analysis will help us. In fact, it is very fast to calculate the solution to our example (it turns out that there are $10$ different possibilities).

These are two basic concepts on combinatorial analysis, i.e., factorial and combinatorial numbers.

We will call the resultant number, when multiplying all the numbers from $1$ up to $n$, the factorial of natural number $n$. To write it we use the symbol $n!$. Then: $$n!=n \cdot (n-1) \cdot (n-2) \cdot \ldots \cdot 1$$

$1!=1 \\ 3!=3 \cdot 2 \cdot 1 = 6 \\ 4!= 4 \cdot 3 \cdot 2 \cdot 1= 24$

By definition, it is said that the factorial of $0$ is $1$, So: $0!=1$

On the other hand, we call the following a combinatorial number $n$ in $k$ :$$\displaystyle \binom{n}{k}=\frac{n!}{k! \cdot (n-k)!}$$

For example, the combinatorial number $4$ in $3$ is: $$\displaystyle \binom{4}{2}=\frac{4!}{2! (4-2)!}=\frac{4!}{2! \cdot 2!}=\frac{4 \cdot 3 \cdot \not{2} \cdot \not{1}}{\not{2} \cdot \not{1} \cdot 2 \cdot 1}=3 \cdot 2 =6$$

As in the example, to facilitate the calculations it is very advisable to simplify the fractions first of all because, in this way, many calculations are avoided.