The Binomial Coefficient gives the number of ways we can choose a subset of k elements from a set of n elements
For binomial coefficients,
The sum of binomial coefficients,
Boxes and Balls: "Boxes and balls" is a useful model, where we count the ways to plcae k balls in n boxes. Let us consider three scenarios:
- Scenario 1 : Each box can contain atmost one ball. In this scenario, the number of combinations is directly the binomial coefficient
- Scenario 2 : A box can contain multiple balls. The number of combinations is
- Scenario 3 : Each box may contain at most one ball, and in addition, no two adjacent boxes may both contain a ball. The number of combinations is
[ The Most Important Sequence: The Catalan Numbers, Catalan Numbers Application ]
The Catalan number
gives the number of valid parenthesis expressions that consist of n left parentheses and n right parentheses. Another way to characterize valid parenthesis expressions is that if we choose any prefix of such an expression, it has to contain atleast as many left parentheses as right parentheses, and the complete expression has to contain an equal number of left and right parentheses.
Catalan numbers can be calculated using the formula,
- C_i : the number of ways to construct an empty parenthesis expression using zero pairs of parenthesses.
- C_{n-i-1} : the number of ways to construct a parenthesis expression using the parentheses of the second part.
The base case is C_0 = 1, because we can construct an empty parenthesis expression using zero pairs of parentheses.
Catalan numbers can also be calculated using the formula
Inclusion-Exclusion is a technique that can be used for counting the size of a union of sets when the sizes of the intersections are known, and vice versa. A simple exaple of the technique is the formula
Let us count the number of derangements of {1,2,...,n}, i.e, permutations where no element remains in its original place. The number of derangements equals
Moreover, an intersection of c distinct sets X_k has (n-c)! elements.
[ Burnside's Lemma - combining group theory and combinatorics (Part 1), (Part 2) | Burnside Counting Lemma ]
Burnside's lemma can be used to count the number of distinct combinations so that symmetric combinations are counted only once. Burnside's lemma states that the number of combinations is
where there are n ways to change the position of a combination, are there are c(k) combinations that remain unchanged when the kth way is applied. Example: Calculate the number of neclaces of n pearls, where each pearl has m possible colors. Two neclaces are symmetric if they are similar after rotating them.
The number of distinct neclaces (Burnside's Lemma) is,
[Cayley's Formula, Cayley's Tree Theorem]
Cayley's formula states that there are a total of n^{n-2} distinct labeled trees of n nodes.