This is one in a series of posts about the Google Technology Stack – PageRank, MapReduce, and so on – based on a lecture series I’m giving in 2008 and 2009. If you’d like to know more about the series, please see the course syllabus. There is a FriendFeed room for the series here.

Today’s post overviews the technologies we’ll be discussing in the course, and introduces the basics of the PageRank algorithm.

## Introduction to PageRank

### Introduction to this course

Here’s a cartoon picture of the technologies powering Google:
The picture is not entirely accurate – a point I’ll return to shortly – but it is a good starting point for thinking about what technology could power a company that aims to “organize the world’s information and make it universally accessible and useful”. On the left-hand side of the picture is a stack of fundamental technologies that let Google gather and process enormous quantities of data. To give you an idea of the scale Google works at, in a recent test Google sorted 1 petabyte of data in 6 hours, using a cluster of 4,000 computers. Each day, Google processes more than twenty petabytes of data. The size of the Google cluster doesn’t seem to be public knowledge, but typical estimates place it at several hundred thousand machines, and Google engineers are thinking ahead to a time when the cluster will contain on the order of ten million machines.

On the right-hand side of the picture are the many applications enabled by the fundamental technology stack, including Google’s famous search engine. Also included on the right-hand side is Google’s repository of data, a structured in-house copy of much of the world’s information, including a considerable fraction of the web. The combination of this repository and their other infrastructure provides Google with a proprietary internal platform for innovation that’s matched by no other company.

There’s a caveat to keep in mind here and throughout these lectures: I have never worked at Google. I have friends and acquaintances who work at Google, but we’ve never discussed their work in any depth. The picture above is a caricature, based in part on what Google has published, and in part on my guesses about what’s plausible. You shouldn’t take it seriously as a literal description of what’s going on inside Google. On the other hand, I think the picture shows a pretty plausible core architecture for a large web company. It’s this picture we’ll use as the basis for the lectures, although we won’t discuss all the elements in the picture. In particular, we won’t discuss the actual physical cluster – all the machines, the power systems, the physical network, the cabling, and so on.

Let me digress briefly to clarify a terminological point: I’ve been using the term “cluster” in two ways, to mean both the entire base of machines available to Google, as well as smaller sub-clusters hived off the main cluster and used to run specific jobs, like the 4,000 machines used to sort a petabyte. If you keep the distinction in mind, it should be clear from context which is meant.

Aside from the actual physical cluster, we will discuss all the other technologies pictured above in the fundamental technology stack. Let’s quickly run through what’s in that stack. The Google File System is a simple way of accessing enormous amounts of data spread across a large cluster of machines. It acts as a virtual file system that makes the cluster look to developers more like a single machine, and eliminates the need for developers to think about details like what happens when a machine fails. Bigtable is a simple database system that builds on the Google File System, allowing developers to ignore many of the underlying details of the cluster, and just concentrate on getting things done. MapReduce is a powerful programming model for processing and generating very large data sets on large clusters. MapReduce enables developers to code and run simple but large parallel jobs in minutes, instead of days. More than ten thousand distinct MapReduce programs have been implemented at Google, and roughly one hundred thousand MapReduce jobs are executed on Google’s cluster each day.

What we’ll do in the remainder of this lecture and in the next couple of lectures is study the PageRank algorithm which is at the heart of Google’s search engine. Having looked at the most famous application of Google’s technology, we’ll then back up and return to the fundamental technology stack which makes applications like PageRank possible.

### Examples

• (Your everyday Google supercomputer) Suppose Google serves 100 million search queries per day, taking an average of approximately one third of a second to process each uncached query, and that approximately one third of the queries are uncached. Suppose furthermore that 200,000 machines are involved in computing the results of the uncached queries. These numbers are, needless to say, rough estimates.

Using these assumptions, there are approximately 30 million uncached queries per day, and approximately 300,000 query periods, since there are about 100 thousand seconds in a day, and each uncached query takes one third of a second. Thus, on average approximately 100 queries are being performed on the cluster at any given time. This means that a single query harnesses the computational equivalent of approximately 2,000 machines. Every time you use Google for an unusual query, you’re using a supercomputer, albeit one with an exceptionally well-designed user interface!

