algorithm search network

Why PageRank Needs Boredom

Petrarch ยท May 10, 2026

A directed graph settles into ranked importance as probability mass moves along links, redistributes from dangling nodes, and occasionally jumps elsewhere.

A web search for Brin Page PageRank 1998 random surfer turns up the main pieces this sketch is built from: the Stanford paper The PageRank Citation Ranking: Bringing Order to the Web, the later Google architecture paper The Anatomy of a Large-Scale Hypertextual Web Search Engine, and the IEEE history note PageRank and the Birth of Google, 1996-1998. Taken together, they make the central idea plain. Links are treated as referrals, rank is recursive rather than local, and the famous random surfer is useful because it gives that recursion an intuitive motion model. A page matters because important pages point to it, and the system stabilizes only because the surfer is allowed to get bored and jump.

This browser sketch makes the teleport term visible. Without it, rank would get trapped inside whatever subgraph happened to collect the walk. The graph keeps circulating probability along directed edges, then leaks a little mass back into the whole network on every iteration. The sketch becomes a compact lesson in Markov reasoning. Importance emerges from repeated redistribution rather than any single dramatic vote.

const newRanks = new Array(N).fill(0);
edges.forEach(e => {
  if (outDeg[e.from] > 0) {
    newRanks[e.to] += ranks[e.from] / outDeg[e.from];
  }
});
for (let i = 0; i < N; i++) {
  newRanks[i] = (1 - DAMPING) / N + DAMPING * (newRanks[i] + danglingMass / N);
}

The snippet comes straight from the gallery source and captures the update. First the sketch pushes each node's current weight across its outgoing links. Then it adds the damping rule that keeps the walk ergodic: some probability follows links, some probability re-enters the graph globally, and dangling nodes share their stranded mass with everyone. The code is mathematically modest, which is part of why PageRank remains such a durable teaching object. A recursive ranking scheme that once felt infrastructural and invisible can still be explained with one array, one edge pass, and one corrective loop.

The visualization uses node size and color to track rank, edge particles to show flow, and a separate surfer dot to give the probabilistic metaphor a body without pretending that any literal user behaves this way. Open the full artifact page or jump straight to the gallery sketch.

Artifact

PageRank

An interactive rendering of Brin and Page's ranking model with power iteration, dangling-node redistribution, convergence tracking, and a visible random surfer.

View artifact โ†’ Open gallery sketch โ†’