40.07.03 · combinatorics / probabilistic-method

The Second-Moment Method and Thresholds for Random Graphs

shipped3 tiersLean: none

Anchor (Master): Alon-Spencer 2016 *The Probabilistic Method* 4e (Wiley) Ch. 4, 8, 10 (second moment, Janson, concentration); Erdős-Rényi 1960 *Publ. Math. Inst. Hungar. Acad. Sci.* 5 (the evolution of random graphs, the giant component, connectivity); Bollobás-Thomason 1987 *Combinatorica* 7 (every monotone property has a threshold); Bollobás 1988 *Combinatorica* 8 (chromatic number of $G(n,1/2)$); Glebskii-Kogan-Liogon'kii-Talanov 1969 and Fagin 1976 *J. Symbolic Logic* 41 (the first-order zero-one law)

Intuition Beginner

The first-moment method answers one question: does a thing ever happen? If the average count of some structure is below one, the structure can be missing. But knowing the average is small tells you nothing about whether the structure usually appears, or how reliably. A lottery with an average of one winner per draw might mean exactly one winner every time, or a thousand winners once a century and none in between. The average alone cannot tell these apart.

The second-moment method adds a second number, the spread, and that is enough to settle the matter. If the count has a small average and also a small spread relative to that average, then the count sits tightly near its mean almost every time. So if the mean grows large, the count is large with near-certainty; and a separate use of spread shows that when the mean stays bounded away from zero, the count is rarely zero. Average plus spread pins down behaviour that average alone leaves open.

The payoff is the study of random networks. Build a network by joining each pair of dots with some fixed probability, and watch features switch on as you raise that probability. Below a sharp cutoff a feature is almost surely absent; above it, almost surely present. These cutoffs, called thresholds, are the heartbeat of random-graph theory, and the second moment is the tool that locates them.

Visual Beginner

Picture raising a single dial, the edge probability , from up to , and watching a random network on many dots respond. At first it is a scatter of isolated dots. As the dial turns, small pieces link up; past one mark a single giant clump swallows most dots; past a later mark the last lonely dot finally joins and the whole network becomes one connected piece.

dial position what the random network looks like
below tiny scattered pieces, all small
around a giant clump suddenly forms
below a few lonely dots remain
above every dot joined: one connected network

The table reads left to right as a story of sudden change. Each feature does not fade in gradually; it snaps on across a narrow band of the dial. Locating those bands is the whole subject, and the average-plus-spread method is how you find them.

Worked example Beginner

Take a random network on dots where each of the possible pairs is joined with probability . We ask: for which does a triangle (three dots all joined to each other) typically appear?

Step 1. Count the candidate triangles. A triangle is a choice of three dots, and the number of such choices is . Each candidate may or may not have all three of its edges present.

Step 2. Find the chance one fixed candidate is a real triangle. It needs all three of its edges, each present with chance , so the chance is .

Step 3. Average the number of triangles. The average count is the number of candidates times the per-candidate chance: .

Step 4. See where the average crosses one. Set . Then , so is the cube root of that, about . Compare this to . The crossing sits a little above , and indeed the true threshold for triangles is exactly at the scale .

Step 5. Read off the behaviour. When is well below , the average triangle count is far below one and triangles are almost surely absent. When is well above , the average races upward and the spread stays small, so triangles are almost surely present.

What this tells us: the scale is the tipping point for triangles. Below it, none; above it, many. The average located the scale, and the spread (small here) confirms the count is reliable above the threshold.

Check your understanding Beginner

Formal definition Intermediate+

Fix the Erdős-Rényi random graph : the vertex set is , and each of the potential edges is present independently with probability , absent with probability . A graph property is a set of graphs closed under isomorphism. We say has a property asymptotically almost surely (a.a.s.) if the probability tends to as . A property is monotone increasing if adding edges preserves it. The basic probability apparatus — variance, Chebyshev's inequality, indicators — is imported from the probability units and applied here, not reproved.

For a random variable on a probability space, the variance is , and the standard deviation is .

Chebyshev's inequality. For any , $$ \Pr\big(|X - \mathbb{E}[X]| \ge \lambda\big) ;\le; \frac{\mathrm{Var}[X]}{\lambda^2}. $$

