Matrices digraphs markov chains their use by google
Download
1 / 37

Matrices, Digraphs, Markov Chains Their Use by Google - PowerPoint PPT Presentation


  • 179 Views
  • Uploaded on

Matrices, Digraphs, Markov Chains & Their Use by Google. Leslie Hogben Iowa State University and American Institute of Mathematics. Bay Area Mathematical Adventures February 27, 2008. With material from Becky Atherton. Outline. Matrices Markov Chains Digraphs Google’s PageRank.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Matrices, Digraphs, Markov Chains Their Use by Google' - creola


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Matrices digraphs markov chains their use by google l.jpg

Matrices, Digraphs, Markov Chains & Their Use by Google

Leslie Hogben

Iowa State University and

American Institute of Mathematics

Bay Area Mathematical Adventures

February 27, 2008


Slide2 l.jpg

With material from Becky Atherton

Outline

  • Matrices

  • Markov Chains

  • Digraphs

  • Google’s PageRank


Introduction to matrices l.jpg
Introduction to Matrices

  • A matrix is a rectangular array of numbers

  • Matrices are used to solve systems of equations

  • Matrices are easy for computers to work with


Matrix arithmetic l.jpg
Matrix arithmetic

  • Matrix Addition

  • Matrix Multiplication


Introduction to markov chains l.jpg
Introduction to Markov Chains

  • At each time period, every object in the system is in exactly one state, one of 1,…,n.

  • Objects move according to the transition probabilities: the probability of going from state j to state i is tij

  • Transition probabilities do not change over time.


The transition matrix of a markov chain l.jpg
The transition matrix of a Markov chain

  • T = [tij] is an nn matrix.

  • Each entry tij is the probability of moving from state j to state i.

  • 0 tij  1

  • Sum of entries in a column must be equal to 1 (stochastic).


Example customers can choose from three major grocery stores h mart freddy s and shopper s market l.jpg
Example:Customers can choose from three major grocery stores: H-Mart, Freddy’s and Shopper’s Market.

  • Each year H-Mart retains 80% of its customers, while losing 15% to Freddy’s and 5% to Shopper’s Market.

  • Freddy’s retains 65% of its customers, loses 20% to H-Mart and 15% to Shopper’s Market.

  • Shopper’s Market keeps 70% of its customers, loses 20% to H-Mart and 10% to Freddy’s.


Example the transition matrix l.jpg
Example:The transition matrix.


Slide9 l.jpg

Look at the calculation used to determine the probability of starting at H-Mart and shopping there two year later:

We can obtain the same result by multiplying row one by column one in the transition matrix:


Slide10 l.jpg

  • Compute the probability of shopping at each store 2 years after shopping at Shopper’s Market:


Slide11 l.jpg

If the initial distribution was evenly distributed between H-Mart, Freddy’s, and Shpper’s market, compute the distribution after two years:


Slide12 l.jpg

To utilize a Markov chain to compute probabilities, we need to know the initial probability vector q(0)

If there are n states, let the initial probability

vector be where

  • qiis the probability of being in state i initially

  • All entries 0 qi  1

  • Column sum = 1


Example l.jpg

What happens after 10 years? to know the

Example:


Slide14 l.jpg

  • Let q to know the (k) be the probability distribution after k steps.

  • We are iterating q(k+1) = T q(k)

  • Eventually, for a large enough k, q(k+1) = q(k) = s

  • Resulting in s = T s

  • s is called a steady state vector

  • s =q(k) is an eigenvector for eigenvalue 1


Slide15 l.jpg
In the grocery example, there was a unique steady state vector s, and T q(k) s. This does not need to be the case:


How can we guarantee convergence to an unique steady state vector regardless of initial conditions l.jpg
How can we guarantee convergence to an unique steady state vector regardless of initial conditions?

  • One way is by having a regular transition matrix

  • A nonnegative matrix is regular if some power of the matrix has only nonzero entries.


Digraphs l.jpg
Digraphs vector regardless of initial conditions?

  • A directed graph (digraph) is a set of vertices (nodes) and a set of directed edges (arcs) between vertices

  • The arcs indicate relationships between nodes

  • Digraphs can be used as models, e.g.

    • cities and airline routes between them

    • web pages and links


How matrices markov chains and digraphs are used by google l.jpg
How Matrices, Markov Chains and Digraphs are used by Google vector regardless of initial conditions?


