Agenda
<aside> 📌 Reminders
<aside> 💡
The factorial of a number $n$, denoted $n!$, is the product of all positive integers less than or equal to $n$.
$$ n! = \prod_{i = 0}^{n -1} (n - i) = n \times (n - 1) \times (n - 2) \times \ldots \times1 $$
</aside>
Example:
$5! = 5 × 4 × 3 × 2 × 1 = 120$
Factorials are the building blocks of permutations and combinations.
<aside> 💡
A permutation refers to an arrangement of objects where order matters.
Formula (when selecting $r$ objects from $n$ total):
$$ P(n, r) = \frac{n!}{(n - r)!} $$
</aside>
If some objects are repeated, the formula is modified to account for the indistinguishable items:
Formula (where $n_1, n_2, \ldots, n_k$ represent the number of repetitions for each object):
$$ P(n; n_1, n_2, ..., n_k) = \frac{n1}{n_1! n_2! ... n_k!} $$
Example:
<aside> 💡
A combination refers to selecting objects where order does not matter.
$$ C(n, r) = {n \choose r} = \frac{n!}{r!(n - r)!} $$
</aside>
When items can be selected more than once, we use the following formula:
Formula:
$$ C(n + r - 1, r) = \frac{(n + r - 1)!}{r! (n - 1)!} $$
Example: