- Binomial Coefficients
- Dividing a Factorial
- How big is a binomial coefficient?
- Application to Prime Number Theorem
Binomial Coefficients
We denote Binomial Coefficients as meaning ( choose ) and it corresponds to number of element subsets of an element subset. For example, . Binomial (roughly means "two names") corresponds to sum of two things. This is where the coefficients comes from:
There is an explicit formula for binomial coefficient:
More explicitly:
In that case, the numerator is number of ways we can pick elements, and the denominator is to handle the different ways we could have taken them. Pascal's triangle can also give you these results, but note that Pascal wasn't the first one to find that.
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
// and so on..
Notice that this triangle tells us:
Even more, a number in the triangle is equal to the sum of numbers above it in the previous column. In other words:
This is very handy as we will see in a moment.
You could also have trinomials:
What should be the there? Well, the things we had for binomials are actually easily generalizable.
You could have a three-dimensional Pascal's triangle (like Pascal's Tetrahedron) and you would find these values. Let us look at the Pascal triangle again:
1 // only 1s
1 / 1 // all numbers
1 / 2 / 1 // Triangular numbers
1 / 3 / 3 / 1 // Tetrahedral numbers
1 / 4 / 6 / 4 / 1 // 4-dim Tetrahedral numbers
// and so on..
In general, the column gives you the tetrahedral numbers.
Binomial Polynomials
Let us look at several cases:
Now, these polynomials have real coefficients but we are calculating ways to chose elements, so the result is integer. This is a very nice property, namely: if is an integer, then these polynomials result in an integer.
0 | 1 | 0 | 0 | 0 |
1 | 1 | 1 | 1 | 1 |
2 | 1 | 2 | 4 | 8 |
3 | 1 | 3 | 9 | 27 |
4 | 1 | 4 | 16 | 64 |
What if instead of we used ?
0 | 1 | 0 | 0 | 0 |
1 | 1 | 1 | 0 | 0 |
2 | 1 | 2 | 1 | 0 |
3 | 1 | 3 | 3 | 1 |
4 | 1 | 4 | 6 | 4 |
The upper triangular part of this table is quite nice, the diagonal is just 1s and the upper part is just 0s. What if we wrote instead of in our polynomials?
This polynomial has a really nice property: the result is an integer for all if and only if are integers. We cant say the same for when we use , for example:
is always an integer perhaps? Let us use the binomial polynomial in an example. We remember from high-school:
How would we prove this? Well, notice that
Then, the sum of squares is:
Using the property we have shown above for the triangle:
Properties of Binomial Coefficients
First, let us rewrite the two properties we have shown before:
- Pascal's Triangle:
- Sum of binomials:
- Complementing Coefficient:
- Sum of the rows in Pascal's Triangle:
This can be interpreted (combinatorially) as: sum of number of 0 element subsets, 1 element subsets, , element subsets. This is equal to number of all subsets of a set with elements, which is . You can prove this with generative function with .
- A Useful Sum:
It is cool to show this combinatorially (just draw two sets and try to pick elements in total from both).
- Alternating Sums:
1 = 1
1 - 1 = 0
1 - 2 + 1 = 0
1 - 3 + 3 - 1 = 0
1 - 4 + 6 - 4 + 1 = 0
// and so on..
You will always get 0. You can prove this both combinatorially, or with generative function by giving and .
Recall lattice paths problem, you can solve it using binomial coefficients. Furthermore, you can divide things up using binomial coefficients. For example, you have 5 pirates and you would like to divide up 100 gold coins. In other words: where are integers . Well, you could think of:
o o | o o o o | o ... o | o | o o
where o
is a coin and |
is a separator, so the coins between separator (and ends) denote the number of golds for a pirate. Well, this can be interpreted as: how many ways could we place these separators? There are 104 positions, and we have 4 separators, so the result is:
Let us look at binomial coefficients in modulo 2.
1 // row 0
1 1 // row 1
1 0 1 // row 2
1 1 1 1
1 0 0 0 1 // row 4
1 1 0 0 1 1
1 0 1 0 1 0 1
1 1 1 1 1 1 1 1
1 0 0 0 0 0 0 0 1 // row 8
This is just like Sierpinsky Triangle! Notice that when the row is a power of two, we get almost all zeros:
What if we do this with other primes? Let us look at modulo 3:
1
1 1
1 2 1
1 0 0 1 // row 3
Indeed we get the same pattern at a power of that prime. This is a general property. For prime , and ; and furthermore . You can prove this by looking at the expression:
The numerator is obviously divisible by (which would give 0 in modulo ), and the denominator is only divisible by if or , which are the edge cases. This has a funny application. Take , you would get:
In modulo , you would only get . This is true for prime powers too.
So the property we have shown above is actually general to prime powers:
Dividing a Factorial
We would like to find how many times a prime divides . We can find this as:
where takes the integer part of . This is a finite sum, as when gets large enough the term would be . This formula just comes from looking at the number in as:
A rough estimate of this sum is just the series:
Q: How many zeros are there in the decimal representation of ? A: We can find this by checking how many times and divide this together (i.e., how many times divides this number). It is calculated from the above formula.
, , , and ; in total 249. We can do the same for , but the result will be larger than 249 surely, so we can say 10 divides this number 249 times in total and therefore there are 249 zeros in the end.
A similar method can be used to find how many times divides . For that, you find how many times divides , and then subtract how many times divides and .
How big is a binomial coefficient?
We sometimes want to know roughly how big a binomial coefficient is. A crude estimate is that we can have the upper bound:
since the sum of the row is .
We can also look at the middle coefficient (the largest coefficient) of a row:
which is because the sum of that row is and the largest one should be larger than the average of all them. Since there are values in row, we divide by .
Stirling's Formula
Stirling gave a brilliant formula to find .
If you put these into the factorials of binomial coefficient, you will also get a nice approximation.
Application to Prime Number Theorem
Recall that we want to know how many primes are there up to some number , which we show as . It was found that
We will show a weak form of this theorem, by showing:
so we can show this up to a factor of two. The key idea of the proof is to look at and look at primes dividing it. First we will find the upper-bound.
Suppose . Then divides exactly once. This is because the expression is:
and appears only once in the numerator. Now lets look at the product of primes between and :
How could we say that this is less than ? Well because any prime in between could only divide that binomial coefficient once, and since all those primes are in the numerator then the product itself can divide that by once. As such, the coefficient must be at least larger than the product of primes itself. We also know that the coefficient there is less than from a similar result.
Now lets take the logarithm of that inequality:
Also notice that
because the actual sum has # primes in terms in it but for any prime there is larger than . Then,
Using this estimate, you can find by repeatedly finding , and then and then and so on... We skip that technical detail. The result of this is going to be that # primes is bounded by about . You can make that 2 factor a bit smaller if you work really hard.
Now we will find the lower-bound. First we notice:
To show this, we must count # times divides and we know how to do this:
and so on… However, notice that each of these rows are either 1 or 0. Recall that in our condition , so the integer part of could only be 1 if . In that case, we would have . If then we just have and so the result can only be 1 or 0.
I really didn't understand this part above...
So we take the logs,
Here we can make some simplifying assumptions:
- The number of terms with are small, as they are pretty rare, so we can ignore them.
- is almost constant. If you look at the graph of it from to a really large , the graph looks almost like a constant line.
With these assumptions we can say that in the sum is very close to for most primes. What we then find:
So in the end we can say that # primes lies between about and .
Another application
If you look at the series for you have and these are divisible by . In fact,
What if we divide by ? We get the sequence Catalan Numbers:
The book "Catalan Numbers" by Richard P. Stanley lists 214 different sets that the Catalan Numbers count! Here is an example, where the numbers give us the number of ways to bracket a product:
1: a
1: ab
2: (ab)c | a(bc)
5: ((ab)c)d | a(b(cd)) | (ab)(cd) | (a(bc))d | a((bc)d)
Let us denote Catalan numbers by and . The property of this number is:
We can use generating functions to identify them:
Well then lets look at:
Turns out that:
Now this is just a quadratic equation, which can be solved by:
Remember that is:
Turns out that this is true for non-integers powers too!
These coefficients look a bit messy, but you can write them in a more clever way.