### Exercises

• How realistic do you think the assumptions made in the last example are? Issues worth thinking about include load variability during the day, the fraction of uncached queries, variability in the complexity of different queries, and what fraction of the total cluster it makes business and technical sense to be using on search, versus other applications.

### Basic Description of PageRank

What does it mean for a given webpage to be important? Perhaps the most obvious algorithmic way of assessing the importance of a page is to count the number of links to that page. Unfortunately, it’s easy for webpage creators to manipulate this number, and so it’s an unreliable way of assessing page importance. PageRank was introduced as a more reliable way of algorithmically assessing the importance of a webpage.

To understand how PageRank is defined, imagine a websurfer browsing some page on the web. A simple model of surfing behaviour might involve choosing one of the following two actions. Either the websurfer:

• Follows a random link from the page they’re currently on; or
• Decides they’re bored, and “teleports” to a completely random page elsewhere on the web.

Furthermore, the websurfer chooses to do the first action with probability $$s$$, and the second with probability $$t = 1-s$$. If they repeat this random browsing behaviour enough times, it turns out that the probability that they’re on a given webpage $$w$$ eventually converges to a steady value, $$q(w)$$. This probability $$q(w)$$ is the PageRank for the page $$w$$.

Intuitively, it should be plausible that the bigger the PageRank $$q(w)$$ is for a page, the more important that page is. This is for two reasons. First, all other things being equal, the more links there are to a page, the more likely our crazy websurfer is to land on that page, and the higher the PageRank. Second, suppose we consider a very popular page, like, say, www.cnn.com. According to the first reason, just given, this page is likely to have a high PageRank. It follows that any page linked to off www.cnn.com will automatically obtain a pretty high PageRank, because the websurfer is likely to land there coming off the www.cnn.com page. This matches our intuition well: important pages are typically those most likely to be linked to by other important pages.

This intuitive argument isn’t perfect. We’ll see later that there are tricks that can be used to build “link farms” which give spam webpages high PageRanks. If such link farms became too common, then the most important pages on the web, as measured by PageRank, would all be spam pages. The argument in the last paragraph would then be turned upside down: the way to get a high PageRank would be to be linked to by one of those pages, not by a page like www.cnn.com! The spammers would have won.

One aspect of PageRank that is somewhat puzzling upon a first encounter is the teleportation step. One justification for including teleportation is the possibility of our crazy websurfer being led up the garden path, into cliquish collections of pages that only link among themselves. If that happens, our crazy websurfer would get stuck within that clique. The possibility of teleporting solves this garden path problem.

We haven’t yet discussed how the probabilities $$s$$ and $$t$$ are set. In the original paper on PageRank, the authors choose $$s = 0.85$$ and $$t = 0.15$$. Intuitively, this seems reasonable – it means that most of the time we are randomly following links, and only occasionally teleporting out, to prevent getting stuck within cliques. This choice for $$s$$ and $$t$$ can also be related to the speed at which PageRank can be computed. We’ll see later that by increasing the teleportation probability $$t$$, we can speed up the computation of PageRank. However, we don’t want to dial $$t$$ all the way up to the maximum possible value $$t=1$$, for to do so would mean that we lost all the information about page importance contained in the link structure of the web. Instead, it is best to choose an intermediate value, which ensures that PageRank both strongly reflects the link structure, and can be computed relatively quickly. The values $$s = 0.85$$ and $$t = 0.15$$ fulfill both these criteria, and so we’ll use those in our examples.

### Variations on PageRank

There are many variations on PageRank, too many to discuss in detail here. We will, however, describe two of the most common variations.

Dangling pages: The first variation has to do with dangling pages, that is, pages that have links coming into them, but no links coming out. If you think about our earlier description of the crazy websurfer, the description doesn’t specify how the websurfer should behave if they come to a dangling page.

There are many approaches we could take to extending PageRank to dangling pages. Perhaps the simplest is to eliminate dangling pages (and links to dangling pages) from the description of the web, and to only compute PageRank for non-dangling pages. This approach has the virtue of simplicity, but it also runs the risk of eliminating some important pages from consideration by the PageRank algorithm. A second approach is to modify PageRank so that if our random websurfer comes to a dangling webpage, they apply the teleportation step with probability one. In terms of our crazy websurfer model, this is equivalent to modifying the link structure of the web so the dangling page links to every single page on the web.

