On this page
Picture 1,000 students where any two are friends with the same small chance, independently of everyone else. That is the Erdős–Rényi random graph, and it tells you when one big cluster appears and when everyone is linked.
What is the Erdős–Rényi random graph G(n, p)?
In G(n, p) you take n labelled vertices and include each possible edge independently with probability p, as the Erdős–Rényi model reference page defines it. Edgar Gilbert introduced G(n, p) in 1959; Paul Erdős and Alfréd Rényi independently introduced the fixed-edge version G(n, M) the same year.
How many edges and what degree should you expect?
There are n(n−1)/2 possible edges, each present with probability p, so the expected number of edges in G(n, p) is n(n−1)p/2 (Erdős–Rényi model properties).
Each vertex's degree is binomial with n − 1 trials and probability p, so its mean is (n − 1)p (same source). For large n with np fixed, it becomes Poisson with mean np, the distribution that counts random arrivals in a Poisson process.
For the school with n = 1,000 and p = 0.002, you expect 499,500 × 0.002 = 999 friendships and about 2 friends per student.
When does the giant component appear?
Erdős and Rényi's 1960 paper on the evolution of random graphs gave results that the Erdős–Rényi model page restates for G(n, p). "Almost surely" means with probability tending to 1 as n grows.
If np < 1, almost surely no component has more than O(log n) vertices.
If np = 1, the largest component almost surely has on the order of n^(2/3) vertices.
If np tends to a constant c > 1, there is almost surely a unique giant component holding a positive fraction of the vertices, and no other component has more than O(log n) vertices.
The fraction S of vertices in the giant component solves S = 1 − e^(−cS), where c = np is the average degree (same source). At c = 2 the solution is S ≈ 0.80, so roughly 800 of the school's 1,000 students share one connected cluster.
Why 1? From one student, each person you reach brings about c new people, so the search dies out if c < 1 and can keep growing if c > 1. That is the survival question of a Galton–Watson branching process and its extinction probability; S is one minus the extinction probability.
What is the threshold for connectivity in a random graph?
A giant component is not the same as a connected graph. If p > (1 + ε) ln n/n the graph is almost surely connected, and if p < (1 − ε) ln n/n it almost surely has isolated vertices, so ln n/n is a sharp threshold for connectivity (Erdős–Rényi model page).
Why ln n? The expected number of isolated vertices is n(1 − p)^(n−1) ≈ n e^(−np), which falls below 1 once np > ln n.
For n = 1,000, ln n ≈ 6.9, so p must pass about 0.0069: an average of about 7 friends each, against 1 for the giant component. For a non-random measure of connectedness, see Menger's theorem and graph connectivity.
A worked example: G(4, 1/2)
Take vertices A, B, C, D and p = 1/2. The 6 possible edges give 2^6 = 64 equally likely graphs.
Expected edges: 6 × 1/2 = 3.
Expected degree of A: 3 × 1/2 = 1.5.
Chance A is isolated: (1/2)^3 = 1/8; expected isolated vertices: 4 × 1/8 = 1/2.
Count disconnected graphs by the size of A's component. Size 1: the other three form any of 2^3 = 8 graphs. Size 2: choose A's partner (3 ways), and the other pair is joined or not (2), giving 6. Size 3: choose A's two partners (3 ways) and make the three connected (3 paths or the triangle, 4 ways), giving 12.
That is 8 + 6 + 12 = 26 disconnected graphs, so 38 are connected and P(connected) = 38/64 ≈ 0.59.
Here p = 1/2 is above ln 4/4 ≈ 0.35, yet 26 of the 64 graphs are disconnected. Thresholds describe large n; for small graphs, count.
If step 4 loses you, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Why do real social networks differ from random graphs?
The Erdős–Rényi model page notes that the two assumptions of G(n, p), independent and equally likely edges, may be inappropriate for real systems.
Clustering. Erdős–Rényi graphs have low clustering, unlike many social networks (same source).
Hubs. Barabási and Albert reported that degrees in many large networks follow a scale-free power law, which they explained by growth plus new vertices attaching preferentially to well-connected ones (Science, 1999). A Poisson degree distribution makes such hubs very unlikely.
Use G(n, p) as a baseline: where a real network differs from it, something is not random.
To revise the binomial and Poisson distributions, the Fermi Concept Library gives each concept in mathematics its own lesson and its place in the map.



