/ Published in: HTML

Expand |
Embed | Plain Text

THE $25,000,000,000 â�� EIGENVECTOR THE LINEAR ALGEBRA BEHIND GOOGLE KURT BRYANâ� AND TANYA LEISEâ�¡ Abstract. Googleâ��s success derives in large part from its PageRank algorithm, which ranks the importance of webpages according to an eigenvector of a weighted link matrix. Analysis of the PageRank formula provides a wonderful applied topic for a linear algebra course. Instructors may assign this article as a project to more advanced students, or spend one or two lectures presenting the material with assigned homework from the exercises. This material also complements the discussion of Markov chains in matrix algebra. Maple and Mathematica ï¬�les supporting this material can be found at www.rose-hulman.edu/â�¼bryan. Key words. linear algebra, PageRank, eigenvector, stochastic matrix AMS subject classiï¬�cations. 15-01, 15A18, 15A51 1. Introduction. When Google went online in the late 1990â��s, one thing that set it apart from other search engines was that its search result listings always seemed deliver the â��good stuï¬�â�� up front. With other search engines you often had to wade through screen after screen of links to irrelevant web pages that just happened to match the search text. Part of the magic behind Google is its PageRank algorithm, which quantitatively rates the importance of each page on the web, allowing Google to rank the pages and thereby present to the user the more important (and typically most relevant and helpful) pages ï¬�rst. Understanding how to calculate PageRank is essential for anyone designing a web page that they want people to access frequently, since getting listed ï¬�rst in a Google search leads to many people looking at your page. Indeed, due to Googleâ��s prominence as a search engine, its ranking system has had a deep inï¬�uence on the development and structure of the internet, and on what kinds of information and services get accessed most frequently. Our goal in this paper is to explain one of the core ideas behind how Google calculates web page rankings. This turns out to be a delightful application of standard linear algebra. Search engines such as Google have to do three basic things: 1. Crawl the web and locate all web pages with public access. 2. Index the data from step 1, so that it can be searched eï¬�ciently for relevant keywords or phrases. 3. Rate the importance of each page in the database, so that when a user does a search and the subset of pages in the database with the desired information has been found, the more important pages can be presented ï¬�rst. This paper will focus on step 3. In an interconnected web of pages, how can one meaningfully deï¬�ne and quantify the â��importanceâ�� of any given page? The rated importance of web pages is not the only factor in how links are presented, but it is a signiï¬�cant one. There are also successful ranking algorithms other than PageRank. The interested reader will ï¬�nd a wealth of information about ranking algorithms and search engines, and we list just a few references for getting started (see the extensive bibliography in [9], for example, for a more complete list). For a brief overview of how Google handles the entire process see [6], and for an in-depth treatment of PageRank see [3] and a companion article [9]. Another article with good concrete examples is [5]. For more background on PageRank and explanations of essential principles of web design to maximize a websiteâ��s PageRank, go to the websites [4, 11, 14]. To ï¬�nd out more about search engine principles in general and other ranking algorithms, see [2] and [8]. Finally, for an account of some newer approaches to searching the web, see [12] and [13]. 2. Developing a formula to rank pages. â��THE APPROXIMATE MARKET VALUE OF GOOGLE WHEN THE COMPANY WENT PUBLIC IN 2004. â� Department of Mathematics, Rose-Hulman Institute of Technology, Terre Haute, IN 47803; email: kurt.bryan@rose-hulman.edu; phone: 812) 877-8485; fax: (812)877-8883. â�¡Mathematics and Computer Science Department, Amherst College, Amherst, MA 01002; email: tleise@amherst.edu; phone: (413)542-5411; fax: (413)542-2550. 12 K. BRYAN AND T. LEISE 2 4 1 3 2 4 1 3 Fig. 2.1. An example of a web with only four pages. An arrow from page A to page B indicates a link from page A to page B. 2.1. The basic idea. In what follows we will use the phrase â��importance scoreâ�� or just â��scoreâ�� for any quantitative rating of a web pageâ��s importance. The importance score for any web page will always be a non-negative real number. A core idea in assigning a score to any given web page is that the pageâ��s score is derived from the links made to that page from other web pages. The links to a given page are called the backlinks for that page. The web thus becomes a democracy where pages vote for the importance of other pages by linking to them. Suppose the web of interest contains n pages, each page indexed by an integer k, 1 â�¤ k â�¤ n. A typical example is illustrated in Figure 2.1, in which an arrow from page A to page B indicates a link from page A to page B. Such a web is an example of a directed graph. 1 Weâ��ll use xk to denote the importance score of page k in the web. The xk is non-negative and xj > xk indicates that page j is more important than page k (so xj = 0 indicates page j has the least possible importance score). A very simple approach is to take xk as the number of backlinks for page k. In the example in Figure 2.1, we have x1 = 2, x2 = 1, x3 = 3, and x4 = 2, so that page 3 would be the most important, pages 1 and 4 tie for second, and page 2 is least important. A link to page k becomes a vote for page kâ��s importance. This approach ignores an important feature one would expect a ranking algorithm to have, namely, that a link to page k from an important page should boost page kâ��s importance score more than a link from an unimportant page. For example, a link to your homepage directly from Yahoo ought to boost your pageâ��s score much more than a link from, say, www.kurtbryan.com (no relation to the author). In the web of Figure 2.1, pages 1 and 4 both have two backlinks: each links to the other, but page 1â��s second backlink is from the seemingly important page 3, while page 4â��s second backlink is from the relatively unimportant page 1. As such, perhaps we should rate page 1â��s importance higher than that of page 4. As a ï¬�rst attempt at incorporating this idea letâ��s compute the score of page j as the sum of the scores of all pages linking to page j. For example, consider the web of Figure 2.1. The score of page 1 would be determined by the relation x1 = x3 + x4. Since x3 and x4 will depend on x1 this scheme seems strangely self-referential, but it is the approach we will use, with one more modiï¬�cation. Just as in elections, we donâ��t want a single individual to gain inï¬�uence merely by casting multiple votes. In the same vein, we seek a scheme in which a web page doesnâ��t gain extra inï¬�uence simply by linking to lots of other pages. If page j contains nj links, one of which links to page k, then we will boost page kâ��s score by xj/nj , rather than by xj . In this scheme each web page gets a total of one vote, weighted by that web pageâ��s score, that is evenly divided up among all of its outgoing links. To quantify this for a web of n pages, let Lk â�� {1, 2, . . . , n} denote the set of pages with a link to page k, that is, Lk is the set of page kâ��s backlinks. For each k we require xk = X jâ��Lk xj nj , (2.1) where nj is the number of outgoing links from page j (which must be positive since if j â�� Lk then 1A graph consists of a set of vertices (in this context, the web pages) and a set of edges. Each edge joins a pair of vertices. The graph is undirected if the edges have no direction. The graph is directed if each edge (in the web context, the links) has a direction, that is, a starting and ending vertex.THE $25,000,000,000 EIGENVECTOR 3 5 2 4 1 3 5 2 4 1 3 Fig. 2.2. A web of ï¬�ve pages, consisting of two disconnected â��subwebsâ�� W1 (pages 1 and 2) and W2 (pages 3, 4, 5). page j links to at least page k!). We will assume that a link from a page to itself will not be counted. In this â��democracy of the webâ�� you donâ��t get to vote for yourself ! Letâ��s apply this approach to the four-page web of Figure 2.1. For page 1 we have x1 = x3/1 + x4/2, since pages 3 and 4 are backlinks for page 1 and page 3 contains only one link, while page 4 contains two links (splitting its vote in half ). Similarly, x2 = x1/3, x3 = x1/3 + x2/2 + x4/2, and x4 = x1/3 + x2/2. These linear equations can be written Ax = x, where x = [x1 x2 x3 x4] T and A = ï£® ï£¯ ï£° 0 0 1 1 2 1 3 0 0 0 1 3 1 2 0 1 2 1 3 1 2 0 0 ï£¹ ï£º ï£» (2.2) . This transforms the web ranking problem into the â��standardâ�� problem of ï¬�nding an eigenvector for a square matrix! (Recall that the eigenvalues Î» and eigenvectors x of a matrix A satisfy the equation Ax = Î»x, x =6 0 by deï¬�nition.) We thus seek an eigenvector x with eigenvalue 1 for the matrix A. We will refer to A as the â��link matrixâ�� for the given web. It turns out that the link matrix A in equation (2.2) does indeed have eigenvectors with eigenvalue 1, namely, all multiples of the vector [12 4 9 6] T (recall that any non-zero multiple of an eigenvector is again an eigenvector). Letâ��s agree to scale these â��importance score eigenvectorsâ�� so that the components sum to 1. In this case we obtain x1 = 12 31 â�� 0.387, x2 = 4 31 â�� 0.129, x3 = 9 31 â�� 0.290, and x4 = 6 31 â�� 0.194. Note that this ranking diï¬�ers from that generated by simply counting backlinks. It might seem surprising that page 3, linked to by all other pages, is not the most important. To understand this, note that page 3 links only to page 1 and so casts its entire vote for page 1. This, with the vote of page 2, results in page 1 getting the highest importance score. More generally, the matrix A for any web must have 1 as an eigenvalue if the web in question has no dangling nodes (pages with no outgoing links). To see this, ï¬�rst note that for a general web of n pages formula (2.1) gives rise to a matrix A with Aij = 1/nj if page j links to page i, Aij = 0 otherwise. The jth column of A then contains nj non-zero entries, each equal to 1/nj , and the column thus sums to 1. This motivates the following deï¬�nition, used in the study of Markov chains: Definition 2.1. A square matrix is called a column-stochastic matrix if all of its entries are nonnegative and the entries in each column sum to one. The matrix A for a web with no dangling nodes is column-stochastic. We now prove Proposition 1. Every column-stochastic matrix has 1 as an eigenvalue. Proof. Let A be an nÃ�n column-stochastic matrix and let e denote an n dimensional column vector with all entries equal to 1. Recall that A and its transpose AT have the same eigenvalues. Since A is column-stochastic it is easy to see that AT e = e, so that 1 is an eigenvalue for AT and hence for A. In what follows we use V1(A) to denote the eigenspace for eigenvalue 1 of a column-stochastic matrix A. 2.2. Shortcomings. Several diï¬�culties arise with using formula (2.1) to rank websites. In this section we discuss two issues: webs with non-unique rankings and webs with dangling nodes. 2.2.1. Non-Unique Rankings. For our rankings it is desirable that the dimension of V1(A) equal one, so that there is a unique eigenvector x with P i xi = 1 that we can use for importance scores. This is true in the web of Figure 2.1 and more generally is always true for the special case of4 K. BRYAN AND T. LEISE a strongly connected web (that is, you can get from any page to any other page in a ï¬�nite number of steps); see Exercise 10 below. Unfortunately, it is not always true that the link matrix A will yield a unique ranking for all webs. Consider the web in Figure 2.2, for which the link matrix is A = ï£® ï£¯ ï£° 0 1 0 0 0 1 0 0 0 0 0 0 0 1 1 2 0 0 1 0 1 2 0 0 0 0 0 ï£¹ ï£º ï£» . We ï¬�nd here that V1(A) is two-dimensional; one possible pair of basis vectors is x = [1/2, 1/2, 0, 0, 0] T and y = [0, 0, 1/2, 1/2, 0] T But note that any linear combination of these two vectors yields another . vector in V1(A), e.g., 3 4 x + 1 4 y = [3/8, 3/8, 1/8, 1/8, 0] T It is not clear which, if any, of these . eigenvectors we should use for the rankings! It is no coincidence that for the web of Figure 2.2 we ï¬�nd that dim(V1(A)) > 1. It is a consequence of the fact that if a web W, considered as an undirected graph (ignoring which direction each arrows points), consists of r disconnected subwebs W1, . . . , Wr, then dim(V1(A)) â�¥ r, and hence there is no unique importance score vector x â�� V1(A) with P i xi = 1. This makes intuitive sense: if a web W consists of r disconnected subwebs W1, . . . , Wr then one would expect diï¬�culty in ï¬�nding a common reference frame for comparing the scores of pages in one subweb with those in another subweb. Indeed, it is not hard to see why a web W consisting of r disconnected subwebs forces dim(V1(A)) â�¥ r. Suppose a web W has n pages and r component subwebs W1, . . . , Wr. Let ni denote the number of pages in Wi Index the pages in W1 with indices 1 through n1, the pages in W2 with indices . n1 + 1 through n1 + n2, the pages in W3 with n1 + n2 + 1 through n1 + n2 + n3, etc. In general, let Ni = Pi j=1 nj for i â�¥ 1, with N0 = 0, so Wi contains pages Niâ��1 + 1 through Ni ,For example . in the web of Figure 2 we can take N1 = 2 and N2 = 5, so W1 contains pages 1 and 2, W2 contains pages 3, 4, and 5. The web in Figure 2.2 is a particular example of the general case, in which the matrix A assumes a block diagonal structure A = ï£® ï£¯ ï£° A1 0 . . . 0 0 A2 0 0 0 . . . . . 0 . 0 0 0 Ar ï£¹ ï£º ï£» , where Ai denotes the link matrix for Wi .In fact, Wi can be considered as a web in its own right . Each ni Ã� ni matrix Ai is column-stochastic, and hence possesses some eigenvector v i â�� lR ni with eigenvector 1. For each i between 1 and r construct a vector wi â�� lR n which has 0 components for all elements corresponding to blocks other than block i. For example, w1 = ï£« ï£¬ ï£ v 1 0 0 . . . 0 ï£¶ ï£· ï£¸ , w2 = ï£« ï£¬ ï£ 0 v 2 0 . . . 0 ï£¶ ï£· ï£¸ . . . , Then it is easy to see that the vectors wi , 1 â�¤ i â�¤ r, are linearly independent eigenvectors for ATHE $25,000,000,000 EIGENVECTOR 5 with eigenvalue 1 because Awi = A ï£« ï£¬ ï£ 0 . . . 0 v i 0 . . . 0 ï£¶ ï£· ï£¸ = wi . Thus V1(A) has dimension at least r. 2.2.2. Dangling Nodes. Another diï¬�culty may arise when using the matrix A to generate rankings. A web with dangling nodes produces a matrix A which contains one or more columns of all zeros. In this case A is column-substochastic, that is, the column sums of A are all less than or equal to one. Such a matrix must have all eigenvalues less than or equal to 1 in magnitude, but 1 need not actually be an eigenvalue for A. Nevertheless, the pages in a web with dangling nodes can still be ranked use a similar technique. The corresponding substochastic matrix must have a positive eigenvalue Î» â�¤ 1 and a corresponding eigenvector x with non-negative entries (called the Perron eigenvector) that can be used to rank the web pages. See Exercise 4 below. We will not further consider the problem of dangling nodes here, however. Exercise 1. Suppose the people who own page 3 in the web of Figure 1 are infuriated by the fact that its importance score, computed using formula (2.1), is lower than the score of page 1. In an attempt to boost page 3â��s score, they create a page 5 that links to page 3; page 3 also links to page 5. Does this boost page 3â��s score above that of page 1? Exercise 2. Construct a web consisting of three or more subwebs and verify that dim(V1(A)) equals (or exceeds) the number of the components in the web. Exercise 3. Add a link from page 5 to page 1 in the web of Figure 2. The resulting web, considered as an undirected graph, is connected. What is the dimension of V1(A)? Exercise 4. In the web of Figure 2.1, remove the link from page 3 to page 1. In the resulting web page 3 is now a dangling node. Set up the corresponding substochastic matrix and ï¬�nd its largest positive (Perron) eigenvalue. Find a non-negative Perron eigenvector for this eigenvalue, and scale the vector so that components sum to one. Does the resulting ranking seem reasonable? Exercise 5. Prove that in any web the importance score of a page with no backlinks is zero. Exercise 6. Implicit in our analysis up to this point is the assertion that the manner in which the pages of a web W are indexed has no eï¬�ect on the importance score assigned to any given page. Prove this, as follows: Let W contains n pages, each page assigned an index 1 through n, and let A be the resulting link matrix. Suppose we then transpose the indices of pages i and j (so page i is now page j and vice-versa). Let Ë�A be the link matrix for the relabelled web. â�¢ Argue that Ë�A = PAP, where P is the elementary matrix obtained by transposing rows i and j of the n Ã� n identity matrix. Note that the operation A â�� PA has the eï¬�ect of swapping rows i and j of A, while A â�� AP swaps columns i and j. Also, P2 = I, the identity matrix. â�¢ Suppose that x is an eigenvector for A, so Ax = Î»x for some Î». Show that y = Px is an eigenvector for Ë�A with eigenvalue Î». â�¢ Explain why this shows that transposing the indices of any two pages leaves the importance scores unchanged, and use this result to argue that any permutation of the page indices leaves the importance scores unchanged. 3. A remedy for dim(V1(A)) > 1. An enormous amount of computing resources are needed to determine an eigenvector for the link matrix corresponding to a web containing billions of pages. It is thus important to know that our algorithm will yield a unique set of sensible web rankings. The analysis above shows that our ï¬�rst attempt to rank web pages leads to diï¬�culties if the web isnâ��t connected. And the worldwide web, treated as an undirected graph, contains many disjoint components; see [9] for some interesting statistics concerning the structure of the web.6 K. BRYAN AND T. LEISE Below we present and analyze a modiï¬�cation of the above method that is guaranteed to overcome this shortcoming. The analysis that follows is basically a special case of the Perron-Frobenius theorem, and we only prove what we need for this application. For a full statement and proof of the Perron-Frobenius theorem, see chapter 8 in [10]. 3.1. A modiï¬�cation to the link matrix A. For an n page web with no dangling nodes we can generate unambiguous importance scores as follows, including cases of web with multiple subwebs. Let S denote an n Ã� n matrix with all entries 1/n. The matrix S is column-stochastic, and it is easy to check that V1(S) is one-dimensional. We will replace the matrix A with the matrix M = (1 â�� m)A + mS, (3.1) where 0 â�¤ m â�¤ 1. M is a weighted average of A and S. The value of m originally used by Google is reportedly 0.15 [9, 11]. For any m â�� [0, 1] the matrix M is column-stochastic and we show below that V1(M) is always one-dimensional if m â�� (0, 1]. Thus M can be used to compute unambiguous importance scores. In the case when m = 0 we have the original problem, for then M = A. At the other extreme is m = 1, yielding M = S. This is the ultimately egalitarian case: the only normalized eigenvector x with eigenvalue 1 has xi = 1/n for all i and all web pages are rated equally important. Using M in place of A gives a web page with no backlinks (a dangling node) the importance score of m/n (Exercise 9), and the matrix M is substochastic for any m < 1 since the matrix A is substochastic. Therefore the modiï¬�ed formula yields nonzero importance scores for dangling links (if m > 0) but does not resolve the issue of dangling nodes. In the remainder of this article, we only consider webs with no dangling nodes. The equation x = Mx can also be cast as x = (1 â�� m)Ax + ms, (3.2) where s is a column vector with all entries 1/n. Note that Sx = s if P i xi = 1. We will prove below that V1(M) is always one-dimensional, but ï¬�rst letâ��s look at a couple of examples. Example 1: For the web of four pages in Figure 2.1 with matrix A given by (2.2), the new formula gives (with m = 0.15) M = ï£® ï£¯ ï£° 0.0375 0.0375 0.8875 0.4625 0.3208Â¯3 0.0375 0.0375 0.0375 0.3208Â¯3 0.4625 0.0375 0.4625 0.3208Â¯3 0.4625 0.0375 0.0375 ï£¹ ï£º ï£» , and yields importance scores x1 â�� 0.368, x2 â�� 0.142, x3 â�� 0.288, and x4 â�� 0.202. This yields the same ranking of pages as the earlier computation, but the scores are slightly diï¬�erent. Example 2 shows more explicitly the advantages of using M in place of A. Example 2: As a second example, for the web of Figure 2.2 with m = 0.15 we obtain the matrix M = ï£® ï£¯ ï£° 0.03 0.88 0.03 0.03 0.03 0.88 0.03 0.03 0.03 0.03 0.03 0.03 0.03 0.88 0.455 0.03 0.03 0.88 0.03 0.455 0.03 0.03 0.03 0.03 0.03 ï£¹ ï£º ï£» (3.3) . The space V1(M) is indeed one-dimensional, with normalized eigenvector components of x1 = 0.2, x2 = 0.2, x3 = 0.285, x4 = 0.285, and x5 = 0.03. The modiï¬�cation, using M instead of A, allows us to compare pages in diï¬�erent subwebs. Each entry Mij of M deï¬�ned by equation (3.1) is strictly positive, which motivates the following deï¬�nition. Definition 3.1. A matrix M is positive if Mij > 0 for all i and j. This is the key property that guarantees dim(V1(M)) = 1, which we prove in the next section.THE $25,000,000,000 EIGENVECTOR 7 3.2. Analysis of the matrix M. Note that Proposition 1 shows that V1(M) is nonempty since M is stochastic . The goal of this section is to show that V1(M) is in fact one-dimensional. This is a consequence of the following two propositions. Proposition 2. If M is positive and column-stochastic, then any eigenvector in V1(M) has all positive or all negative components. Proof. We use proof by contradiction. First note that in the standard triangle inequality | P i yi â�¥ | P i |yi | (with all yi real) the inequality is strict when the yi are of mixed sign. Suppose x â�� V1(M) contains elements of mixed sign. From x = Mx we have xi = Pn j=1 Mijxj and the summands Mijxj are of mixed sign (since Mij > 0). As a result we have a strict inequality |xi = | nX j=1 Mijxj > nX j=1 Mij |xj |. (3.4) Sum both sides of inequality (3.4) from i = 1 to i = n, and swap the i and j summations. Then use the fact that M is column-stochastic ( P i Mij = 1 for all j) to ï¬�nd nX i=1 |xi > | nX i=1 nX j=1 Mij |xj | = nX j=1 nX i=1 Mij ! |xj | = nX j=1 |xj |, a contradiction. Hence x cannot contain both positive and negative elements. If xi â�¥ 0 for all i (and not all xi are zero) then xi > 0 follows immediately from xi = Pn j=1 Mijxj and Mij > 0. Similarly xi â�¤ 0 for all i implies that each xi < 0. The following proposition will also be useful for analyzing dim(V1(M)): Proposition 3. Let v and w be linearly independent vectors in lR m , m â�¥ 2. Then, for some values of s and t that are not both zero, the vector x = sv + tw has both positive and negative components. Proof. Linear independence implies neither v nor w is zero. Let d = P i vi If d = 0 . then v must contain components of mixed sign, and taking s = 1 and t = 0 yields the conclusion. If d 6= 0 set s = â�� P i wi d P , t = 1, and x = sv + tw. Since v and w are independent x =6 0. However, i xi = 0. We conclude that x has both positive and negative components. We can now prove that using M in place of A yields an unambiguous ranking for any web with no dangling nodes. Lemma 3.2. If M is positive and column-stochastic then V1(M) has dimension 1. Proof. We again use proof by contradiction. Suppose there are two linearly independent eigenvectors v and w in the subspace V1(M). For any real numbers s and t that are not both zero, the nonzero vector x = sv + tw must be in V1(M), and so have components that are all negative or all positive. But by Proposition 3, for some choice of s and t the vector x must contain components of mixed sign, a contradiction. We conclude that V1(M) cannot contain two linearly independent vectors, and so has dimension one. Lemma 3.2 provides the â��punchlineâ�� for our analysis of the ranking algorithm using the matrix M (for 0 < m < 1). The space V1(M) is one-dimensional, and moreover, the relevant eigenvectors have entirely positive or negative components. We are thus guaranteed the existence of a unique eigenvector x â�� V1(M) with positive components such that P i xi = 1. Exercise 7. Prove that if A is an n Ã� n column-stochastic matrix and 0 â�¤ m â�¤ 1, then M = (1 â�� m)A + mS is also a column-stochastic matrix. Exercise 8. Show that the product of two column-stochastic matrices is also column-stochastic. Exercise 9. Show that a page with no backlinks is given importance score m n by formula (3.2). Exercise 10. Suppose that A is the link matrix for a strongly connected web of n pages (any page can be reached from any other page by following a ï¬�nite number of links). Show that dim(V1(A)) = 1 as follows. Let (Ak )ij denote the (i, j)-entry of Ak . â�¢ Note that page i can be reached from page j in one step if and only Aij > 0 (since Aij > 0 means thereâ��s a link from j to i!) Show that (A2 )ij > 0 if and only if page i can be reached from page j in exactly two steps. Hint: (A2 )ij = P k AikAkj ; all Aij are non-negative, so (A2 )ij > 0 implies that for some k both Aik and Akj are positive.8 K. BRYAN AND T. LEISE â�¢ Show more generally that (Ap )ij > 0 if and only if page i can be reached from page j in EXACTLY p steps. â�¢ Argue that (I + A + A2 + Â· Â· Â· + Ap )ij > 0 if and only if page i can be reached from page j in p or fewer steps (note p = 0 is a legitimate choiceâ��any page can be reached from itself in zero steps!) â�¢ Explain why I + A + A2 + Â· Â· Â· + Anâ��1 is a positive matrix if the web is strongly connected. â�¢ Use the last part (and Exercise 8) so show that B = 1 n (I + A + A2 + Â· Â· Â· + Anâ��1 ) is positive and column-stochastic (and hence by Lemma 3.2, dim(V1(B)) = 1). â�¢ Show that if x â�� V1(A) then x â�� V1(B). Why does this imply that dim(V1(A)) = 1? Exercise 11. Consider again the web in Figure 2.1, with the addition of a page 5 that links to page 3, where page 3 also links to page 5. Calculate the new ranking by ï¬�nding the eigenvector of M (corresponding to Î» = 1) that has positive components summing to one. Use m = 0.15. Exercise 12. Add a sixth page that links to every page of the web in the previous exercise, but to which no other page links. Rank the pages using A, then using M with m = 0.15, and compare the results. Exercise 13. Construct a web consisting of two or more subwebs and determine the ranking given by formula (3.1). At present the web contains at least eight billion pagesâ��how does one compute an eigenvector for an eight billion by eight billion matrix? One reasonable approach is an iterative procedure called the power method (along with modiï¬�cations) that we will now examine for the special case at hand. It is worth noting that there is much additional analysis one can do, and many improved methods for the computation of PageRank. The reference [7] provides a typical example and additional references. 4. Computing the Importance Score Eigenvector. The rough idea behind the power method 2 for computing an eigenvector of a matrix M is this: One starts with a â��typicalâ�� vector x0, then generates the sequence xk = Mxkâ��1 (so xk = Mk x0) and lets k approaches inï¬�nity. The vector xk is, to good approximation, an eigenvector for the dominant (largest magnitude) eigenvalue of M. However, depending on the magnitude of this eigenvalue, the vector xk may also grow without bound or decay to the zero vector. One thus typically rescales at each iteration, say by computing xk = Mxkâ��1 kMxkâ��1k , where k Â· k can be any vector norm. The method generally requires that the corresponding eigenspace be one-dimensional, a condition that is satisï¬�ed in the case when M is deï¬�ned by equation (3.1). To use the power method on the matrices M that arise from the web ranking problem we would generally need to know that any other eigenvalues Î» of M satisfy |Î»| < 1. This assures that the power method will converge to the eigenvector we want. Actually, the following proposition provides what we need, with no reference to any other eigenvalues of M! Definition 4.1. The 1-norm of a vector v is kvk1 = P i |vi .| Proposition 4. Let M be a positive column-stochastic n Ã� n matrix and let V denote the subspace of lR n consisting of vectors v such that P j vj = 0. Then Mv â�� V for any v â�� V , and kMvk1 â�¤ ckvk1 for any v â�� V , where c = max1â�¤jâ�¤n |1 â�� 2 min1â�¤iâ�¤n Mij | < 1. Proof. To see that Mv â�� V is straightforward: Let w = Mv, so that wi = Pn j=1 Mijvj and nX i=1 wi = nX i=1 nX j=1 Mijvj = nX j=1 vj nX i=1 Mij ! = nX j=1 vj = 0. Hence w = Mv â�� V . To prove the bound in the proposition note that kwk1 = nX i=1 eiwi = nX i=1 ei ï£« ï£ nX j=1 Mijvj ï£¶ ï£¸ , 2 See [15] for a general introduction to the power method and the use of spectral decomposition to ï¬�nd the rate of convergence of the vectors xk = Mk x0.THE $25,000,000,000 EIGENVECTOR 9 where ei = sgn(wi). Note that the ei are not all of one sign, since P i wi = 0 (unless w â�¡ 0 in which case the bound clearly holds). Reverse the double sum to obtain kwk1 = nX j=1 vj nX i=1 eiMij ! = nX j=1 ajvj , (4.1) where aj = Pn i=1 eiMij . Since the ei are of mixed sign and P i Mij = 1 with 0 < Mij < 1, it is easy to see that â��1 < â��1 + 2 min 1â�¤iâ�¤n Mij â�¤ aj â�¤ 1 â�� 2 min 1â�¤iâ�¤n Mij < 1. We can thus bound |aj | â�¤ |1 â�� 2 min 1â�¤iâ�¤n Mij | < 1. Let c = max1â�¤jâ�¤n |1 â�� 2 min1â�¤iâ�¤n Mij |. Observe that c < 1 and |aj | â�¤ c for all j. From equation (4.1) we have kwk1 = nX j=1 ajvj = nX j=1 ajvj â�¥ nX j=1 |aj ||vj | â�¤ c nX j=1 |vj | = ckvk1, which proves the proposition. Proposition 4 sets the stage for the following proposition. Proposition 5. Every positive column-stochastic matrix M has a unique vector q with positive components such that Mq = q with kqk1 = 1. The vector q can be computed as q = limkâ��â�� Mk x0 for any initial guess x0 with positive components such that kx0k1 = 1. Proof. From Proposition 1 the matrix M has 1 as an eigenvalue and by Lemma 3.2 the subspace V1(M) is one-dimensional. Also, all non-zero vectors in V1(M) have entirely positive or negative components. It is clear that there is a unique vector q â�� V1(M) with positive components such that P i qi = 1. Let x0 be any vector in lR n with positive components such that kx0k1 = 1. We can write x0 = q + v where v â�� V (V as in Proposition 4). We ï¬�nd that Mk x0 = Mk q + Mk v = q + Mk v. As a result Mk x0 â�� q = Mk v. (4.2) A straightforward induction and Proposition 4 shows that kMk vk1 â�¤ c k kvk1 for 0 â�¤ c < 1 (c as in Proposition 4) and so limkâ��â�� kMk vk1 = 0. From equation (4.2) we conclude that limkâ��â�� Mk x0 = q. Example: Let M be the matrix deï¬�ned by equation (3.3) for the web of Figure 2.2. We take x0 = [0.24, 0.31, 0.08, 0.18, 0.19] T as an initial guess; recall that we had q = [0.2, 0.2, 0.285, 0.285, 0.03] T . The table below shows the value of kMk x0 â�� qk1 for several values of k, as well as the ratio kMk x0 â�� qk1/kMkâ��1 x0 â�� qk1. Compare this ratio to c from Proposition 4, which in this case is 0.94. k kMk x0 â�� qk1 kMk x0â��qk1 kMkâ��1x0â��qk1 0 0.62 1 0.255 0.411 5 0.133 0.85 10 0.0591 0.85 50 8.87 Ã� 10 â��5 0.85 It is clear that the bound kMk x0 â�� qk1 â�¤ c k kx0 â�� qk1 is rather pessimistic (note 0.85 is the value 1 â�� m, and 0.85 turns out to be the second largest eigenvalue for M). One can show that in general the power method will converge asymptotically according to kMxk â�� qk1 â�� |Î»2|kx â�� qk1, where Î»210 K. BRYAN AND T. LEISE is the second largest eigenvalue of M. Moreover, for M of the form M = (1 â�� m)A + mS with A column-stochastic and all Sij = 1/n it can be shown that |Î»2| â�¤ 1 â��m (see, e.g., [1], Theorem 5.10). As a result, the power method will converge much more rapidly than indicated by c k kx0 â�� qk1. Nonetheless, the value of c in Proposition 4 provides a very simple bound on the convergence of the power method here. It is easy to see that since all entries of M are at least m/n, we will always have c â�¤ 1 â�� 2m/n in Proposition 4. As a practical matter, note that the n Ã� n positive matrix M has no non-zero elements, so the multiplication Mv for v â�� lR n will typically take O(n 2 ) multiplications and additions, a formidable computation if n = 8, 000, 000, 000. But equation (3.2) shows that if x is positive with kxk1 = 1 then the multiplication Mx is equivalent to (1 â�� m)Ax + ms. This is a far more eï¬�cient computation, since A can be expected to contain mostly zeros (most web pages link to only a few other pages). Weâ��ve now proved our main theorem: Theorem 4.2. The matrix M deï¬�ned by (3.1) for a web with no dangling nodes will always be a positive column-stochastic matrix and so have a unique q with positive components such that Mq = q and P i qi = 1. The vector q may be computed as the limit of iterations xk = (1 â�� m)Axkâ��1 + ms, where x0 is any initial vector with positive components and kx0k1 = 1. The eigenvector x deï¬�ned by equation (3.2) also has a probabilistic interpretation. Consider a web-surfer on a web of n pages with no dangling nodes. The surfer begins at some web page (it doesnâ��t matter where) and randomly moves from web page to web page according to the following procedure: If the surfer is currently at a page with r outgoing links, he either randomly chooses any one of these links with uniform probability 1â��m r OR he jumps to any randomly selected page on the web, each with probability m n (note that r 1â��m r +n m n = 1, so this accounts for everything he can do). The surfer repeats this page-hopping procedure ad inï¬�nitum. The component xj of the normalized vector x in equation (3.2) is the fraction of time that the surfer spends, in the long run, on page j of the web. More important pages tend to be linked to by many other pages and so the surfer hits those most often. Exercise 14. For the web in Exercise 11, compute the values of kMk x0 â��qk1 and kMk x0â��qk1 kMkâ��1x0â��qk1 for k = 1, 5, 10, 50, using an initial guess x0 not too close to the actual eigenvector q (so that you can watch the convergence). Determine c = max1â�¤jâ�¤n |1 â�� 2 min1â�¤iâ�¤n Mij | and the absolute value of the second largest eigenvalue of M. Exercise 15. To see why the second largest eigenvalue plays a role in bounding kMk x0â��qk1 kMkâ��1x0â��qk1 , consider an n Ã� n positive column-stochastic matrix M that is diagonalizable. Let x0 be any vector with non-negative components that sum to one. Since M is diagonalizable, we can create a basis of eigenvectors {q, v1, . . . , vnâ��1}, where q is the steady state vector, and then write x0 = aq + Pnâ��1 k=1 bkvk. Determine Mk x0, and then show that a = 1 and the sum of the components of each vk must equal 0. Next apply Proposition 4 to prove that, except for the non-repeated eigenvalue Î» = 1, the other eigenvalues are all strictly less than one in absolute value. Use this to evaluate limkâ��â�� kMk x0â��qk1 kMkâ��1x0â��qk1 . Exercise 16. Consider the link matrix A = ï£® ï£° 0 1 2 1 2 0 0 1 2 1 1 2 0 ï£¹ ï£» . Show that M = (1 â�� m)A + mS (all Sij = 1/3) is not diagonalizable for 0 â�¤ m < 1. Exercise 17. How should the value of m be chosen? How does this choice aï¬�ect the rankings and the computation time? REFERENCES [1] A. Berman and R. Plemmons, Nonnegative Matrices in the Mathematical Sciences, Academic Press, New York, 1979. [2] M. W. Berry and M. Browne, Understanding Search Engines: Mathematical Modeling and Text Retrieval, Second Edition, SIAM, Philadelphia, 2005. [3] M. Bianchini, M. Gori, and F. Scarselli, Inside PageRank, ACM Trans. Internet Tech., 5 (2005), pp. 92â��128.THE $25,000,000,000 EIGENVECTOR 11 [4] S. Brin and L. Page, The anatomy of a large-scale hypertextual web search engine, http : //www â�� db.stanford.edu/ â�¼ backrub/google.html (accessed August 1, 2005). [5] A. Farahat, T. Lofaro, J. C. Miller, G. Rae, and L.A. Ward, Authority Rankings from HITS, PageRank, and SALSA: Existence, Uniqueness, and Eï¬�ect of Initialization, SIAM J. Sci. Comput., 27 (2006), pp. 1181-1201. [6] A. Hill, Google Inside Out, Maximum PC, April 2004, pp. 44-48. [7] S. Kamvar, T. Haveliwala, and G. Golub, Adaptive methods for the computation of PageRank, Linear Algebra Appl., 386 (2004), pp. 51â��65. [8] A. N. Langville and C. D. Meyer, A survey of eigenvector methods of web information retrieval, SIAM Review, 47 (2005), pp. 135-161. [9] A. N. Langville and C. D. Meyer, Deeper inside PageRank, Internet Math., 1 (2005), pp. 335â��380. [10] C. D. Meyer, Matrix Analysis and Applied Linear Algebra, SIAM, Philadelphia, 2000. [11] Cleve Moler, The worldâ��s largest matrix computation, http : //www.mathworks.com/company/newsletters/news notes /clevescorner/oct02 cleve.html (accessed August 1, 2005). [12] Mostafa, J., Seeking better web searches, Sci. Amer., 292 (2005), pp. 66-73. [13] Sara Robinson, The Ongoing search for eï¬�cient web search algorithms, SIAM News, 37 (Nov 2004). [14] Ian Rogers, The Google Pagerank algorithm and how it works, http : //www.iprcom.com/papers/pagerank/ (accessed August 1, 2005). [15] W. J. Stewart, An Introduction to the Numerical Solution of Markov Chains, Princeton University Press, Princeton, 1994.

You need to login to post a comment.