In combinatorial mathematics, a combination is an un-ordered collection of unique sizes. Combinatorics is a branch of Pure mathematics concerning the study of discrete (and usually finite) objects (An ordered collection is called a permutation. In several fields of Mathematics the term permutation is used with different but closely related meanings ) Given S, the set of all possible unique elements, a combination is a subset of the elements of S. The order of the elements in a combination is not important (two lists with the same elements in different orders are considered to be the same combination). Also, the elements cannot be repeated in a combination (every element appears uniquely once); this is often referred to as "without replacement/repetition". This is because combinations are defined by the elements contained in them, thus the set {1,1,2} is the same as {2,1,1}. For example, from a 52-card deck any 5 cards can form a valid combination (a hand). In Poker, players construct hands of five cards according to predetermined rules which vary according to the precise variant of poker being played The order of the cards doesn't matter and there can be no repetition of cards.

A k-combination (or k-subset) is a subset with k elements. In Mathematics, an n-set is a set containing exactly n elements where n is a Natural number. The number of k-combinations (each of size k) from a set S with n elements (size n) is the binomial coefficient (also known as the "choose function"):

$C^n_k = {n \choose k} = \frac{n!}{k!(n-k)!}.$

where n is the number of objects from which you can choose and k is the number to be chosen, and n! denotes the factorial. In Mathematics, the binomial coefficient \tbinom nk is the Coefficient of the x   k term in the Polynomial Definition The factorial function is formally defined by n!=\prod_{k=1}^n k

As an example, the number of five-card hands possible from a standard fifty-two card deck is:

${52 \choose 5} = \frac{n!}{k!(n-k)!} = \frac{52!}{5!(52-5)!} = \frac{52!}{5!47!} = 2598960.$

The number of combinations with repetition can be calculated as:

${{(n + k - 1)!} \over {k!(n - 1)!}} = {{n + k - 1} \choose {k}} = {{n + k - 1} \choose {n - 1}}$

For example, if you have ten types of donuts (n) on a menu to choose from and you want three donuts (k) there are (10 + 3 − 1)! / 3!(10 − 1)! = 220 ways to choose (see also multiset). In Mathematics, a multiset (or bag) is a generalization of a set.

A combination is a special case of a partition of a set; specifically, a partition into two sets of size k and n − k. In Mathematics, a partition of a set X is a division of X into non-overlapping " parts " or " blocks "

Since it is impractical to calculate n! if the value of n is very large, a more efficient algorithm is

${n \choose k} = \frac { ( n - 0 ) }{ (k - 0) } \times \frac { ( n - 1 ) }{ (k - 1) } \times \frac { ( n - 2 ) }{ (k - 2) } \times \frac { ( n - 3 ) }{ (k - 3) } \times \cdots \times \frac { ( n - (k - 1) ) }{ (k - (k - 1)) }.$

Example:

${52 \choose 5} = \frac { 52 }{ 5 } \times \frac { 51 }{ 4 } \times \frac { 50 }{ 3 } \times \frac { 49 }{ 2 } \times \frac { 48 }{ 1 } = 2598960.$

You get the same result for nk as for k. Therefore, when k  is more than half of n, it may be easier to compute using nk in place of k.