The second-moment bound. Let be integer-valued with . Taking in Chebyshev's inequality bounds the probability that : $$ \Pr(X = 0) ;\le; \Pr\big(|X - \mathbb{E}[X]| \ge \mathbb{E}[X]\big) ;\le; \frac{\mathrm{Var}[X]}{\mathbb{E}[X]^2}. $$ Consequently, if a family satisfies , then — so a.a.s. — and moreover in probability, meaning a.a.s. This is the second-moment method: where the first moment (40.07.01) shows is possible when is small, the second moment shows is improbable when is large and concentrated.

Threshold function. For a monotone increasing property , a function is a threshold if has a.a.s. when and lacks a.a.s. when . Thresholds are defined up to constant or slower factors.

For a fixed graph with vertices and edges, the maximum edge density is $$ m(H) ;=; \max_{\substack{H' \subseteq H \ v(H') > 0}} \frac{e(H')}{v(H')}, $$ the maximum taken over all subgraphs with at least one vertex. is balanced if (no denser subgraph), and strictly balanced if the maximum is attained only by itself.

The notation , , , , , , (asymptotic equivalence), and is registered in _meta/NOTATION.md.

Counterexamples to common slips Intermediate+

  • " already forces a.a.s." It does not. The count can have its mass on rare enormous values with likely: a "clumped" distribution. The variance bound is precisely what rules this out.

  • "The threshold for is ." That is the first-moment scale only for balanced . For unbalanced the densest subgraph appears first, so the true threshold is , governed by , not the overall ratio .

  • "Connectivity and the giant component have the same threshold." They differ by a logarithmic factor: the giant component emerges at , but full connectivity waits until , when the last isolated vertex disappears.

  • "A small variance means the count is exactly its mean." It means the count is near its mean with high probability. The conclusions are distributional ("a.a.s."), not deterministic.

Key theorem with proof Intermediate+

The signature application is the threshold for the appearance of a fixed subgraph, where the first and second moments together pin down the exact scale [Alon-Spencer Ch. 4]. We treat the cleanest case, a balanced graph , where the first moment gives the lower bound (below threshold, is absent) and the second moment gives the upper bound (above threshold, appears).

Theorem (subgraph appearance threshold; Erdős-Rényi 1960, Bollobás). Let be a balanced graph with vertices and edges, so . Then $p^(n) = n^{-1/m(H)} = n^{-v/e}G(n,p)Hp = o(n^{-v/e})G(n,p)Hn^{-v/e} = o(p)G(n,p)H$.*

Proof. Let count copies of in . Index potential copies by injections of into up to the automorphisms of ; the number of potential copies is , since it is with a constant. Each fixed copy is present when its edges are all present, probability . By linearity of expectation, $$ \mathbb{E}[X] = \Theta(n^v) \cdot p^e = \Theta\big(n^v p^e\big). $$

Lower (first moment). If then , so . Since is a non-negative integer, , so a.a.s. .

Upper (second moment). Suppose , so . We show . Write over potential copies . Then $$ \mathrm{Var}[X] = \sum_{\alpha, \beta} \big(\Pr(\alpha \wedge \beta) - \Pr(\alpha)\Pr(\beta)\big). $$ Pairs sharing no edge contribute (independence). Group the rest by the subgraph on the shared vertices, which has some vertices and edges. The number of such pairs is , and the joint probability is (the distinct edges). So $$ \mathrm{Var}[X] \le \sum_{J} \Theta\big(n^{2v - j} p^{2e - f}\big) = \mathbb{E}[X]^2 \sum_J \Theta\big(n^{-j} p^{-f}\big), $$ using . For each shared piece with vertices and edges, balancedness gives , i.e. where . Since gives , each term is . The number of shapes is bounded by a constant. Hence , and the second-moment bound gives : a.a.s. a copy of exists.

