# 随机算法 (Spring 2013)/Threshold and Concentration

## Contents

# Erdős–Rényi Random Graphs

Consider a graph which is randomly generated as:

- ;
- , independently with probability .

Such graph is denoted as **. This is called the ****Erdős–Rényi model** or ** model** for random graphs.

Informally, the presence of every edge of is determined by an independent coin flipping (with probability of HEADs ).

## Monotone properties

A graph property is a predicate of graph which depends only on the structure of the graph.

**Definition**- Let , where , be the set of all possible graphs on vertices. A
**graph property**is a boolean function which is invariant under permutation of vertices, i.e. whenever is isomorphic to .

- Let , where , be the set of all possible graphs on vertices. A

We are interested in the monotone properties, i.e., those properties that adding edges will not change a graph from having the property to not having the property.

**Definition**- A graph property is
**monotone**if for any , both on vertices, having property implies having property .

- A graph property is

By seeing the property as a function mapping a set of edges to a numerical value in , a monotone property is just a monotonically increasing set function.

Some examples of monotone graph properties:

- Hamiltonian;
- -clique;
- contains a subgraph isomorphic to some ;
- non-planar;
- chromatic number (i.e., not -colorable);
- girth .

From the last two properties, you can see another reason that the Erdős theorem is unintuitive.

Some examples of **non-**monotone graph properties:

- Eulerian;
- contains an
*induced*subgraph isomorphic to some ;

For all monotone graph properties, we have the following theorem.

**Theorem**- Let be a monotone graph property. Suppose , , and . Then
- .

- Let be a monotone graph property. Suppose , , and . Then

Although the statement in the theorem looks very natural, it is difficult to evaluate the probability that a random graph has some property. However, the theorem can be very easily proved by using the idea of coupling, a proof technique in probability theory which compare two unrelated random variables by forcing them to be related.

**Proof.**For any , let be independently and uniformly distributed over the continuous interval . Let if and only if and let if and only if .

It is obvious that and . For any , means that , which implies that . Thus, .

Since is monotone, implies . Thus,

- .

## Threshold phenomenon

One of the most fascinating phenomenon of random graphs is that for so many natural graph properties, the random graph suddenly changes from almost always not having the property to almost always having the property as grows in a very small range.

A monotone graph property is said to have the **threshold** if

- when , as (also called almost always does not have ); and
- when , as (also called almost always has ).

