The chain of Andrej Markov and its applications NETWORKS goes to school - April 23, 2018 Jan-Pieter Dorsman.

Slides:



Advertisements
Similar presentations
Markov chains. Probability distributions Exercise 1.Use the Matlab function nchoosek(n,k) to implement a generic function BinomialPMF(k,n,p) for calculating.
Advertisements

ST3236: Stochastic Process Tutorial 3 TA: Mar Choong Hock Exercises: 4.
Markov Models.
Matrices, Digraphs, Markov Chains & Their Use by Google Leslie Hogben Iowa State University and American Institute of Mathematics Leslie Hogben Iowa State.
Link Analysis: PageRank
Google’s PageRank By Zack Kenz. Outline Intro to web searching Review of Linear Algebra Weather example Basics of PageRank Solving the Google Matrix Calculating.
1 Markov Chains (covered in Sections 1.1, 1.6, 6.3, and 9.4)
. Computational Genomics Lecture 7c Hidden Markov Models (HMMs) © Ydo Wexler & Dan Geiger (Technion) and by Nir Friedman (HU) Modified by Benny Chor (TAU)
How PageRank Works Ketan Mayer-Patel University of North Carolina January 31, 2011.
Entropy Rates of a Stochastic Process
Hidden Markov Models Fundamentals and applications to bioinformatics.
Tutorial 8 Markov Chains. 2  Consider a sequence of random variables X 0, X 1, …, and the set of possible values of these random variables is {0, 1,
1. Markov Process 2. States 3. Transition Matrix 4. Stochastic Matrix 5. Distribution Matrix 6. Distribution Matrix for n 7. Interpretation of the Entries.
What is the probability that the great-grandchild of middle class parents will be middle class? Markov chains can be used to answer these types of problems.
More on Rankings. Query-independent LAR Have an a-priori ordering of the web pages Q: Set of pages that contain the keywords in the query q Present the.
Experiments with MATLAB Experiments with MATLAB Google PageRank Roger Jang ( 張智星 ) CSIE Dept, National Taiwan University, Taiwan
DATA MINING LECTURE 12 Link Analysis Ranking Random walks.
Introduction to PageRank Algorithm and Programming Assignment 1 CSC4170 Web Intelligence and Social Computing Tutorial 4 Tutor: Tom Chao Zhou
1 Markov Chains Tom Finke. 2 Overview Outline of presentation The Markov chain model –Description and solution of simplest chain –Study of steady state.
Pádraig Cunningham University College Dublin Matrix Tutorial Transition Matrices Graphs Random Walks.
Introduction to Information Retrieval Introduction to Information Retrieval Hinrich Schütze and Christina Lioma Lecture 21: Link Analysis.
Link Analysis, PageRank and Search Engines on the Web
Markov Models. Markov Chain A sequence of states: X 1, X 2, X 3, … Usually over time The transition from X t-1 to X t depends only on X t-1 (Markov Property).
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 60 Chapter 8 Markov Processes.
The Further Mathematics network
More Algorithms for Trees and Graphs Eric Roberts CS 106B March 11, 2013.
Motivation When searching for information on the WWW, user perform a query to a search engine. The engine return, as the query’s result, a list of Web.
Piyush Kumar (Lecture 2: PageRank) Welcome to COT5405.
Methods of Computing the PageRank Vector Tom Mangan.
Roshnika Fernando P AGE R ANK. W HY P AGE R ANK ?  The internet is a global system of networks linking to smaller networks.  This system keeps growing,
CS315 – Link Analysis Three generations of Search Engines Anchor text Link analysis for ranking Pagerank HITS.
The PageRank Citation Ranking: Bringing Order to the Web Lawrence Page, Sergey Brin, Rajeev Motwani, Terry Winograd Presented by Anca Leuca, Antonis Makropoulos.
CHAPTER 15 SECTION 1 – 2 Markov Models. Outline Probabilistic Inference Bayes Rule Markov Chains.
Day 3 Markov Chains For some interesting demonstrations of this topic visit: 2005/Tools/index.htm.
CompSci 100E 3.1 Random Walks “A drunk man wil l find his way home, but a drunk bird may get lost forever”  – Shizuo Kakutani Suppose you proceed randomly.
Ch 14. Link Analysis Padmini Srinivasan Computer Science Department
How works M. Ram Murty, FRSC Queen’s Research Chair Queen’s University or How linear algebra powers the search engine.
The generalization of Bayes for continuous densities is that we have some density f(y|  ) where y and  are vectors of data and parameters with  being.
What is Matrix Multiplication? Matrix multiplication is the process of multiplying two matrices together to get another matrix. It differs from scalar.
10.1 Properties of Markov Chains In this section, we will study a concept that utilizes a mathematical model that combines probability and matrices to.
Stochastic Processes and Transition Probabilities D Nagesh Kumar, IISc Water Resources Planning and Management: M6L5 Stochastic Optimization.
CompSci 100E 4.1 Google’s PageRank web site xxx web site yyyy web site a b c d e f g web site pdq pdq.. web site yyyy web site a b c d e f g web site xxx.
Ljiljana Rajačić. Page Rank Web as a directed graph  Nodes: Web pages  Edges: Hyperlinks 2 / 25 Ljiljana Rajačić.
Revision on Matrices Finding the order of, Addition, Subtraction and the Inverse of Matices.
Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 60 Chapter 8 Markov Processes.
Random Sampling Algorithms with Applications Kyomin Jung KAIST Aug ERC Workshop.
Visual Recognition Tutorial1 Markov models Hidden Markov models Forward/Backward algorithm Viterbi algorithm Baum-Welch estimation algorithm Hidden.
PageRank Google : its search listings always seemed deliver the “good stuff” up front. 1 2 Part of the magic behind it is its PageRank Algorithm PageRank™
Mathematics of the Web Prof. Sara Billey University of Washington.
8.1 REVIEW: COMPARING FRACTIONS Monday, February 24 th.
Jeffrey D. Ullman Stanford University.  Web pages are important if people visit them a lot.  But we can’t watch everybody using the Web.  A good surrogate.
Warmup 11/2/16 Objective Tonight’s Homework
Fun with Paper Lesson 9. Folding an umbrella Hosted by Seri.
OCR A-Level Computing - Unit 01 Computer Systems Lesson 1. 3
Matrix. Matrix Matrix Matrix (plural matrices) . a collection of numbers Matrix (plural matrices)  a collection of numbers arranged in a rectangle.
CMSC201 Computer Science I for Majors Lecture 23 – Sorting
Prof. Dr. Holger Schlingloff 1,2 Dr. Esteban Pavese 1
Tutorial: Markov Chains
Search Engines and Link Analysis on the Web
PageRank and Markov Chains
Lesson 11.4 Alg-1 Write the recursive formula for each sequence
Iterative Aggregation Disaggregation
CS 188: Artificial Intelligence Spring 2007
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Courtesy of J. Akinpelu, Anis Koubâa, Y. Wexler, & D. Geiger
Matrix Algebra (2).
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval"
Subscript and Summation Notation
Test 2 Review The test will consist of 3 sections.
Weather Forecast Cutouts
Presentation transcript:

The chain of Andrej Markov and its applications NETWORKS goes to school - April 23, 2018 Jan-Pieter Dorsman

Some history… Andrej Andrejevitz Markov sr. (1856-1922) Markov’s inequality Markov numbers Markov networks Markov processes Markov chains Andrej Andrejevitz Markov jr. (1903-1979) Markov’s principle Markov algoritm Markov’s rule NETWORKS GOES TO SCHOOL

Some history… Andrej Andrejevitz Markov sr. (1856-1922) Markov’s inequality Markov numbers Markov networks Markov processes Markov chains Andrej Andrejevitz Markov jr. (1903-1979) Markov’s principle Markov algoritm Markov’s rule NETWORKS GOES TO SCHOOL

Markov chain A Markov chain describes something that moves step-by-step through a number of states and exhibits transitions from one state to another (or the same) state. In particular, the so-called Markov property holds: “The future, given the present, does not depend on the past.” NETWORKS GOES TO SCHOOL

The weather as Markov chain The situation: If it is sunny today, it will also be sunny tomorrow with probability 90%, but rainy with 10% probability. If it is rainy today, it will be sunny tomorrow with 40% probability, but it will remain rainy with 60% probability. This is a Markov chain with two possible states: sunny and rainy. We can summarise this situation in a graph: 10% Sunny Rainy 90% 60% 40% NETWORKS GOES TO SCHOOL

State space: {Sunny, Rainy} To 10% Sunny Rainy 90% 60% 40% We can also summarise this in a matrix, which we call P. P is then called the one-step transition matrix. State space: {Sunny, Rainy} To Sunny Rainy From Sunny Rainy Possible questions we could ask: What is the probability, if it is rainy today, that it will be sunny the day after tomorrow? If it is sunny on Monday, how many sunny days will we have on average from Monday until (and including) Thursday? What percentage of time will it be sunny in the long run? 𝑃= 0.9 0.1 0.4 0.6 NETWORKS GOES TO SCHOOL

10% Sunny Rainy 90% 60% 40% Q: Wat is the probability, if it is rainy today, that it will be sunny the day after tomorrow? A: If sunny tomorrow (prob. 0.4), then day after tomorrow sunny with prob. 0.9. 0.4x0.9 = 0.36 If rainy tomorrow (prob 0.6), then day after tomorrow sunny with prob. 0.4. 0.6x0.4 = 0.24 + In total: 0.60 Q: But what if it didn’t say ‘day after tomorrow’, but ‘in eight days from now’? A: To this end, we use so-called matrix-multiplication: From Sunny Rainy From Sunny Rainy This is the two-step transition matrix! 𝑃 2 =𝑃×𝑃= 0.9 0.1 0.4 0.6 × 0.9 0.1 0.4 0.6 = 0.9×0.9+0.1×0.4 0.9×0.1+0.1×0.6 0.4×0.9+0.6×0.4 0.4×0.1+0.6×0.6 = 0.85 0.15 0.6 0.4 NETWORKS GOES TO SCHOOL

10% Sunny Rainy 90% 60% 40% 𝑃 4 =𝑃×𝑃×𝑃×𝑃= 𝑃 2 × 𝑃 2 Q: Wat is the probability, if it is rainy today, that it will be sunny in eight days from now? A: To this end, we use so-called matrix-multiplication: So the probability is 0.797. Hard to compute this by mental calculation! 𝑃 4 =𝑃×𝑃×𝑃×𝑃= 𝑃 2 × 𝑃 2 = 0.85 0.15 0.6 0.4 × 0.85 0.15 0.6 0.4 = 0.8125 0.1875 0.75 0.25 𝑃 8 = 𝑃 4 × 𝑃 4 = 0.8125 0.1875 0.75 0.25 × 0.8125 0.1875 0.75 0.25 = 0.801 0.199 0.797 0.203 NETWORKS GOES TO SCHOOL

10% Sunny Rainy 90% 60% 40% Q: If it is sunny on Monday, how many sunny days will we have on average between Monday until (and including) Thursday? A: Again, we check our matrices: Tuesday Wednesday Thursday If it sunny on Monday, then we will have on average 2.575 sunny days between Tuesday until (and including) Thursday. So the answer is 3.575! 𝑃= 0.9 0.1 0.4 0.6 𝑃 2 = 0.85 0.15 0.6 0.4 𝑃 3 = 0.825 0.175 0.7 0.3 0.9 0.1 0.4 0.6 + 0.85 0.15 0.6 0.4 + 0.825 0.175 0.7 0.3 = 2.575 0.425 1.7 1.3 NETWORKS GOES TO SCHOOL

10% Sunny Rainy 90% 60% 40% Q: What percentage of time will it be sunny in the long run? A: Let’s have another look at the matrices… Wait a minute… what if we continue like this? If we would continue, we would obtain So the answer is 80%. The fine print: 0.8 and 0.2 together form the normalised left eigenvector of P corresponding to eigenvalue 1. 𝑃= 0.9 0.1 0.4 0.6 𝑃 2 = 0.85 0.15 0.6 0.4 𝑃 3 = 0.825 0.175 0.7 0.3 𝑃 4 = 0.8125 0.1875 0.75 0.25 𝑃 8 = 0.801 0.199 0.797 0.203 𝑃 10 = 0.800195 0.199805 0.799219 0.200781 𝑃 12 = 0.800049 0.199951 0.799805 0.2000195 𝑃 ∞ = 0.8 0.2 0.8 0.2 . NETWORKS GOES TO SCHOOL

The weather as Markov chain 10% Sunny Rainy 60% 20% 40% 30% 30% 30% 10% 20% 30% Cloudy 10% Stormy 40% 50% 20% 𝑃= 0.6 0.1 0.2 0.4 0.3 0 0.3 0.1 0.3 0.2 0 0.3 0.4 0.1 0.2 0.5 𝑃 ∞ = 0.351 0.220 0.351 0.220 0.321 0.108 0.321 0.108 0.351 0.220 0.351 0.220 0.321 0.108 0.321 0.108 If it is cloudy today, an arbitrary day in the distant future will be cloudy with probability 32.1%. But, it doesn’t matter what the state today is. If it is cloudy today, in the long run 32.1% of all days will be cloudy. But again, the state of today does not matter. NETWORKS GOES TO SCHOOL

The weather as Markov chain 10% Sunny Rainy 60% 20% 40% 30% 30% 10% Cloudy Stormy 100% 100% 𝑃= 0.6 0.1 0.2 0.4 0.3 0 0.3 0.1 0.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 𝑃 ∞ = 0.00 0.00 0.00 0.00 0.95 0.05 0.82 0.18 0.00 0.00 0.00 0.00 1.00 0.00 0.00 1.00 If it is cloudy today, an arbitrary day in the distant future will be cloudy with probability 100%. But, it really depends on today’s state of weather. We just do not know what percentage of time it will be cloudy in the future. It depends on the state of weather today. NETWORKS GOES TO SCHOOL

The weather as Markov chain 30% Sunny Rainy 40% 50% 70% 60% 60% Cloudy 50% Stormy 40% 𝑃= 0 0.3 0.4 0 0.7 0 0 0.6 0.5 0 0 0.6 0 0.5 0.4 0 If it is cloudy today, an arbitrary day in the distant future will be cloudy with probability 26.8%. It does not really depend on today’s weather. If it is sunny today, it will be cloudy 26.8% of the time in the long run. Also here, today’s weather does not really matter. 𝑃 100 = 0.454 0 0 0.464 0 0.546 0.536 0 0 0.464 0.454 0 0.536 0 0 0.546 𝑃 101 = 0 0.464 0.454 0 0.536 0 0 0.546 0.454 0 0 0.464 0 0.546 0.536 0 𝑃 102 = 0.454 0 0 0.464 0 0.546 0.536 0 0 0.464 0.454 0 0.536 0 0 0.546 NETWORKS GOES TO SCHOOL

Google’s search engine In a way, Google’s search engine is a mathematical function: f(x) = y. x is the search query y contains all websites where ‘x’ appears, presented in a certain sequence This function is determined by Google’s PageRank algorithm. This algorithm searches through a huge network! NETWORKS GOES TO SCHOOL

Internet: PageRank algorithm Idea 1: each incoming hyperlink is a ‘vote’ for a website. Websites A and B each get 1 votes. Websites C and D both get 2 votes. In shares: (0.167, 0.167, 0.33, 0.33) C & D are on top, A & B are on the bottom. Idea 2: a vote of an important website is worth more than a vote of a not so important website. NETWORKS GOES TO SCHOOL

Internet: PageRank algorithm Start with an arbitrary distribution of votes: (0.25, 0.25, 0.25, 0.25) Divide the votes of each website equally over the websites where the website links to. Repeat step 2 until the distribution of votes does not change anymore. NETWORKS GOES TO SCHOOL

Internet: PageRank algorithm (0.25, 0.25, 0.25, 0.25) A receives 0.125 votes from C B receives 0.125 votes from A C receives 0.25 votes from B and 0.25 votes from D D receives 0.125 votes from A and 0.125 votes from C (0.125, 0.125, 0.5, 0.25) NETWORKS GOES TO SCHOOL

Internet: PageRank algorithm (0.125, 0.125, 0.5, 0.25) A receives 0.25 votes from C B receives 0.0625 votes from A C receives 0.125 votes from B and 0.25 votes from D D receives 0.0625 votes from A and 0.25 votes from C (0.25, 0.0625, 0.375, 0.3125) NETWORKS GOES TO SCHOOL

Internet: PageRank algorithm ( 43 iterations down the road…) NETWORKS GOES TO SCHOOL

Internet: PageRank algorithm The final distribution is: (0.2, 0.1, 0.4, 0.3) Google orders the websites in the sequence C, D, A, B In fact, this is a hidden Markov chain with The PageRank algorithm is looking for the rows of 𝑃 ∞ . 𝑃= 0.0 0.5 0.0 0.0 0.0 0.5 1.0 0.0 0.5 0.0 0 0.0 0.0 0.5 1.0 0.0 𝑃 ∞ = 0.2 0.1 0.2 0.1 0.4 0.3 0.4 0.3 0.2 0.1 0.2 0.1 0.4 0.3 0.4 0.3 NETWORKS GOES TO SCHOOL

Internet: PageRank algorithm Google indexes not just 4 websites, but about 50 billion of them. Next to this, the internet-network is constantly changing! Websites appear, change and disappear. All this is stochastics. As users, we expect an answer in just a few milliseconds, so we need a fast algorithm anyway! All considerations for future research. NETWORKS GOES TO SCHOOL