Table of Contents

Mathematics - Combination (Binomial coefficient|n choose k)

About

A combination is a selection of elements from a set where the order of selection does not matter.

Order doesn't matter means that the selections AB and BA are considered a single combination (a single selection).

If the order does matter such as in a digital lock (pin) or the arrival order of a race, the term used is permutation

Example

The most known example is a lottery - if the number are selected in the bad order, you still win.

Calculator

Formula

Without repetition

When repeat is not valid (ie AA is not a valid pair)

We say that:

The best known example of a combination without repetition is lottery numbers (2,14,15,27,30,33)

Combination calculation without repetition is also known as:

Without repetition, the number of combination possible of length k in a set of possible value of length n is: <MATH> \binom nk = (n \text{ choose } k) = \frac{n(n-1)\dotsb(n-k+1)}{k(k-1)\dotsb1} = \frac{n!}{k!(n-k)!} </MATH>

Note:

n! is factorial n

Therefore, when the length of the set is equal to the length of the combinations, the number of combinations is 1.

With repetition

Combination where repetition is allowed is also known as:

Example: coins in your pocket (5,5,5,10,10)

There are <math>\tbinom {n+k-1}k</math> ways to choose k elements from a set of n elements if repetitions are allowed.

<MATH> \binom {n+k-1}k = ({n+k-1} \text{ choose } k) = \frac{(k+n-1)!}{k!(n-1)!} </MATH>

Documentation / Reference