Now, for the purposes of subsequent discussion it’s not going to matter much which of these two approaches is used. To make things concrete, we’ll assume that the second approach is what’s used. But both approaches are effectively equivalent to modifying the link structure of the web in some way, and so everything we say will apply to both approaches, and also to many other natural ways of tackling the problem of dangling pages.

Personalizing PageRank: The second variation of PageRank we’ll consider involves a modification of the teleportation step. Instead of teleporting to a randomly chosen page, suppose our crazy websurfer teleports to a page randomly chosen from some fixed distribution $$P = P(w)$$ over all webpages. This modified teleportation step can potentially be used to personalize PageRank, e.g., by choosing the distribution $$P$$ to be peaked at the user’s homepage, or on some subset of pages that the user is known to like a great deal. Of course, the original PageRank algorithm is a special case of this one, obtained by choosing $$P$$ to be a uniform distribution over webpages.

### Matrix description of the websurfer

Let’s recast the behaviour of our crazy websurfer in a more compact matrix description. Suppose for convenience that we number webpages from $$1,\ldots,N$$. We’ll imagine for now that the number of webpages and the links between them are fixed. Furthermore, suppose the initial location of the crazy websurfer is described by an $$N$$-dimensional probability distribution $$p = (p_1,\ldots,p_N)$$. The location after one step will be described by the probability distribution $$Mp$$ where we regard $$p$$ as an $$N$$-dimensional vectors, and where $$M$$ is an $$N \times N$$ matrix given by

$$M = s G + t E.$$

Here, $$G$$ is a matrix which represents the random link-following behaviour. In particular, the $$k$$’th column of $$G$$ has entries describing the probabilities of going to other pages from page $$k$$. If $$\#(k)$$ is the number of links outbound from page $$k$$, then those probabilities are $$1/\#(k)$$:

