Skip to content

Cahid Arda Öz

Istanbul, Turkey

← The Logic of Crowds
Blog Essays, opinions, and how-tos. / 2 min read

Who Points to You

PageRank as a random surfer: importance is being linked to by important pages.


A recommendation from someone you trust counts for more than ten from strangers. PageRank, the idea behind Google’s early ranking, applies the same rule to the web: a page is important if important pages link to it.

A surfer who never stops

That definition is circular, so picture a surfer instead. They start on some page and click a random link, again and again. Every so often they get bored and jump to a page chosen at random. Count where they spend their time.

GT-06.1the random surfers = 0.85
ABCDEFGH
bar: share of visitstick: PageRank
A
27.6%
B
31.9%
C
15.4%
D
8.4%
E
5.5%
F
4.2%
G
3.7%
H
3.4%
clicks
0
off from PageRank
·%

A surfer starts on A and clicks a random link on each page.

pick a speed or drag s; restart clears the countsEasley & Kleinberg, sec. 14.3

The visit counts settle on fixed numbers, and those numbers are the PageRank. A has six in-links, the most of any page. B has two, yet B ends up on top: A links only to B, so whenever the surfer leaves A by a link, they land on B. (Drag the link chance ss below about 0.7 and the random jumps dilute that one strong link enough for A to win back.)

Rank flows like water

The same numbers come out of a simple update rule, the one chapter 14 of Easley and Kleinberg’s Networks, Crowds, and Markets builds up. Give each of the nn pages 1/n1/n of the rank. At every step, each page splits its rank equally among the pages it links to.

GT-06.2rank flows like waterstep 0
A0.20B0.20C0.20D0.20E0.20
rank held by D and E
40%
total rank stays 1.00: it only moves

Every page starts with an equal share of rank: 1/5 each.

switch the web or the rule: the rank flows on from where it isEasley & Kleinberg, sec. 14.3

The basic rule has a weak spot. A group of pages that link only to each other is a spider trap: rank flows in and never comes back out, until the trap holds all of it. The fix is the surfer’s boredom. Each page passes on only a fraction ss of its rank, and the rest is shared equally by every page:

ri  ←  1−sn  +  s∑j→irjout(j)r_i \;\leftarrow\; \frac{1-s}{n} \;+\; s \sum_{j \to i} \frac{r_j}{\text{out}(j)} Page i gets an equal share (1-s)/n of the leftover rank, plus a fraction s of the rank of every page j that links to it, divided by the number of links on j.

This is the scaled update rule from section 14.3 of the book, and it gives the same answer as the surfer who follows a link with probability ss and jumps to a random page otherwise. Repeat the update and the ranks converge, whatever they started at.