In
mathematics, a combination is a selection of items from a set that has distinct members, such that the order of selection does not matter (unlike
permutation
In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or p ...
s). For example, given three fruits, say an apple, an orange and a pear, there are three combinations of two that can be drawn from this set: an apple and a pear; an apple and an orange; or a pear and an orange. More formally, a ''k''-combination of a
set ''S'' is a subset of ''k'' distinct elements of ''S''. So, two combinations are identical if and only if each combination has the same members. (The arrangement of the members in each set does not matter.) If the set has ''n'' elements, the number of ''k''-combinations, denoted as
, is equal to the
binomial coefficient
In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
which can be written using
factorial
In mathematics, the factorial of a non-negative denoted is the product of all positive integers less than or equal The factorial also equals the product of n with the next smaller factorial:
\begin
n! &= n \times (n-1) \times (n-2) ...
s as
whenever
, and which is zero when
. This formula can be derived from the fact that each ''k''-combination of a set ''S'' of ''n'' members has
permutation
In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or p ...
s so
or
. The set of all ''k''-combinations of a set ''S'' is often denoted by
.
A combination is a combination of ''n'' things taken ''k'' at a time ''without repetition''. To refer to combinations in which repetition is allowed, the terms ''k''-selection, ''k''-
multiset
In mathematics, a multiset (or bag, or mset) is a modification of the concept of a set that, unlike a set, allows for multiple instances for each of its elements. The number of instances given for each element is called the multiplicity of that ...
, or ''k''-combination with repetition are often used. If, in the above example, it were possible to have two of any one kind of fruit there would be 3 more 2-selections: one with two apples, one with two oranges, and one with two pears.
Although the set of three fruits was sm