Bridge. This proof builds toward the whole theory of random-graph evolution: the same two-sided template — first moment kills the count below threshold, second moment forces concentration above it — appears again in the connectivity and clique-number arguments below, and the foundational reason it works is that variance decomposes over pairs of copies, with only edge-sharing pairs contributing covariance. The role of is exactly this: balancedness is the condition that makes every shared-piece term vanish, so is the densest sub-piece that could appear first, which is why the threshold is rather than the naive — for unbalanced these differ, and the bridge is that the densest subgraph dictates the timing. This is dual to the first-moment picture of 40.07.01: there a small mean permits absence, here a large concentrated mean forces presence, and putting these together gives a sharp threshold where the two verdicts meet. The central insight is that the second moment converts the first moment's "possible" into "typical", and the appearance threshold for subgraphs generalises to thresholds for every monotone property by Bollobás-Thomason.

Exercises Intermediate+

Advanced results Master

The second moment locates individual thresholds; assembling them produces the Erdős-Rényi picture of a random graph evolving as increases, together with the structural theorems that organise it.

Theorem 1 (existence of thresholds; Bollobás-Thomason 1987). Every nontrivial monotone increasing graph property has a threshold function : has a.a.s. when and lacks it a.a.s. when [Bollobás-Thomason 1987]. The proof needs no second-moment computation — it is a soft monotonicity-and-coupling argument: the probability is non-decreasing in , and a union of independent copies of stochastically dominates , so the band where rises from to has width bounded by a constant factor. Thresholds always exist; the work is computing where they sit, and the second moment is the standard instrument for that.

Theorem 2 (subgraph threshold, general ). For an arbitrary fixed graph with at least one edge, with is the threshold for containing [Alon-Spencer Ch. 4]. The first moment for the densest subgraph achieving gives the lower bound (if then even is absent, so is); the second moment applied to gives its appearance, after which sparser attachments follow. For unbalanced , the overall ratio would predict a later threshold, but the dense core appears first and dictates the timing — the reason the threshold is governed by , not .

Theorem 3 (connectivity and isolated vertices; Erdős-Rényi 1960). At , the number of isolated vertices converges in distribution to Poisson with mean , and is connected if and only if it has no isolated vertices a.a.s.; hence [Erdős-Rényi 1960]. The coupon-collector heuristic explains the scale: each vertex needs at least one of its potential edges, an event of probability , and demanding all vertices succeed is a coupon-collector problem whose threshold sits at . Connectivity is thus the disappearance of the last isolated vertex, the dominant obstruction once the giant component has formed.

Theorem 4 (the giant component; Erdős-Rényi 1960). Write . For all components of have size a.a.s.; at the largest component has size ; for there is a unique giant component of size where is the survival probability of a Poisson branching process (the least root of ), all other components being [Erdős-Rényi 1960]. The critical window is : inside it the largest components have size and a rich limiting structure (Aldous 1997). This phase transition — the "double jump" — is the most studied feature of the model and the prototype for percolation transitions.

Theorem 5 (clique and chromatic number of ; Bollobás 1988). The clique number is concentrated on two consecutive values around : there is an integer with a.a.s. [Bollobás 1988]. The second moment proves (the expected number of -cliques tends to infinity with small variance), and the first moment proves . The chromatic number satisfies a.a.s., proved by an Azuma martingale concentration on the chromatic number together with the clique/independence bound — a result detailed in the co-produced concentration unit 40.07.05.

Theorem 6 (zero-one law; Glebskii et al. 1969, Fagin 1976). For every property expressible in the first-order language of graphs (quantifiers over vertices, the adjacency relation, equality), or as [Fagin 1976]. The mechanism is the extension axioms : "for every vertices and vertices there is a further vertex adjacent to the first and not the last ", each of which holds a.a.s. in by a second-moment / direct calculation. Any first-order sentence is decided by finitely many extension axioms via an Ehrenfeucht-Fraïssé back-and-forth, so its limiting probability is or . The law fails for at threshold scales (where subgraph-appearance sentences have intermediate limiting probability) and for monadic second-order logic.

