# Counting, permutations, and combinations

permutations example:

$$A, B, C, D, E \longrightarrow 1, 2, 3, 4, 5$$

Permutations: $$5! = 5 * 4 * 3 * 2 * 1 = 120$$

where $$5!$$stands for $$5 factorial$$.

$$A, B, C, D, E \longrightarrow 1, 2, 3$$

Permutations: $$5 * 4 * 3 = 60 = \frac{5*4*3*2*1}{2*1} = \frac{5!}{2!} = \frac{5!}{(5-3)!}$$

### Factorial

$$n! = n * (n-1)*(n-2)...1 \newline  3! = 3*2*1 \newline  2! = 2*1\newline  1!=1 \newline 0!=1$$

$$\text{Permutation formula:}\ \ _nP_k = \frac{n!}{(n-k)!}$$

$$\text{Combination formula:} \ \  _nC_k=\frac{\frac{n!}{(n-k)!}}{k!} = \frac{n!}{k!(n-k)!}=\binom{n}{k}$$

example:

&#x20;$$A, B, C, D, E, F \text{(people)}\longrightarrow 1, 2, 3, 4 \text{(chairs)}$$

$$_6 C_4=\binom{6}{4} =\frac{6!}{4! (6-4)!} =\frac{61}{4!*2!}=\frac{6*5*4*3*2*1}{4*3*2*1\ \ *\ \  2*1}= 15$$

You will have 360 permutations, verses 15 combinations.

How many ways to choose 2 from $$A, B, C, D$$

$$_4 C_2 = \binom{4}{2} = \frac{4*3}{2} = 6$$

Another way to write this is $$\binom{5}{3}$$, or $$5$$ choose $$3$$, which is $$10$$.