The classic method for proving the threshold is the so-called second moment method (Chebyshev's inequality).

### Threshold for 4-clique

**Theorem**- The threshold for a random graph to contain a 4-clique is .

We formulate the problem as such. For any -subset of vertices , let be the indicator random variable such that

Let be the total number of 4-cliques in .

It is sufficient to prove the following lemma.

**Lemma**- If , then as .
- If , then as .

**Proof.**The first claim is proved by the first moment (expectation and Markov's inequality) and the second claim is proved by the second moment method (Chebyshev's inequality).

Every 4-clique has 6 edges, thus for any ,

- .

By the linearity of expectation,

- .

Applying Markov's inequality

- , if .

The first claim is proved.

To prove the second claim, it is equivalent to show that if . By the Chebyshev's inequality,

- ,

where the variance is computed as

- .

For any ,

- . Thus the first term of above formula is .

We now compute the covariances. For any that :

- Case.1: , so and do not share any edges. and are independent, thus .
- Case.2: , so and share an edge. Since , there are pairs of such and .

- since there are 11 edges in the union of two 4-cliques that share a common edge. The contribution of these pairs is .

- Case.2: , so and share a triangle. Since , there are pairs of such and . By the same argument,

- since there are 9 edges in the union of two 4-cliques that share a triangle. The contribution of these pairs is .

Putting all these together,

And

- ,

which is if . The second claim is also proved.

### Threshold for balanced subgraphs

The above theorem can be generalized to any "balanced" subgraphs.

**Definition**- The
**density**of a graph , denoted , is defined as . - A graph is
**balanced**if for all subgraphs of .

- The

Cliques are balanced, because for any . The threshold for 4-clique is a direct corollary of the following general theorem.

**Theorem (Erdős–Rényi 1960)**- Let be a balanced graph with vertices and edges. The threshold for the property that a random graph contains a (not necessarily induced) subgraph isomorphic to is .

**Sketch of proof.**For any , let indicate whether (the subgraph of induced by ) contain a subgraph . Then

- , since there are at most ways to match the substructure.

Note that does not depend on . Thus, . Let be the number of -subgraphs.

- .

By Markov's inequality, which is when .

By Chebyshev's inequality, where

- .

The first term .

For the covariances, only if for . Note that implies that . And for balanced , the number of edges of interest in and is . Thus, . And,

Therefore, when ,

- .

# The Chernoff Bound

Suppose that we have a fair coin. If we toss it once, then the outcome is completely unpredictable. But if we toss it, say for 1000 times, then the number of HEADs is very likely to be around 500. This striking phenomenon, illustrated in the right figure, is called the **concentration**. The Chernoff bound captures the concentration of independent trials.

The Chernoff bound is also a tail bound for the sum of independent random variables which may give us *exponentially* sharp bounds.

Before proving the Chernoff bound, we should talk about the moment generating functions.

## Moment generating functions

The more we know about the moments of a random variable , the more information we would have about . There is a so-called **moment generating function**, which "packs" all the information about the moments of into one function.

**Definition**- The moment generating function of a random variable is defined as where is the parameter of the function.

By Taylor's expansion and the linearity of expectations,

The moment generating function is a function of .

## The Chernoff bound

The Chernoff bounds are exponentially sharp tail inequalities for the sum of independent trials. The bounds are obtained by applying Markov's inequality to the moment generating function of the sum of independent trials, with some appropriate choice of the parameter .

**Chernoff bound (the upper tail)**- Let , where are independent Poisson trials. Let .
- Then for any ,

**Proof.**For any , is equivalent to that , thus where the last step follows by Markov's inequality.

Computing the moment generating function :

Let for . Then,

- .

We bound the moment generating function for each individual as follows.

where in the last step we apply the Taylor's expansion so that where . (By doing this, we can transform the product to the sum of , which is .)

Therefore,

Thus, we have shown that for any ,

- .

For any , we can let to get

The idea of the proof is actually quite clear: we apply Markov's inequality to and for the rest, we just estimate the moment generating function . To make the bound as tight as possible, we minimized the by setting , which can be justified by taking derivatives of .

We then proceed to the lower tail, the probability that the random variable deviates below the mean value:

**Chernoff bound (the lower tail)**- Let , where are independent Poisson trials. Let .
- Then for any ,

**Proof.**For any , by the same analysis as in the upper tail version, For any , we can let to get

Some useful special forms of the bounds can be derived directly from the above general forms of the bounds. We now know better why we say that the bounds are exponentially sharp.

**Useful forms of the Chernoff bound**- Let , where are independent Poisson trials. Let . Then
- 1. for ,
- 2. for ,

**Proof.**To obtain the bounds in (1), we need to show that for , and . We can verify both inequalities by standard analysis techniques. To obtain the bound in (2), let . Then . Hence,

# Balls into bins, revisited

Throwing balls uniformly and independently to bins, what is the maximum load of all bins with high probability? In the last class, we gave an analysis of this problem by using a counting argument.

Now we give a more "advanced" analysis by using Chernoff bounds.

For any and , let be the indicator variable for the event that ball is thrown to bin . Obviously

Let be the load of bin .

Then the expected load of bin is

For the case , it holds that

Note that is a sum of mutually independent indicator variable. Applying Chernoff bound, for any particular bin ,

## When

When , . Write . The above bound can be written as

Let , we evaluate by taking logarithm to its reciprocal.

Thus,

Applying the union bound, the probability that there exists a bin with load is

- .

Therefore, for , with high probability, the maximum load is .

## For larger

When , then according to ,

We can apply an easier form of the Chernoff bounds,

By the union bound, the probability that there exists a bin with load is,

- .

Therefore, for , with high probability, the maximum load is .