We begin with the definition of and
Both and are monotone, proven as follows:
Let , then the first order derivative
Let , then
As and by integral,
we have , and thus is monotone increasing.
Similarly, let , then the first order derivative
Let that , then
As and by integral again,
we have , and thus is monotone increasing.
Moreover, by the Taylor expansion
then for all . We derive following handy inequality from the Taylor expansion.
For integer and , we have
By Taylor expansion, since
therefore
∎
Use the Taylor expansion
to prove that, for any , .
We prove the left side first. Take on both sides, we have left side .
Now by the Taylor expansion, for , we have
The right side holds from the Taylor expansion of , and we conclude that for , . ∎
For any integer , by concavity of ,
Since , and we have the following from lemma 1.5.3
which completes the proof by exponenting over on both sides. ∎
By lemma 1.5.1 and lemma 1.5.4, we have
Suppose there are possible birthdays, and there are people in a room. Then, the probability that all are having different birthdays is
Hence, when , the probability goes to .
But through union bound, we can also give a loose bound as follows. Consider event being the people failed to have distinct birthday from all previous people. Then . Through union bound, the probability of the first people failed to have distinct birthdays is upper bounded by
The upper bound indicates that when , the probability of having distinct birthdays is at most .
Moreover, assuming that first birthdays are distinct, then the next birthdays are different from the first birthdays with probability upper bounded by
Therefore, once there are people out there, the probability of having all distinct birthdays is at most .
The idea of union bound is used throughout the Poisson approximation and balls-and-bins model later on, after introduction of theorem 1.5.15.
Consider the extended birthday paradox, but with no 3 having same birthdays.
Let there be people, and there be days in a year.
Suppose there are pairs of same birthdays, then we first consider the number of pair choices out of people. We can choose 2 people continuously from people, then rule out all the duplicate choices, as we don’t care about the ordering, and thus we have number of choices in total
For each choice, there are days to be distinct, the rest people should have same birthdays as their pairs, leading to probability
Now that the probability with pairs of same birthdays is
summing over over is the exact probability. ∎
balls are thrown independently and uniformly at random into bins.
Find the conditional probability that bin 1 has one ball given that exactly one ball fell into the first three bins.
Find the conditional expectation of the number of balls in bin 1 under the condition that bin 2 received no balls.
Write an expression for the probability that bin 1 receives more balls than bin 2.
If conditioned that there are only 1 ball in first 3 bins, then the probability that a ball is in bin 1 is .
We introduce independent Bernoulli trials with probability indicating if the ball falls in bin 1. Then the conditional probability of given that the ball does not fall into bin 2 is
Therefore, the conditional expectation of under the condition that bin 2 has no balls is
There are only 3 cases related to balls in bin 1 and bin 2, one of more, less, or equal. By symmetry, former 2 cases are equal. Therefore, we need only the equal case to derive the exact result.
We choose balls each for bin 1 and bin 2, and the probability is given by
Therefore, the exact probability for the equal case is , and the desired probability is . ∎
When balls are thrown independently and uniformly at random into bins, the probability that the maximum load is more than is at most for sufficiently large.
Suppose for the bin receives at least balls, let it be event , then the probability is
If any bins are receiving with at least balls, by union bound, the probability is upper bounded by
Since
where second inequality follows from lemma 1.5.1, the probability is then upper bounded by .
Choose , then when is sufficiently large, the probability upper bound is at most . ∎
The following problem models a simple distributed system wherein agents contend for resources but “back off” in the face of contention. Balls represent agents, and bins represent resources.
The system evolves over rounds. Every round, balls are thrown independently and uniformly at random into bins. Any ball that lands in a bin by itself is served and removed from consideration. The remaining balls are thrown again in the next round. We begin with balls in the first round, and we wish when every ball is served.
If there are balls at the start of a round, what is the expected number of balls at the start of the next round?
Suppose that every round the number of balls served was exactly the expected number of balls to be served. Show that all the balls would be served in rounds. (Hint: If is the expected number of balls left after rounds, show and use that .)
We first consider the expected number of remaining balls. Only the bin with one and only one ball can serve the ball, and thus we can disregard the ball onwards. We introduce independent 0-1 random variables for bin has one and only one ball to serve. Therefore, the probability for a bin with only one ball is
where is the number of balls remaining by now.
Let be the number of bins can serve (or balls to disregard), by linearity of expectation, we have
Therefore, the remaining balls next round is .
Let be the remaining balls to serve after round , then . Since
we have , and therefore .
Now we write , and therefore , and we want to know the number of rounds to reach a . Suppose for some constant number of rounds , we count the number of additional rounds until we have
Therefore , that all balls will be served in rounds. ∎
Let be a Poisson random variable with mean , representing the number of a page of this book. Each error is independently a grammatical error with probability and a spelling error with probability . If and are random variables representing the number of grammatical and spelling error (respectively) on a page of this book, prove that and are Poisson random variables with means and , respectively. Also, prove that and are independent.
The sum of a finite number of independent Poisson random variables is a Poisson random variable, by looking at the MGFs. Now think in a reverse way, that a Poisson random variable can be thinned down to a finite number of independent Poisson random variables, which is the Poisson Thinning (Splitting) Property.
Let a Poisson variable with mean represent the errors of a page, then be the random variable represent the grammatical errors with probability in these errors. The probability of is the summation of all conditional probability conditioned over by
which is the probability of a Poisson random variable with mean being . By symmetry, is a Poisson random variable with mean by substituting with .
For and being independent, we prove by the property of independence as follows:
∎
If is a Poisson random variable of mean integer, then .
Show that for .
Argue that .
We write , where . Therefore,
As for , therefore . Thus , and .
Moreover, since , therefore . ∎
Let be a Poisson random variable of mean , and be the median of . Then
If is an integer such that , then , and thus and .
Let be the number of balls in each bin of the balls and bins model, and be independent Poisson random variables of mean . The distribution of is the same as the distribution of conditioned on , regardless of the value of .
Let be a nonnegative function. Then
By conditional expectation and theorem 1.5.14, we have
By definition of the Poisson random variable, is a Poisson random variable of mean , thus
By lemma 1.5.4, . Therefore, . ∎
Let be an event. If has probability in the Poisson case, where there are independent Poisson random variables of mean , then has probability at most in the exact balls and bins case.
Immediately from theorem 1.5.15. ∎
Let be a nonnegative function such that is either monotonically increasing or monotonically decreasing in . Then
Prove that if is monotonically increasing in , then
again under the condition that is nonnegative.
Make a similar statement for the case when is monotonically decreasing in .
Moreover, prove theorem 1.5.17 for the case that is monotonically increasing in .
We derive the chain of inequalities as follows
The first equality holds from conditional expectation, the second equality holds from theorem 1.5.14, the third holds from nonnegativity of , the fourth holds from being monotonically increasing in .
Similarly, if is nonnegative and is monotonically decreasing in , the following holds
By lemma 1.5.12, theorem 1.5.13, and being a Poisson random variable of mean integer, therefore we prove theorem 1.5.17 for the being monotonically increasing/decreasing in . ∎
Let be an event whose probability is monotonically increasing or decreasing in the number of balls. If has probability in the Poisson case, then has probability at most in the exact case.
Immediately follow from theorem 1.5.17. ∎
When balls are thrown independently and uniformly at random into bins, the max load is at least with probability at least for sufficiently large.
In the Poisson case, there are independent Poisson random varables of mean .
If for some load , then
Considering all Poisson random variables, then the probability of all loads being lower than is
From corollary 1.5.16 or corollary 1.5.19, we want the probability upper bound to be less than , as . By lemma 1.5.4 and relax by sufficiently large and by
therefore let , with less than probability in exact case the max load is no greater than . ∎
For balls and bins, the maximum load is from lemma 1.5.9 and lemma 1.5.20 with probability approaches 1 as .
Suppose that we vary the balls-and-bins process as follows. For convenience let the bins be numbered from to . There are players. Each player choose a starting position , then places one ball in each of the bins numbered to . Argue that the maximum load in this case is only with probability that approaches 1 as .
For the player and the bin, we introduce an independent 0-1 random variable , indicating if the player puts ball in the bin. , as the player starts at most bins before the bin. Therefore, is the load of the bin, and by linearity of expectation, . We can apply Chernoff’s tail bound to upper bound the probability for by
By union bound, if there exists bins with load exceeding , the probability is upper bounded by .
Let be the load bound, then the probability upper bound is . We want to have
to bound all of the bin loads. Taking on both sides, , giving only .
But there are at most players and balls, such result follow from vanilla remark 1.5.21. The problem lies in that we did not utilize the structure of the player model, giving a loose bound.
Looking at the balls-and-bins structure, we can divide the circle into intervals, each has length . Let be independent random variables for number of players in the interval, following balls and bins model. An observation is that, for a bin in the interval, its load is at most , relaxed by
Therefore, the max load of a bin is .
We continue with Chernoff tail bound for , then union bound over intervals, rather than over all bins. Since , the probability for existing is .
Again we write to be the number of players in an interval, and we want
and therefore . We conclude that , and the load is .
This balls and bins max load result matches remark 1.5.21. ∎
Let be the number of coupons observed before obtaining one of each of types of coupons. Then, for a constant ,
We can view this problem in balls-and-bins model: If balls are thrown independently and uniformly at random into bins, how many balls are thrown until all bins have at least one ball? We begin with a Poisson approximation, and later demonstrate that the Poisson approximation gives the right answer in the limit.
We begin by Poisson approximation, supposing independent Poisson random variable of mean , then the expected number of balls is . Let be the event that no bin is empty, and let be the number of balls in bin. Since , then
Let . By conditional probability, we have
.
We can use the Chernoff bound such that . ∎
.
Since is monotonically increasing in , by conditional probability
Therefore, we relax the term by
which is interpreted as: when balls are thrown, there exists empty bins; after balls, all bins are filled.
Let be the event that balls thrown with empty bins, be the set for all possible empty bins after initial throws, and be the event that empty bins are filled after another balls. The exact term follows
Since for some by , the probability for all empty bins being filled is upper bounded by the probability of one of the empty bins in being filled, we upper bound by union bound.
Therefore, we conclude the resulting difference by . ∎
By lemma 1.5.24 and lemma 1.5.25, we conclude that
indicating as , for balls bins exact case, all bins are filled with probability . ∎
We consider another way to obtain Chernoff-like bounds in the settings of balls and bins without using theorem 1.5.15. Consider balls and bins model. Let iff the bin is empty, and . Let be independent Bernoulli random variables with probability , and .
Show that for any .
Show that for any .
Derive a Chernoff bound for .
Considering the event that first bins are empty in balls and bins model, the probability is . On the other hand, since each are independent, then has probability .
Since , then for any .
Expanding the prior claim, for any subsets of indices , . We expand MGF function in its Taylor expansion, then we derive the following
Since each are independent, let , and therefore
By linearity of expectation, we have . Therefore, the Chernoff bound is derived as follows
∎
This trick in balls-and-bins model is analogous to the Poisson approximation. The spirit is the same: both are replacing dependent counts with independent random variables whose marginal behaviors matches that of the exact model. Poisson approximation captures more than just the expected load per bin, it captures the correct distributional shape and small-count probabilities, and approximate the joint distribution via independence, giving a limit theorem for the exact case. The Bernoulli trick preserves the expected emptiness per bin via independent random variables, allowing Chernoff to be applied, but it is more of a bounding device than a limit theorem.
This trick can be extended to balls and bins, and be used in Bloom Filter analysis on the number of zeroes ( hash functions, disallowed passwords, and bits to store, yielding balls and bins model).
Bloom filter can be used to estimate set differences. Suppose there are sets and both with elements. Create Bloom filters for and , using the same number of bits and the same hash functions. Determine the expected number of bits where Bloom filters differ as a function of , and .
Let , , , and . We want to know the probability of some bit being set by only one of or , and not by . Therefore, we define following events
be the event that bit set by not by ,
be the event that bit set by not by ,
be the event that bit not set by ,
and let be 0-1 random variables such that if and only if , and .
Since and are symmetric, WLOG we analyze . Assuming hash function set a random bit to 1, then
On the other hand, not being set by for bit is event , which follow .
Therefore, , and by linearity of expectation,
∎
In model we consider all undirected graphs on distinct vertices, an edge is connected between 2 distinct vertices with probability , thus a graph with a given set of edges has probability . The expected number of edges in the graph is , and each vertex has expected degree .
In model we consider all undirected graphs on distinct vertices with exact edges. There are distinct graphs to select with equal probability.
The relation between and has following properties: Let , the number of edges in is concentrated around . Conditioned on having edges, then is uniform over .
Such relation is similar to the one between Poisson approximation and the balls-and-bins model.
The distribution of conditioned on the graph sampled has edges is the same as regardless of .
Let be an event. If in the model, then in the model where .
By the probability lower bounding from conditional probability (trick used in theorem 1.5.15), we have
Let . To lower bound the probability of graph sampled in with edges, the probability follows
By result from corollary 1.5.5, we can lower bound components as follows:
The probability is lower bounded by , therefore the probability for the event happening in is . ∎
Using Stirling bound, then the probability for the event to happen in can be improved to .
A graph property is a property that holds for a graph, and all the isomorphisms of the graph. We say a graph property is monotone increasing if whenever the property holds for , it holds for any graph with . Monotone decreasing property is defined similarly, that whenever the property holds for , it holds for any graph with .
For a given monotone increasing graph property, let be the probability that the property holds for a graph in and be the probability that the property holds for a graph in . Let and for a constant . Then
The main theme of the proof is by relaxation from conditional probability, then apply Chernoff bound.
Let be the random variable for the number of edges of a graph that is sampled from . We relax by
The first equality follow from conditional probability, the second inequality holds from monotone increasing property has for all , and the last inequality holds from bounding valid probability by 1.
Now we bound by Chernoff bound, as is the sum of independent Bernoulli random variables with probability , then
as for , which proves the .
Similarly, let be the random variable for the number of edges of a graph that is sampled from . Then
Again by Chernoff bound,
as for , which proves the , and we complete the proof. ∎
The spirit is similar to the Poisson approximation theorem 1.5.17. In the balls bins model, we replace dependent bins with independent Poisson random variables of mean . In the random graph case, we replace dependent edges among all possible edges with each lined up with probability independently.
For a given monotone increasing graph property, let and be notions follow from lemma 1.5.36. Let , , and for a constant . Then
We prove with a similar strategy to lemma 1.5.36.
Let be the random variable for the number of edges of a graph sampled from . can be seen as the sum of independent Bernoulli random variables with probability . By conditional probability,
By Chernoff bound, the upper tail of can be bounded as follows
Similarly, again by conditional probability,
By Chernoff bound, the lower tail bound of can be bounded as follows
Therefore, we complete the proof on both sides. ∎
An undirected graph on vertices is disconnected if there exists a set of vertices such that there is no edge between this set and the rest of the graph. Otherwise, the graph is connected. Show that there exists a constant such that if then, with probability , is connected.
Let be the probability of being connected, be the probability of being connected, where . The proof strategy follows: Since connectedness is a monotone increasing graph property, we apply lemma 1.5.36 such that we bound by
where and . Suppose and are both , then we complete the proof.
We continue by analyzing model. For disconnected subset, the vertex size ranges in by symmetry. Let be the event that being disconnected. Then is union bounded by
We want to show that as . Observing that
then for a fixed , as , . Suppose for some , we have , then are monotone decreasing. We thus separate into 2 cases:
, and the upper bound approaches as .
by binomial coefficients for some , and the upper bound approaches 0 when .
Let with a sufficiently large constant, then the former bound approaches when .
The rest follow from both when is sufficiently small. Bounding by lemma 1.5.36, then when we complete the proof. ∎
Let . Then the probability that there are no isolated vertices (vertices with degree 0) in converges to as .
The main idea is utilizing the balls-and-bins model to model adding edges in the model.
We introduce edges to the graph , with and on initialization.
Repeat times, each time toss 2 balls into bins at random.
If they gets into the and bin, with , edge , and , introduce the edge.
Otherwise, take back the 2 balls from the bins.
Conditioning on having edges, the distribution of the resulting is equivalent to sampling from .
After repeating times, as , .
There are 2 mutually exclusive cases that an edge introduction trial get rejected: Either the 2 balls are tossed into the same bin, with probability ; or rejected by prior introduction, upper bounded by .
Let be independent 0-1 random variables of probability , and . Then is a random variable upwards relaxing the number of rejections in the edge introduction trials.
Since by linearity of expectation , then by Markov/Chernoff concentration inequality, we have , which completes the proof. ∎
Let be the event that has no isolated vertices after the edge introduction trial. Next corollary is immediate.
As , .
Let be the event that balls and bins model having no empty bin.
On one hand, is upper bounded by the balls and bins model without empty bins, as:
Repeated edge introduction does not matter in bin emptiness.
2 balls into the same bin means bin filled in the balls-bins model, rather than being rejected in the model.
A direct application of theorem 1.5.23 implies that as , .
On the other hand, is lower bounded by the balls and bins model with no empty bin, as
Repeated edge introduction is allowed in the balls-and-bins model.
2 balls tossed into the same bin fills 1 bin rather than 2.
A direct application of corollary 1.5.42 and theorem 1.5.23 implies that as , .
Since we have sandwiched as , therefore we conclude the proof 111 The proof is inspired by the math stackexchange link. More specifically, I was thinking of sandwiching by , but this solution suggested a way of sampling graph from the balls-and-bins model, and inspired me sandwiching by different number of balls. . ∎
Let . The probability that there is no isolated vertices in converges to as .
This is immediate after theorem 1.5.40 and lemma 1.5.38. ∎
Let be an undirected graph. Suppose that a path is a simple path in , and that is an edge in . Then
is also a simple path, which we refer to as the rotation of with the rotation edge .
On input a graph with associated “used/unused-edges” lists for each vertex, the modified Hamiltonian cycle finding algorithm follows:
Start with a random vertex as the head of the path.
Repeat the following until a Hamiltonian cycle is closed, or the “unused-edges” of the head vertex is empty.
Let the current path be with being the head.
Execute one of the following 3 cases with probabilities specified as follows.
With probability , reverse the path and make the new head.
With probability , sample , rotate with edge , and let be new head (if the edge is , take no action).
Otherwise, sample . If is not on the path, make the new head by ; or , then rotate by and make the new head (if the edge is , take no action).
Update “unused-edges” and “used-edges” list accordingly.
We construct a special random graph model similar to . Assuming each of the possible edges connected to a vertex is initially on the “unused-edges” list for vertex independently with probability . We also assume the order of these edges are in random order.
One way of looking at it is, before beginning the Hamiltonian cycle finding algorithm, we create the “unused-edges” list for each vertex by inserting each possible edge with probability . The corresponding graph is the graph including all edges that were inserted into some “unused-edges” list. But notice that an edge could initially be on the “unused-edges” list for but not for . The independence among each “unused-edges” list is helpful for analysis onwards.
The following lemma says, regardless of the viewed vertices, the next vertex to view is still uniformly random, if the “unused-edges” list is not empty in the head vertex.
Suppose the modified Hamiltonian cycle algorithm runs on the random graph model as described. Let be the head vertex after the time step. Suppose for any vertex , as long as the time step the unused edges list is not empty for the head vertex,
The first 2 cases are both with probability to make new head of path.
For the last case, there are at most options for ’s unused edges, at the time step. To make the new head, has to be in the previously sampled , and the probability follows
(or actually we can prove by symmetry, that for any possible option, the probability is the same, and it splits up the whole sample space.) Thus we complete the proof. ∎
Now the problem looks exactly like the coupon collector’s problem, that the probability of finding a new vertex to add to the path, when there are vertices are left to be added, is .
Suppose the input to the modified Hamiltonian cycle algorithm initially has the probability of adding edges to the unused edges list . Then the algorithm managed to find a Hamiltonian cycle in time steps with probability .
We start by upper bounding the event that the algorithm failed to find such cycle, splitting by:
The algorithm ran for steps with no empty unused edges list, and failed to close a Hamiltonian cycle.
The algorithm drained some unused edges list in the first steps, and failed to close a Hamiltonian cycle.
Let the first event be . We relax the second event by lifting the constraint of “failed to close a Hamiltonian cycle”, and we let the relaxed event be . We thus have .
We start with bounding first. Failing to close a Hamiltonian cycle can be considered as either failing to traverse all vertices, or failing to close by traversing back to starting vertex. We model the vertices traversal conditioned on no unused edges list empty by balls-and-bins model in coupon collector’s problem, and let be the event that all coupons are collected before time steps. By conditional probability, we have
where the first term means not closing the Hamiltonian cycle in at least steps after traversing all vertices, and the second term means the coupon collector’s problem does not stop before steps.
The first term is upper bounded by
The second term is upper bounded by union bounding over all vertices not being picked after trials
Therefore, .
Now we bound . In this case, either all vertices have at least unused edges initially, but some gets hit hard; or some vertices have too few unused edges on initialization. Let be the event that some vertices have too few unused edges. By conditional probability
The first term can be upper bounded by some vertex being visited too often. An unused edges list can be emptied after at least visits. Let be the number of visits, which is upper bounded by a sum of independent Bernoulli trials of probability . By Chernoff bound,
By union bounding over all vertices, the .
The second term can be bounded similarly. Let be the initial number of unused edges. Then
for a sufficiently large . By Chernoff bound for , then union bounding over vertices, .
Therefore, , and we complete the proof. ∎
The operation of rotating in definition 1.5.44 is derived from [Pós76], which is often referred to as the Pósa’s rotation-extension technique.