Synthesis. Putting these together, the second-moment method is the foundational reason the random graph has a sharp evolutionary picture rather than a blurry one: the first moment of 40.07.01 marks where each feature could appear, and the variance bound converts that into the statement that it does appear, abruptly, at a threshold. This is exactly the duality that organises the chapter — first moment forbids below, second moment compels above, and the two verdicts meet at — and it generalises from one feature to all of them: subgraph appearance at , connectivity at , the giant component at , the clique number at , each a threshold located by the same mean-and-variance pincer. Bollobás-Thomason shows the existence of thresholds is automatic for monotone properties, so the real content is always the location, and the central insight is that location is a second-moment computation. The zero-one law is the logical shadow of this: at every first-order feature has limiting probability or , the extension axioms holding a.a.s. by the same variance control. The bridge onward is that when copies of share many edges the plain second moment is too weak and one needs Janson's inequality (the co-produced 40.07.07) for sharp upper tail bounds, and when one wants concentration of a Lipschitz graph parameter rather than a count one needs the martingale machinery of the co-produced 40.07.05 — both are the next refinements of the variance idea introduced here.

Full proof set Master

Proposition 1 (second-moment bound from Chebyshev). Let be integer-valued with . Then . Consequently if a sequence has then a.a.s. and in probability.

Proof. The event implies , hence . Chebyshev's inequality with gives . If this tends to , so a.a.s. For the second clause, fix and apply Chebyshev with : , so in probability.

Proposition 2 (subgraph threshold, balanced case). Let be balanced with vertices, edges. Then has , and if then , so a.a.s.

Proof. The number of potential copies is with times the labelling constant, each present with probability , so by linearity. Writing , the covariance of two copies vanishes unless they share at least one edge. Group sharing pairs by the isomorphism type of the overlap (a subgraph of ) with vertices and edges. The number of such ordered pairs is and , so their contribution to is . Dividing by gives . Balancedness means for every subgraph , i.e. ; with one has , since . Summing over the constant number of overlap types, , and Proposition 1 yields a.a.s.

Proposition 3 (first-moment lower bound for subgraphs). If for the densest subgraph ratio, then a.a.s. contains no copy of .

Proof. Let attain , with vertices and edges. Any copy of contains a copy of , so it suffices that has no copy of a.a.s. Let count copies of ; . If then , so and . Hence a.a.s. no copy of , so a.a.s. no copy of .

Proposition 4 (Poisson limit for isolated vertices). At , the number of isolated vertices in converges in distribution to Poisson.

Proof. The factorial moments converge to those of Poisson with . The -th factorial moment is . For fixed vertices to be isolated, all edges incident to them — there are of them — must be absent, probability . Thus , since the correction for fixed . As , , the -th factorial moment of Poisson. By the method of moments (factorial moments determine the Poisson limit), .

Proposition 5 (clique number lower bound for ). Let satisfy where counts -cliques in , . If additionally , then a.a.s.

Proof. By the second-moment bound (Proposition 1), gives , so a -clique exists a.a.s., i.e. . The variance hypothesis holds for : two -sets sharing vertices have joint-clique probability , and the sum over is relative to when , because the dominant overlap contributes . Hence a.a.s.; combined with the first-moment upper bound at , the clique number concentrates at .

Connections Master

  • The first-moment method of 40.07.01 supplies the lower half of every threshold proved here: below threshold a count with mean tending to zero is absent a.a.s. by Markov, exactly the half that the second moment cannot give. This unit is the dual completion — the second moment compels presence above threshold where the first moment only permits absence below it — so the two methods together pin each random-graph feature to a sharp , and the appearance-of- argument runs the first moment on the densest subgraph and the second moment on the whole.

  • The Borel-Cantelli lemmas and Kolmogorov zero-one law of 37.02.01 are the infinitary analogue of the finite zero-one law stated here: Borel-Cantelli converts summability of probabilities into almost-sure absence (a first-moment statement along a sequence), and the second-moment / second Borel-Cantelli direction gives almost-sure recurrence, the same mean-and-variance pincer transposed from "a.a.s. as " to "almost surely along an infinite sequence of trials". The extension-axiom mechanism behind Fagin's law is the combinatorial counterpart of Kolmogorov's tail triviality.

  • The concentration of the chromatic number and the two-point concentration of the clique number, sketched in Theorem 5, are carried out in full in the co-produced 40.07.05 via Azuma-Hoeffding martingale inequalities: the second moment here proves the clique number is at least , while the martingale method proves the chromatic number is concentrated in an interval of width — the variance idea pushed from counts to Lipschitz graph functionals. The sharp upper-tail bound that the plain second moment misses, when copies of share many edges, is supplied by Janson's inequality in the co-produced 40.07.07, the natural successor to this unit for fine threshold and large-deviation questions.

