Abstract
As a former engineering student, I have a great
interest in a real world application of mathematics. Probability
is something I can relate to. I am lucky enough that
after I switched to Mathematics, this is one of
many interests of my Ph.D. advisor, Doron Zeilberger, as well.
In this article we create a program to apply the
overlapping stage approach
to calculate the moments and
of combinatorial objects.
We also show the normality property of their
distributions when these moments are easy
enough to calculate.
1 Introduction
The expectation functional, is a powerful tool to study combinatorial objects,
and often gives us quite useful information.
For example, the common technique in probabilistic method
to show the existence of the objects is to show , i.e.
|
|
|
For the higher moments, ,
the computation gets complicated fast and we need computers to do symbolic
computation. The main technique to deal
with the higher moment is called
the overlapping stage approach
and has already been demonstrated in [7],
[8]. We briefly describe this approach below.
It is easy to see that .
The computation for is somewhat harder.
The other higher moments than that are very
hard to do without a computer.
where the sum is over all the objects of interest over some domain,
and is the indicator random
variable that is 1 if the object satisfies the assigned property and
0 otherwise.
We also have
|
|
|
and by linearity of expectation and symmetry, we further have
|
|
|
The difficulty of calculating the higher moment lies
in how these random objects intersect with each other.
There are some former works of Doron Zeilberger as in
[6, 7, 8, 9, 2, 1] that we can study.
For brute force calculation referred to [6].
For overlapping stage approach referred to [7, 8].
For asymptotically normal on different statistics of permutations
refer to [2, 1]. This work can be viewed as a continuation of [7, 8].
Apart from the mathematical contents we are presenting,
the goals (in a bigger picture) of this article are to
-
1.
Serve as an introductory reading for an
interested reader.
-
2.
Give examples of combinatorial objects that
the moments can be computed from. We consider
Schur triples, inversion and major index, Boolean boards
and Boolean functions.
-
3.
Demonstrate an application of symbolic computation
which, in this case, was done by Maple program.
2 Monochromatic Schur Triples on
Monochromatic Schur Triples on is a topic in Ramsey theory.
We let be set of all -integer-colorings
of , and be the number of monochromatic Schur triples
of in .
We calculate , the moment of
A triple can be written as
where are triples of the form
and are triples of the form .
|
|
|
|
|
|
|
|
Already there are two formulas for
depending on whether
the length of the interval, , is odd or even.
Case 1: is odd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Case 2: is even
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The calculation for the second moment is considerably harder.
We consider -tuples of triples of
|
|
|
The sum depends on how and interact with each other.
For each configuration of
For example, when and
the two triples do not intersect.
Let represent each of the isomorphic configurations.
While the first moment has only 2 isomorphic configurations
and , the second moment has 42 configurations.
We denote the weight to be the number of
isomorphic configuration that occurs in the sum.
For each , we find and ,
then apply the following relation for
|
|
|
The first quantity, is not hard to compute.
Let .
|
|
|
The second quantity, is harder to compute. One way to do so is to use
Goulden-Jackson Cluster method, see [5].
This method gives us a generating function in terms of .
Formulas: has 12 formulas up to the values of mod 12.
We obtain the formulas by applying both Goulden-Jackson Cluster method
and polynomial ansatz.
For each contributes to , we first find the generating function using
Goulden-Jackson Cluster method. This gives us the period of .
Then we count numerically
for each . Finally we interpolate the polynomial,
of degree at most 4 with each period that fits the numerical results.
This polynomial ansatz actually gives the rigorous proof of the second moment.
As an example, we show the formula of for 1 mod 12,
|
|
|
The complete solutions of and
can be found in Maple program
SchurT.txt on the author’s web site.
We now consider -tuples of triples of
|
|
|
We again consider for each isomorphic configuration ,
its weight and its probability .
For , there are more than 500 isomorphic configurations
of
with at least 72 formulas up to the values of mod 72.
We tried for about 3 weeks, but in the end,
we felt like it is too much. At least
we know it is not easy to compute these moments.
3 Method of Moments for Asymptotic Normality
In the case where we work with objects with a nice generating,
we will try to show that asymptotically their distribution is normal.
In this section, we will layout the method of moments for this purpose.
We first define the moment generating function
Definition.
Moment generating function of standard normal distribution looks like
|
|
|
To show asymptotic normality of some combinatorial objects,
we will show that, asymptotically, their moment generating functions
(after centralize and normalize) are
Another method is to match their coefficients.
The Maclaurin series of
is
On the other hand, the general series expansion of moment
generating function (for the discrete objects) is
|
|
|
where . We note that as well.
Comparing these two series, we need to show that
and
4 Inversion and Major Index
Inversion number of a permutation is the number of “misplace”
between the pair of elements. Let be a permutation.
The inversion number,
is the number of pair such that and
For example, from the pairs
As an application, the
inversion numbers are used in the
Laplace expansion when we calculate the determinant
of squared matrix.
The probability generating function over
all permutation of length is defined as
|
|
|
has a nice formula which can be shown by induction on ,
|
|
|
The mean, , of inversion number over all
permutation of length is .
This can be seen combinatorially or through generating function,
i.e.
Therefore, the probability generating function about the mean is
|
|
|
From here, we (or our computer friend) derive that
the variance, , is
On the other hand, the major index of a permutation,
is the sum of the positions of the descents of the permutation, i.e.
|
|
|
For example
It is a well known result that the distributions over all
permutations of length of inversion number
and major index are the same. This fact was shown
by MacMahon in 1913, [4].
William Feller ([3], 3rd ed., p.257)
proved that the number of inversions (and hence also the major
index) is asymptotically normal.
That is if we let be the centralized
and normalized random variable
then , as ,
in distribution, where is the Gaussian distribution whose probability
density function is .
Moreover, in 2010, Baxter and Zeilberger, [1], showed that
the inversion numbers and the major index are
asymptotically joint-independently-normal.
This is an impressive result.
In this section, we show the asymptotic normal
distribution of inversion numbers
(also number of major index). We follow the
method in [2].
The outline of the method is similar to Feller.
We show that
as .
Although this time we show by moment calculation method, i.e.
and
for every , where .
Note that the odd moment case is obviously seen from symmetry.
4.1 Asymptotic-Normality of Inversion Numbers
The goal is to find the binomial moment
(before we convert it back to ).
This binomial moment is the coefficient of Taylor series expansion of at 1.
Writing then
|
|
|
|
|
|
|
|
Toward that, we consider
|
|
|
We then define by replacing with in the above equation:
|
|
|
The Taylor expansion of from Maple looks like
|
|
|
|
|
|
|
|
The general formula is not difficult to find:
|
|
|
where
|
|
|
Now consider the recurrence
|
|
|
By comparing the coefficient of
on both sides of the equation, we have
|
|
|
(1) |
With this recurrence we can prove the conjecture
of leading term of by an induction on .
We see from the formula that the leading term of is
|
|
|
We now can prove the leading term of
Theorem 1.
|
|
|
|
|
|
Proof.
We calculate directly that and
For ,
we verify the leading terms on both sides of (1)
which in turn equivalent to do induction on
The leading term of the left hand side of (1):
|
|
|
The leading term of the right hand side of (1):
|
|
|
|
|
|
|
|
|
|
|
|
Case :
The leading term of the left hand side of (1):
|
|
|
The leading term of the right hand side of (1):
|
|
|
|
|
|
|
|
|
|
|
|
The leading terms on both sides are equal in both cases.
∎
Remark.
In fact we can show as many leading terms as we’d like i.e.
|
|
|
|
|
|
We encourage the reader to check the calculation themselves.
The last step is to turns the binomial moments
to the straight moment using the well known identity:
|
|
|
where is a Stirling number of the second kind
i.e. number of ways to partition objects
into non-empty subsets.
Then the leading term of is
|
|
|
and
|
|
|
The simple calculation leads us to next corollary.
Corollary 2.
|
|
|
|
|
|
|
|
The coefficient of in is 0.
So we know that the actual leading term has
degree in less than
It is now easy to verify the claim that
is and
is asymptotically.
Remark.
It is possible
to extend the result to as many leading terms of as we’d like, i.e.
|
|
|
|
|
|
|
|
|
|
|
|
4.2 Asymptotic-Normality of Major Index
Asymptotic-Normality of Major Index already follows
from those of inversion numbers. However this time we
want to show it by starting with recursive relations right away
rather than the known generating function.
This recursive relation method is from the
awesome paper [1] mentioned earlier.
Define generating function of major index:
|
|
|
The recurrence relation comes from considering
the last 2 elements in the permutation.
|
|
|
So in order to compute , we introduce the
more general counting function of permutations (in )
that end with an Let’s call it .
|
|
|
It follows that (dropping the argument ):
|
|
|
with Note that, after chopping ,
the index of the second sum has been rearranged.
Replacing by in the above equation, we have:
|
|
|
Then subtract the former with the latter to get
|
|
|
|
|
|
|
|
(2) |
Another important relation,
|
|
|
(3) |
Finally, the connection between and is
|
|
|
Centralized Probability Generating Function
Consider the centralized probability generating function:
|
|
|
The recurrences (4.2) and (3) become:
|
|
|
(4) |
and
|
|
|
(5) |
Guessing the Binomial Moments
The equations (4) and (5) help us to
crank out very quickly which will help us
to conjecture the binomial moment through
the Taylor series:
|
|
|
The conjectures that we made here are similar to what we had before, i.e.
for
|
|
|
|
|
|
Guessing is nice and all. But how to prove?
You can make a recurrence out of (4) and (5), i.e.
comparing coefficient of on both sides:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(6) |
|
|
|
|
|
|
|
|
|
|
|
|
(7) |
It is possible to show that are the same for all .
As a result for all .
We simplify (6) and (7) using this claim.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(8) |
|
|
|
|
|
|
|
|
(9) |
We note that
and
We could prove the conjectures by
applying either (8) or (9).
We choose to show by (8).
Theorem 3.
For
|
|
|
|
|
|
Proof.
We calculate directly that and
For ,
we verify the leading terms on both sides of (8)
which in turn equivalent to do induction on
Case :
The leading term of the left hand side of (8):
|
|
|
The leading term of the right hand side of (8):
|
|
|
|
Case :
The leading term of the left hand side of (8):
|
|
|
The leading term of the right hand side of (8):
|
|
|
|
∎
Lastly we define
The leading term from theorem 3 implies
the leading term of of
since
we can see that
From this point on, the normality distribution of
the random variable of major index
on permutation of length
can be shown the same way as in the last part of
section 4.1 on inversion numbers.
5 Boolean Functions
Boolean function is function that
sends each element in the Boolean domain
to
For example, a boolean function with is
shown in the form of the truth table,
The boolean function in a “disjunctive normal form” (DNF)
that represents this table is
|
|
|
With the length is 3,
the possible number of terms is
and the possible number of boolean functions is
In general, there are possibilities of boolean function of length .
We write the boolean function by the set of elements that map to 1.
In the example above, .
From this point of view, the boolean function is a set of
vertices in a -dimensional unit cube.
From this point onward, we will look at the boolean
function from this angle and denote the set of
vertices as .
5.1 Asymptotic Normality of Number of Elements in
The result from the name of this section might sounds obvious.
The distribution is just a binomial. But we will calculate the moments
and hopefully obtain some formulas and identities along the way.
Let be a sample space of all
boolean functions. Let be
a random number of 0-cube (0-dimension subspace),
i.e. number of elements that are contained in the set
of boolean function.
Of course, We want to work toward the
asymptotic normality of Basically, we want to show that
as .
We actually show the even moment of
and the odd moment of for every .
But the odd moment case is obviously seen from symmetry.
Therefore we only show that asymptotically
The Generating Function Method
Define the generating function by
where is the number of elements in the set and
is the number of ways to have elements with each
elements have length The formula for is
(each element has 1/2 chance to be in and 1/2 chance to be out of ),
|
|
|
The generating function about the mean is
|
|
|
This binomial moment is the coefficient of Taylor series expansion of at 1.
Writing , we have
|
|
|
Toward that, we consider
|
|
|
We then define by replacing with in the above equation:
|
|
|
(10) |
The Taylor expansion of from Maple looks like
|
|
|
|
|
|
|
|
Let the expansion of be
|
|
|
It can be shown from (10) that the leading term of is
|
|
|
|
|
|
|
|
Now consider the recurrence
|
|
|
(11) |
By comparing the coefficient of in (11)
on both sides of the equation, we have
|
|
|
(12) |
With this recurrence,
we can prove the leading term of ,
by induction on .
Theorem 4.
|
|
|
|
|
|
Proof.
We calculate directly that and
For , we verify the leading terms on
the right hand sides of (12).
Case :
|
|
|
|
|
|
|
|
|
|
|
|
Case :
|
|
|
|
|
|
|
|
|
|
|
|
∎
Once these have been verified, we turns the binomial moments
to the straight moment , similar to section 4.1,
using the well known identity:
|
|
|
The simple calculation leads us to next corollary.
Corollary 5.
|
|
|
|
|
|
|
|
It is now easy to verify the condition for normality that
and as .
5.1.1 Moment Calculations
In this subsection, we apply the overlapping stage approach
to calculate and relate it to the moment about
the mean .
First we calculate the straight moment
The first moment is easy.
|
|
|
For the second moment,
|
|
|
For the third moment,
|
|
|
For the fourth moment,
|
|
|
These moments are calculated based on how they overlap with each other.
In general, the moment is
|
|
|
(13) |
where is again a Stirling number of the second kind.
We use these straight moment to calculate the moments about the mean,
|
|
|
(14) |
where
Some examples of these moments are
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The general formula is
|
|
|
|
|
|
|
|
Therefore coefficient of is
|
|
|
(15) |
where is a Stirling number of the first kind.
We relate the results of corollary 5 and
observation that to
(15) to gain some new identities.
For case is odd and
and case is even and
|
|
|
For and , we have
|
|
|
5.2 Moments of Numbers of 1-dimensional Cube in
Now we consider , a random number of 1-dimension subspace
that is contained in .
For example, consider .
We have and namely .
Note that
Define the generating function by
where is the number of 1-dimensional cube in the set
of boolean function of length and
is the number of boolean functions
that has number of 1-dimensional cubes.
This time looks complicate. Some of them are
|
|
|
|
|
|
|
|
|
|
|
|
It is very difficult, if not impossible, to find a general formula for
However we show a strong empirical evidence in section 7.2
that the distribution (case ) once again converges to normal.
Let .
We now apply the overlapping state approach
to calculate A few of them are
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We did not manage to find formulas for other moments.
Some moments about the mean are
|
|
|
|
|
|
|
|
5.3 Moments of Numbers of -dimensional Cube in
Let be the size of the cube.
Example, the cube of size 2 is
or the cube of size 2: 11B0B is { 11000, 11001, 11100, 11101}.
Let the random variable be the number of -dimensional cubes
in the boolean function of length .
Our goal is to design an algorithm that inputs symbolic and
and numeric and outputs , the -th moment
of -dimensional cubes contains in boolean function , of length
( variables).
The first moment (for any ) is
|
|
|
since
as all the entries of -cube must be there.
The calculation of the second moment is more complicated as
we must keep track of interactions between and .
For
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We can see the pattern for general : (think of as an -cube intersects
between two objects)
|
|
|
|
|
|
|
|
|
|
|
|
where
The formula for the case is
|
|
|
The general formula for variance is
|
|
|
The leading term of can be seen to be .
The calculation for the third moment
is much more complicated,
we only manage to find it for
the case and .
6 Dominos on Boolean Boards
Consider the rectangle board of size with
each of the square filled with number 0 or 1 randomly.
Let be the random variable of number of
2-by-1 domino piece with “the same number”
vertically or horizontally.
For example, on 3-by-3 board:
.
We want to find and
for a fixed but general
The simplest case, for a 2-by- board is
|
|
|
We see that
The data of from the program are
These numbers are
Hence
This observation can be proved combinatorially too.
Let’s move to the second moment.
The data of are
These numbers are
Hence
It follows that .
This observation can be shown formally using the overlapping stage method.
|
|
|
|
|
|
|
|
|
|
|
|
where , the number of possible ways to
put the domino on an -by- board.
Next is the third moment.
The data of are
These numbers are
Then
Then it follows that .
For formal proof, we apply the overlapping stage approach.
|
|
|
|
|
|
|
|
|
|
|
|
where again
The higher moments can be calculated directly by
|
|
|
where
Some examples are
|
|
|
|
|
|
|
|
|
|
|
|
The moments about the mean are
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6.1 Asymptotic Normality of on the Board of size 1-by-
Consider board of size 1-by-.
We will work toward the general formula of the leading terms of
and use it to show normality of
It is easy to see that the probability generating function
is
The centralized probability generating function
|
|
|
We will use the same technique as in the inversion number section
of getting a recurrence. We start with the fact that
|
|
|
(16) |
where , the binomial moment.
Also notice that
|
|
|
Hence,
|
|
|
Then we form the recurrence using (16) and :
|
|
|
(17) |
With the help of computer, we conjecture the formula of the leading term
of (general ) and
apply the induction on to (17) to prove the formula.
The Taylor expansion of around looks like
|
|
|
We conjecture that
|
|
|
|
|
|
|
|
Induction using equation (17) goes through without a problem
(the reader is invited to check that themselves).
Finally we turns these binomial moment to straight moment by
a Stirling number of the second kind, i.e.
We see that
|
|
|
|
|
|
|
|
|
|
|
|
Hence, as
|
|
|
and the normality of this case is proved.
Remark.
We can do better by conjecture (and prove) more leading terms, i.e.
we claim that
|
|
|
|
|
|
|
|
6.2 Asymptotic Normality of on the Board of size -by-
For any fix , the normality of , a random number of dominoes,
on the board of size -by- as
follows from section 6.1 and the discussion before it.
We learned that, for each , are all the same
when written as a function of
for any and Then the result follows from that
of board of size 1-by- is asymptotically normal.
We note that, although the moments are the same for different and ,
the generating functions for a fixed
are more complicated and don’t seem to have nice patterns.