$$G_{jk} = \left\{ \begin{array}{l} \frac{1}{\#(k)} \mbox{ if page } k \mbox{ links to page } j \\ 0 \mbox{ if page } k \mbox{ does not link to page } j. \end{array} \right.$$

If page $$k$$ is a dangling page, then we imagine that it has links to every page on the web, and so $$\#(k) = N$$, and $$G_{jk} = 1/N$$ for all $$j$$.

The matrix $$E$$ describes the teleportation step. In the case of the original PageRank algorithm, $$E_{jk} = 1/N$$, the probability of teleporting from page $$k$$ to page $$j$$. In the case of personalized PageRank, $$E$$ consists of repeated columns containing the personalization distribution, $$P$$, i.e., $$E_{jk} = P_j$$. Note that we use the same notation $$E$$ regardless of whether we’re working with the original PageRank algorithm, or with the personalized variant.

We pause to note a useful algebraic fact about $$E$$ that we’ll use repeatedly,

$$E v = s(v) P,$$

where $$s(v)$$ is defined to be the sum of all the entries in $$v$$. This equation follows from straightforward manipulations: $$(Ev)_j = \sum_k E_{jk} v_k = \sum_k P_j v_k = s(v) P_j$$.

To people who’ve previously worked with random walks or Markov chains, the matrix-theoretic description of the crazy websurfer’s random walk given above will be familiar. If you’re not comfortable with those tools, though, you should work through the next two exercises, and the example which follows.

### Exercises

• Prove that the equation $$p \rightarrow Mp$$ describes the way the probability distribution changes during a single timestep for the crazy websurfer.
• (Stochastic matrices) Prove that all the entries of $$M$$ as defined above are non-negative, and that all the columns of $$M$$ add up to one. Matrices with both these properties are called stochastic matrices, and the equation $$p \rightarrow Mp$$ with $$M$$ a stochastic matrix is a general way of describing random walks on a state space.

### Examples

• It’s not just the matrix $$M$$ which is stochastic. The matrices $$G$$ and $$E$$ are also stochastic. To see that $$G$$ is stochastic, just notice that the $$j$$th column has $$\#(j)$$ non-zero entries, all $$1/\#(j)$$, and so they sum to one. To see that $$E$$ is stochastic, notice that each column is a probability distribution, and so the entries must be non-negative and sum to one.

### Defining PageRank

We gave an informal definition of PageRank above, but let’s now make a more precise definition. It turns out that there are many equivalent ways of doing this. An especially simple way, and the way we’ll go here, is to define the PageRank distribution $$q$$ as the probability distribution $$q$$ which is unchanged by the random walk, i.e.,

$$q = Mq.$$

This approach to a definition accords with our intuition that the probability distribution of the crazy websurfer gradually settles down to a stable distribution. To show that the definition actually makes sense, and has the properties we desire, we have to show that such a probability distribution (1) exists; (2) is unique; and (3) corresponds to the limiting distribution. We’ll do all these things over the remainder of this section, and in the next section.

To prove existence and uniqueness, first substitute our earlier expression $$M = s G + t E$$ into the equation $$Mq = q$$, and rearrange, so we see that $$Mq = q$$ is equivalent to $$(I-sG)q = tEq$$. Recall that $$Eq = s(q) P$$, where $$s(q)$$ is just the sum of all the entries in the vector $$q$$. We’ll eventually see that a $$q$$ satisfying $$Mq = q$$ exists and satisfies $$s(q) = 1$$, as we’d expect for a probability distribution, but for now we make no such assumption. It follows that $$Mq = q$$ is equivalent to

$$(I-sG) q = t s(q) P.$$

The key to analysing the existence and uniqueness of solutions to the equation $$Mq = q$$ is therefore to understand whether $$I-sG$$ has an inverse. This is equivalent to asking whether $$I-sG$$ has any zero eigenvalues, and so, since $$G$$ is a stochastic matrix, we will need to understand some facts about the eigenvalues of general stochastic matrices. The fact we need turns out to be that all eigenvalues $$\lambda$$ of stochastic matrices satisfy $$|\lambda| \leq 1$$. We could prove this directly, but our overall presentation turns out to be simplified if we take a slight detour.

The detour involves the $$l_1$$ norm, a norm on vectors defined by:

$$\| v \|_1 \equiv \sum_j |v_j|.$$

### Exercises

• If you’re not already familiar with the $$l_1$$ norm, prove that it is, indeed, a norm on vectors, i.e., $$\| v\|_1 \geq 0$$, with equality if and only if $$v = 0$$, $$\| \alpha v \|_1 = |\alpha| \|v \|_1$$ for all scalars $$\alpha$$, and $$\|v + w \|_1 \leq \|v\|_1 + \|w\|_1$$.
• (Interpretation of the $$l_1$$ norm) Suppose $$p$$ and $$q$$ are probability distributions over the same sample space. Imagine that Alice flips a fair coin, and depending on the outcome, samples from either the distribution $$p$$ or $$q$$. She then gives the result of her sampling to Bob. Bob’s task is to use this result to make the best possible guess about whether Alice sampled from $$p$$ or $$q$$. Show that his best possible guessing strategy has a correctness probability of $$\frac{1+\|p-q\|_1/2}{2}.$$

Proving this formula is a challenging but worthwhile exercise. The formula provides a nice intuitive interpretation of the $$l_1$$ norm, as determining the probability of Bob being able to distinguish the two probability distributions. Notice that it matches up well with our existing intuitions. For example, when $$p = q$$, there’s nothing Bob can do to tell which distribution Alice sampled from, and so the best possible strategy for Bob is just to randomly guess, giving a probability $$1/2$$ of being right. On the other hand, when the distributions $$p$$ and $$q$$ don’t overlap, we see that $$\|p-q\|_1 = 2$$, and so the probability of Bob being able to distinguish them is $$(1+2/2)/2 = 1$$, as we would expect.

We will prove that stochastic matrices can never increase the $$l_1$$ norm: intuitively, stochastic matrices “smear out” vectors probabilistically, making them shorter, at least in the $$l_1$$ norm. This intuition is captured in the following statement:

Theorem:[Contractivity of the $$l_1$$ norm] If $$v$$ is a vector and $$M$$ is a stochastic matrix, then $$\| Mv \|_1 \leq \|v\|_1$$.

Proof: Substituting the definition of the $$l_1$$ norm gives

$$\| M v\|_1 = \sum_j \left| \sum_k M_{jk} v_k \right| \leq \sum_{jk} M_{jk}|v_k|,$$

where we used the inequality $$|a+b| \leq |a|+|b|$$ and the fact that $$|M_{jk}| = M_{jk}$$. Summing over the $$j$$ index, and using the fact that the column sums of $$M$$ are one, we get

$$\| M v \|_1 \leq \sum_k |v_k| = \|v\|_1,$$

which is the desired result. QED

The theorem gives as a corollary some information about the eigenvalues of stochastic matrices:

Corollary: If $$M$$ is a stochastic matrix, then all the eigenvalues $$\lambda$$ of $$M$$ satisfy $$|\lambda| \leq 1$$.

We could have proved this corollary directly, using a strategy very similar to the strategy used in the proof of the contractivity theorem above. But it turns out that the contractivity theorem will be independently useful later in studying the computation of PageRank, and so the overall presentation is simplified by doing things this more indirect way.

(By the way, if you’re familiar with the Perron-Frobenius theorem, it’s worth pausing to note that the corollary is part of the Perron-Frobenius theorem.)

Proof: Suppose $$v$$ is an eigenvector of $$M$$ with eigenvalue $$\lambda$$, so $$\lambda v = M v$$. Taking the $$l_1$$ norm of both sides gives $$|\lambda| \| v \|_1 = \|Mv\|_1$$, and applying the contractivity of the $$l_1$$ norm gives $$|\lambda| \|v\|_1 \leq \|v\|_1$$, and so $$|\lambda\| \leq 1$$. QED

This corollary can be recast in a form suitable for application to PageRank.

Corollary: If $$M$$ is a stochastic matrix, then $$I-sM$$ is invertible for all $$s < 1$$. Proof: For a contradiction, let’s assume it’s not invertible, and so $$(I-sM) v = 0$$ for some non-trivial vector $$v$$. This is equivalent to $$Mv = \frac{1}{s}v$$, and so $$M$$ has an eigenvalue $$1/s > 1$$, contradicting the previous lemma. QED

This corollary lets us see two things. First, the equation $$(I-sG)q = ts(q) P$$ cannot have a non-trivial solution $$q$$ if $$s(q) = 0$$. It follows that we can restrict our attention to the case when $$s(q) \neq 0$$. By rescaling $$q \rightarrow q/s(q)$$ this means we can assume without loss of generality that $$s(q) = 1$$. Thus $$Mq = q$$ is equivalent to the equation

$$q = t (I-sG)^{-1} P.$$

We see from this argument that $$q$$ exists, and is uniquely defined up to an overall scaling factor. If we rewrite $$(I-sG)^{-1}$$ as $$\sum_{j=0}^\infty s^j G^j$$, then we get

$$q = t\sum_{j=0}^{\infty} s^j G^j P.$$

Because all the entries of $$G$$ and $$P$$ are non-negative, so too are the entries of $$G^j P$$, and so all the entries of $$q$$ must be non-negative. Since they sum to one, it follows that $$q$$ is a probability distribution.

Summing up, we have shown that the equation

$$q = t (I-sG)^{-1} P$$

defines a probability distribution which is the unique (up to scaling) non-trivial solution to the equation $$Mq = q$$. In the next section we’ll show that this distribution is also the limiting distribution for the random walk of our crazy websurfer. Indeed, you can regard this equation as defining PageRank, since it is equivalent to our earlier definition $$q = Mq$$, but is more explicit. For this reason we’ll sometimes call this equation the PageRank equation.

One advantage of the PageRank equation is that it immediately shows how to compute PageRank on small link sets, using matrix inverses. For example, the following Python code computes PageRank for a simple three-page “web”, with page 1 linking both to itself and page 2; page 2 linking to page 1 and page 3, and page 3 just linking to itself. Here’s the code:


from numpy import * # imports numerical Python (numpy) library
I = mat(eye(3)) # The 3 by 3 identity matrix
# The G matrix for the link structure
G = matrix([[0.5,0.5,0],[0.5,0,0],[0,0.5,1.0]])
# The teleportation vector
P = (1.0/3.0)*mat(ones((3,1)))
s = 0.85
t = 1-s
# compute the PageRank vector
t*((I-s*G).I)*P


The output from running this code is the PageRank vector

$$\left[ \begin{array}{c} 0.18066561 \\ 0.12678288 \\ 0.69255151 \end{array} \right],$$

which, if you think a bit about the link structure, matches our intuition about what’s important pretty well.

The code sample above is written in Python, and I expect to continue using Python for examples throughout the lectures. I’ve chosen Python for three reason. First, Python is extremely readable and easy to learn, even for people not familiar with the language. If you’ve ever programmed in any language it should be possible to get the gist with relative ease, and understand the details with a little work. Second, Python is a powerful language with excellent libraries, and so it’s relatively simple to code up some quite sophisticated algorithms. Third, I wanted to learn Python, and this lecture series seems a good opportunity to do so.

### Exercises

• You could reasonably argue that since page number 3 links only to itself, it should be considered a dangling page, and the matrix $$G$$ modified so the final column contains all entries $$1/3$$. Modify the Python code for this case, but before you run it make a guess as to how the PageRank vector will change. How well does your guess match reality? If the two differ, can you explain the difference?

This approach to computing PageRank is useful for running small examples and building intuition, but the number of pages on the web is enormous, and it’s not possible to explicitly compute the matrix inverse for the entire web. Let’s say the number of pages we want to store is a relatively modest 10 billion, and that we are using 64 bit floating point numbers for each matrix entry. Then we would need nearly a zettabyte just to store the matrix, many orders of magnitude beyond the world’s total disk capacity. A smarter approach is needed.

### Problems

• (CiteRank) The CiteRank of an academic paper can be defined analogously to the PageRank, but based on the citation graph of academic papers. How good do you think CiteRank would be as a measure of the importance of a paper?
• (Simplifying the computation of CiteRank) Unlike the web, the graph of citations in academic papers is a directed acyclic graph, i.e., papers only cite papers that were written before them. By ordering the papers in terms of time of publication, this ensures that the adjacency matrix $$G$$ is lower triangular. How can we use this special structure to simplify the computation of CiteRank?
• (Mutual citations) In the last problem, we assumed that two papers never mutually cite one another. In practice, such mutual citations do occasionally occur, usually when two groups are simultaneously working on closely related projects, and agree in advance of publication to cite one another. Can you quantify the extent to which such mutual citations are likely to affect the CiteRank?
• (Personalized academic search engines) Suppose there have been approximately 1 million papers written in some subfield of academia, say physics. Do you think it’s realistic to compute the matrix inverse $$(I-sG)^{-1}$$ for the corresponding citation structure? How good do you think the prospects are for a personalized academic search engine that incorporates information about papers you’ve liked in the past into its search results? How would you factor the recency of a paper into such a search engine?
• (Nobel Prize prediction) Several online databases track the number of citations to scientific papers. The most venerable of these databases is the ISI Web of Knowledge. Based on this data, the ISI make an annual prediction of Nobel Prizes. Unfortunately, to date they haven’t had much success in predicting Nobel Prizes. Do you think CiteRank would be any better?

### Convergence of PageRank

The final thing we want to do is to show that the PageRank distribution defined by $$Mq = q$$ (or, equivalently, by the PageRank equation) is, indeed, the limiting distribution for our crazy websurfer. To prove this, suppose our crazy websurfer takes a large number of steps of the PageRank random walk, starting from a distribution $$p$$. We will show that as the number of steps increases the distribution $$M^j p$$ approaches $$q$$ exponentially quickly in the $$l_1$$ norm. This shows that $$q$$ is the limiting distribution for our crazy websurfer. We will see in a later lecture that this exponential convergence is related to quickly computing PageRank.

Our goal is to analyse $$\| M^{j} p- q\|_1$$. Recalling that $$q = Mq$$, we can pull a factor $$M$$ out the front, and write this as:

$$\|M^{j} p- q \|_1 = \| M (M^{j-1}p-q) \|_1.$$

Substituting $$M = s G + t E$$ we get:

$$\|M^{j} p-q\|_1 = \| sG(M^{j-1}p-q) + t E(M^{j-1}p-q)\|_1.$$

But $$E M^{j-1}p = P = E q$$, and so the $$t$$ terms vanish, leaving

$$\|M^{j} p-q\|_1 = s \| G(M^{j-1}p-q)\|_1.$$

Applying the contractivity of the $$l_1$$ norm, we get

$$\|M^{j} p-q\|_1 \leq s \|M^{j-1}p-q\|_1.$$

This result does not depend on the value of $$j$$, and so we can apply this repeatedly to obtain

$$\|M^{j} p-q\|_1 \leq s^j \|p-q\|_1.$$

Because $$s < 1$$, this means that we get exponentially fast convergence to the PageRank vector $$q$$.

This exponentially fast convergence is a very useful feature of PageRank. We will see in the next lecture that if we use a uniform teleportation vector, then the minimal PageRank for any page is $$t / N$$. Noting that $$\|p-q\|_1 \leq 2$$ for any two distributions, it follows that we are guaranteed to have better than ten percent accuracy in every single PageRank if $$2 s^j \leq t/(10 N)$$. With $$s = 0.85, t = 0.15$$ and $$N = 10^{10}$$, this is equivalent to $$j \geq 172$$ steps of the random walk.

That concludes the first lecture. Next lecture, we’ll build up our intuition about PageRank with a bunch of simple special cases, and by thinking a little more about algorithms for computing PageRank.

From → GTS

1. For a French version of similar ideas, see week 11 of my online course on Information Retrieval:

http://benhur.teluq.uqam.ca/SPIP/inf6460/rubrique.php3?id_rubrique=13&id_article=52&sem=Semaine%2011

2. This will be a wonderful series of lectures!

To the extent that the subject “Google Technology” is broadly conceived, there are several subjects of broad interest that I hope will be covered.

For example, what is (or should be) the intellectual property status of algorithms like PageRank?

According to Wikipedia, Stanford University holds a patent of PageRank algorithm, which they exclusively license to Google … for the princely sum of \$350 million dollars.

We can contrast this the charter of UC Berkeley’s CHESS program (Center for Hybrid and Embedded Software Systems) which explicitly states “The Center publicly disseminates all research results as rapidly as possible … software is made available in open-source form … center patents are expected to be rare.”

A wonderful question is: which of these two models is a more plausible/more viable/morally superior model for the future of science?

On a mathematical note, if we take “n” to be the number of vertices of the web, then every aspect of Google’s page-rank algorithms has to be O(n) … even matrix-vector multiplication. So every matrix arising in PageRank has to be structured in such a way that (e.g., sparsity and/or factorization) that practical O(n) computation is feasible.

The property of “O(n)-ness” is becoming ubiquitous in every aspect of modern simulation science (which itself would be a good theme for a lecture). Because nowadays it seems that almost every large-scale system that we humans care about–whether natural or human-made, whether classical or quantum—possesses sufficient algorithmic compressibility that “O(n)-ness” can be found.

In this sense, aren’t Google and CHESS (and many other public and private enterprises) very much in the same line of business … mathematically *and* morally *and* legally?

These are deep waters … and for this reason I look forward immensely to further lectures in this series.

@JohnS

The IP angle is interesting.

But consider another angle.

Anyone can crawl the web and create and index. Even a cache. But some questions begin to emerge:

– are they holding the IP (e.g. copyright) of others’ sites as URI’s or even cahed pages?

– are they operating as middlemen, as gateways to others’ content, and letting advertisers intrude into the pathway between user and the content she intends to retrieve?

– will content owners agree to anyone crawling and indexing and even caching their content, or only to certain parties (e.g. Google, Yahoo, MSN, etc.)

– do we need middlemen?

– are “browsers” even necessary, if we are merely searching and selecting known content from an index? consider a tool that can handle regex searches, a tool that can generate an index and a tool that can retrieve a file when given a URI

is the internet of today (cf. to that of say 1993) too big to “browse”? compare the “portal” concept (e.g. Yahoo! etc.) of the early web versus today’s point of entry: the Google search