rcombinations
In combinatorics, an r-combination of a finite set with n elements is a subset that contains exactly r elements, where the order of selection does not matter. The number of r-combinations is given by the binomial coefficient C(n, r) = n! / (r!(n − r)!). This value is defined for integers n ≥ 0 and 0 ≤ r ≤ n; if r is outside this range, the count is zero.
An example: from a set of four elements, the number of 3-element subsets is C(4, 3) = 4.
Key properties include symmetry and a recurrence relation. The symmetry property states C(n, r) = C(n, n −
r-combinations connect to broader concepts in algebra and probability. They appear in the binomial theorem, where
There is a related concept of combinations with repetition (multiset combinations), counted by C(n + r − 1,