# Mathematics - (Combination|Binomial coefficient|n choose k)

Combination calculation called n choose k, because there are $\displaystyle n\choose k$ ways to choose k elements from a set of n elements.

## 3 - Assumption

• Order doesn't matter (AB and BA are considered a single combination). If the order does matter it is a Permutation.
• Repeat is not valid (AA is not a valid pair).

## 4 - Function

$$\begin{array}{rrl} {n\choose k} & = & (n \text{ choose } k) & = & \frac{n!}{k!(n-k)!} \end{array}$$

where:

• k is the trial number, k = 0, 1, …, n
• n is the number total of trial

where:

• n would be the number of element in the whole set
• k would be the number of elements in each combination