Historical & philosophical context Master

The systematic theory of random graphs is the creation of Paul Erdős and Alfréd Rényi, whose 1960 memoir On the evolution of random graphs [Erdős-Rényi 1960] introduced the model (and the closely related ), proved the threshold for the appearance of each fixed subgraph, identified the connectivity threshold through the disappearance of isolated vertices with its Poisson limit, and discovered the abrupt birth of a giant component at — the "double jump" from logarithmic to to linear largest-component size. The second-moment method as the standard instrument for the upper half of a threshold was already implicit in their estimates and was codified, with Chebyshev's inequality at its core, in the subsequent literature; Erdős had used the first moment in his 1947 Ramsey note, and the second moment is its natural completion.

The structural theorems came later. Béla Bollobás and Andrew Thomason proved in 1987 that every monotone property has a threshold [Bollobás-Thomason 1987], detaching the existence of thresholds from their computation. Bollobás determined the asymptotic chromatic number of in 1988 [Bollobás 1988] using martingale concentration, and the two-point concentration of the clique number was established by Bollobás and Erdős and by Matula in the 1970s. The first-order zero-one law was proved independently by Glebskii, Kogan, Liogon'kii, and Talanov in 1969 and by Ronald Fagin in 1976 [Fagin 1976], via the extension axioms and a back-and-forth argument; it is a foundational result in finite model theory, linking logic, probability, and combinatorics.

Bibliography Master

@article{erdosrenyi1960,
  author  = {Erd{\H{o}}s, Paul and R{\'e}nyi, Alfr{\'e}d},
  title   = {On the evolution of random graphs},
  journal = {Publications of the Mathematical Institute of the Hungarian Academy of Sciences},
  volume  = {5},
  pages   = {17--61},
  year    = {1960}
}

@article{bollobasthomason1987,
  author  = {Bollob{\'a}s, B{\'e}la and Thomason, Andrew},
  title   = {Threshold functions},
  journal = {Combinatorica},
  volume  = {7},
  number  = {1},
  pages   = {35--38},
  year    = {1987}
}

@article{bollobas1988chromatic,
  author  = {Bollob{\'a}s, B{\'e}la},
  title   = {The chromatic number of random graphs},
  journal = {Combinatorica},
  volume  = {8},
  number  = {1},
  pages   = {49--55},
  year    = {1988}
}

@article{fagin1976,
  author  = {Fagin, Ronald},
  title   = {Probabilities on finite models},
  journal = {Journal of Symbolic Logic},
  volume  = {41},
  number  = {1},
  pages   = {50--58},
  year    = {1976}
}

@article{glebskii1969,
  author  = {Glebskii, Y. V. and Kogan, D. I. and Liogon'kii, M. I. and Talanov, V. A.},
  title   = {Range and degree of realizability of formulas in the restricted predicate calculus},
  journal = {Cybernetics},
  volume  = {5},
  pages   = {142--154},
  year    = {1969}
}

@article{aldous1997critical,
  author  = {Aldous, David},
  title   = {Brownian excursions, critical random graphs and the multiplicative coalescent},
  journal = {Annals of Probability},
  volume  = {25},
  number  = {2},
  pages   = {812--854},
  year    = {1997}
}

@book{bollobas2001random,
  author    = {Bollob{\'a}s, B{\'e}la},
  title     = {Random Graphs},
  edition   = {2},
  publisher = {Cambridge University Press},
  year      = {2001}
}

@book{friezekaronski2016,
  author    = {Frieze, Alan and Karo{\'n}ski, Micha{\l}},
  title     = {Introduction to Random Graphs},
  publisher = {Cambridge University Press},
  year      = {2016}
}

@book{alonspencer2016,
  author    = {Alon, Noga and Spencer, Joel H.},
  title     = {The Probabilistic Method},
  edition   = {4},
  publisher = {Wiley},
  year      = {2016}
}