OCR H446, section 1.3.4 (c)
PageRank is the algorithm that was developed by the founders of Google to rank web pages by importance. It is one of many factors in ranking (1.3.4 (b)).
The idea
The key idea is that a link from page A to page B is a vote of confidence in B. But not all votes are equal:
- A page with many incoming links is probably important.
- A link from an important page counts more than a link from an unimportant one.
- A page that links to many others shares its importance among them, so each link from it is worth less.
So a page's rank depends on how many pages link to it, and how important those pages are. The definition is circular (important pages make other pages important), so it is calculated by repeating the calculation until the values settle.
The model: the random surfer
PageRank can be pictured as a random surfer who clicks links at random. The rank of a page is the probability that the surfer is on it at any moment. Pages that many paths lead to are visited more often.
With a probability of , the surfer gets bored and jumps to a random page instead of following a link. This stops the calculation from getting stuck in a loop.
The formula
| Symbol | Meaning |
|---|---|
| The PageRank of page A | |
| The total number of pages | |
| The damping factor, usually 0.85: the chance that the surfer follows a link | |
| Each page that links to A | |
| The PageRank of page | |
| The number of links going out of page |
The term is the share of rank that every page receives from random jumps. The sum adds up the share of rank passed on by each page that links to A: each linking page passes on its rank divided equally between its outgoing links.
The damping factor in an exam answer: it's a value between 0 and 1 that models a real user, who eventually stops following links. The higher it is, the more rank passes along the links.
You may also see the original version of the formula, PR(A) = (1 - d) + d \sum_{T} rac{PR(T)}{C(T)}, without dividing by . Its ranks average 1 instead of adding up to 1, but every page keeps the same rank relative to the others (each value is just times larger).
A worked calculation
Three pages: A, B and C, with these links:
- A links to B and C (2 outgoing links).
- B links to C (1 outgoing link).
- C links to A (1 outgoing link).
With and , the constant part is .
The pages that link to each page:
- A is linked to by C.
- B is linked to by A.
- C is linked to by A and B.
So
Start: every page equal
Initially for each page.
Iteration 1 (using the starting values)
Iteration 2 (using the values from iteration 1)
| Iteration | PR(A) | PR(B) | PR(C) | Total |
|---|---|---|---|---|
| Start | 0.333 | 0.333 | 0.333 | 1.000 |
| 1 | 0.333 | 0.192 | 0.475 | 1.000 |
| 2 | 0.454 | 0.192 | 0.355 | 1.000 |
The values keep changing, and after many more iterations they settle (converge) on stable values. The total stays at 1.
Observations: B has the lowest rank, since only half of A's rank reaches it, and no other page links to it. A and C gain from the loop, because B only passes on to C, and C passes all of its rank to A.
Why it works well, and its weaknesses
Strengths
- It is based on the structure of the web, not just the words on a page, so it is hard to fool by simply repeating keywords.
- It is objective, and measures the importance of a page.
Weaknesses
- People try to manipulate it, for example with link farms (networks of pages that link to each other), or buying links.
- It favours old, well-linked pages, so new pages find it hard to gain rank.
- The calculation is repeated for billions of pages, which needs huge computing power.
- It only judges popularity, not whether the page is accurate.
Improving a page's PageRank
- Get links from high-ranking sites, since they pass on more rank.
- Get more incoming links.
- Links from pages with few outgoing links are worth more, since their rank is shared between fewer pages.
- Avoid link farms and bought links: search engines detect them, and can penalise the site.
Worked example
Task: two pages, X and Y, link to each other, and a third page Z links to X only. With , and every starting rank , calculate one iteration of .
- Pages linking to X: Y (which has 1 outgoing link, to X) and Z (1 outgoing link, to X).
- .
X gets a high rank because two pages link to it, and both pass on all of their rank.
Exam tip: the key ideas are that links are votes, that a link from an important page counts for more, and that a page shares its rank equally between its outgoing links. Learn the roles of (damping factor, usually 0.85) and , and that the calculation is iterated until the values settle.
Check yourself
What does PageRank measure?
The importance of a web page, based on the number of links to it and the importance of the pages that link to it.
Why does a link from an important page count for more than one from an unimportant page?
A page passes on a share of its own rank through its links, so an important page passes on more rank.
What is the damping factor, and what is its usual value?
The probability that a user follows a link and doesn't jump to a random page. It is usually 0.85.
Why must the PageRank calculation be repeated?
Each page's rank depends on the ranks of the pages linking to it, which also depend on others, so the values are calculated repeatedly until they settle.