How does google work l.jpg
How does Google work? vector regardless of initial conditions?

  • Robot web crawlers find web pages

  • Pages are indexed & cataloged

  • Pages are assigned PageRank values

    • PageRank is a program that prioritizes pages

    • Developed by Larry Page & Sergey Brin in 1998

  • When pages are identified in response to a query, they are ranked by PageRank value


Why is pagerank important l.jpg
Why is PageRank important? vector regardless of initial conditions?

  • Only a few years ago users waited much longer for search engines to return results to their queries.

  • When a search engine finally responded, the returned list had many links to information that was irrelevant, and useless links invariably appeared at or near the top of the list, while useful links were deeply buried.

  • The Web's information is not structured like information in the organized databases and document collections - it is self organized.

  • The enormous size of the Web, currently containing ~10^9 pages, completely overwhelmed traditional information retrieval (IR) techniques.


Slide21 l.jpg

  • By 1997 it was clear that IR technology of the past wasn't well suited for Web search

  • Researchers set out to devise new approaches.

  • Two big ideas emerged, each capitalizing on the link structure of the Web to differentiate between relevant information and fluff.

  • One approach, HITS (Hypertext Induced Topic Search), was introduced by Jon Kleinberg

  • The other, which changed everything, is Google's PageRank that was developed by Sergey Brin and Larry Page


How are pagerank values assigned l.jpg
How are PageRank values assigned? well suited for Web search

  • Number of links to and from a page give information about the importance of a page.

    • More inlinks  the more important the page

    • Inlinks from “good” pages carry more weight than inlinks from “weaker” pages.

    • If a page points to several pages, its weight is distributed proportionally.


Slide23 l.jpg

1 well suited for Web search

2

3

6

5

4

  • Imagine the World Wide Web as a directed graph (digraph)

    • Each page is a vertex

    • Each link is an arc

  • A sample 6 page web (6 vertex digraph)


Slide24 l.jpg

PageRank defines the rank of page well suited for Web searchi recursively by

rj is the rank of page j

Ii is the set of pages that point into page i

Oj is the set of pages that have outlinks from page j


Slide25 l.jpg

1 well suited for Web search

2

3

6

5

4

  • For example, the rank of page 2 in our sample web:


Slide26 l.jpg

Since this is a recursive definition, PageRank assigns an initial ranking equally to all pages:

  • then iterates


Process can be written using matrix notation l.jpg
Process can be written using matrix notation. initial ranking equally to all pages:

  • Let q(k) be the PageRank vector at the kth iteration

  • Let T be the transition matrix for the web

  • Then q(k+1)= T q(k)

  • T is the matrix such that tij is the probability of moving from page j to page i in one time step

  • Based on the assumption that all outlinks are equally likely to be selected.


Using our 6 node sample web l.jpg

1 initial ranking equally to all pages:

2

3

6

5

4

Using our 6-node sample web:

  • Transition matrix:


Slide29 l.jpg

To eliminate dangling nodes and obtain a stochastic matrix, replace a column of zeros with a column of 1/n’s, where n is the number of web pages.


Slide30 l.jpg

Web’s nature is such that replace a column of zeros with a column of 1/T would not be regular

Brin & Page force the transition matrix to be regular by making sure every entry satisfies 0 < tij < 1

Create perturbation matrix E having all entries equal to 1/n

Form “Google Matrix”:


Using 0 85 for our 6 node sample web l.jpg
Using replace a column of zeros with a column of 1/ = 0.85 for our 6-node sample web:



Slide33 l.jpg

Stationary vector for our 6-node sample web: determine the stationary vector:


How does google use this stationary vector l.jpg

Query requests term 1 or term 2 determine the stationary vector:

Inverted file storage is accessed

Term 1  doc 3, doc 2, doc 6

Term 2  doc 1, doc 3

Relevancy set is {1, 2, 3, 6}

s1=.2066, s2=.1770, s3=.1773, s6=.1309

Doc 1 deemed most important

How does Google use this stationary vector?


Slide35 l.jpg

Adding a perturbation matrix seems reasonable, based on the “random jump” idea- user types in a URL

This is only the basic idea behind Google, which has many refinements we have ignored

PageRank as originally conceived and described here ignores the “Back” button

PageRank currently undergoing development

Details of PageRank’s operations and value of  are a trade secret.


Slide36 l.jpg

Updates to Google matrix done periodically “r

Google matrix is HUGE

Sophisticated numerical methods are be used



ad