EE266 Homework 3 Solutions
|
|
- Darlene Little
- 6 years ago
- Views:
Transcription
1 EE266, Spring Professor S. Lall EE266 Homework 3 Solutions 1. Second passage time. In this problem we will consider the following Markov chain. Note that self-loops are omitted from this figure. The transition matrix for this chain is P = This matrix is given in passage_time_data.m so you don t have to type it into MATLAB. We will compute several things about this Markov chain. Let the destination set be the single state E = {1}, and let the initial state be i = 2. Recall that the first passage time to the set E is τ E = min{t > 0 x t E} The kth passage time for a Markov chain is defined recursively as where τ (1) E = τ E. τ (k) E (k 1) = min{t > τ x t E}, (a) For the Markov chain above, compute and plot the distribution of the first passage time conditioned on the initial state, i.e., compute as a function of t. E f(t) = Prob(τ E = t x 0 = i) 1
2 f (b) One may calculate the distribution of the second passage time by constructing a new Markov chain, whose first passage time is equal to the second passage time of the original chain. What is the transition graph of this chain? (c) For t = 1, 2,..., use your construction to compute the distribution of the second passage time, which is s(t) = Prob(τ (2) E = t x 0 = i). Use your method to compute and plot this distribution also. (d) Plot the sum of s(t) and f(t), and also plot Prob(x t E). Explain what you see. (e) For a given state j, the recurrence time is the first passage time to the state j given the initial condition x 0 = j. This has distribution r(t) = Prob(τ {j} = t x 0 = j). Let j = 1. Explain how to compute this, compute it, and plot it. (f) Show that s = f r, where denotes convolution. Verify this numerically, and interpret this result. (g) Give a method to compute the distribution of the kth passage time, for any k. How does your method scale with k? Solution: (a) To calculate the first passage time, we will make the nodes in E absorbing, with the corresponding transition probability matrix denoted by P a. Using distribution propagation, i.e., π t+1 = π t P a, we can calculate p(t) = Prob(x t E x 0 = i) for t = 0, 1,..., where π 0 (i) = 1 for i = x 0 and zero otherwise. Then, we can calculate the first passage time of the original Markov chain as follows: { p(t) t = 0 f(t) = Prob(τ E = t x 0 = i) = p(t) p(t 1) t > t 2
3 You can find the matlab code to calculate the first passage time below. function fp = first_passage(p,e,x0,t) n = size(p,1); % make E absorbing P_a = P; P_a(E,:) = 0; P_a(E,E) = 1; % first passage time using distribution propagation pi = zeros(t,n); prob = zeros(t,1); pi(1,x0) = 1; for t = 1 : T prob(t) = pi(t,e); pi(t+1,:) = pi(t,:)*p_a; fp = prob - [0; prob(1:-1)]; (b) We will construct a Markov chain whose first passage time gives the second passage time of the original Markov chain as follows. We replicate the Markov chain, so now we have 2n states. Then, link each state i E in the first copy to the corresponding nodes j in the second copy, as dictated by P ij. We will denote the second copy of E by E 2, i.e., E 2 = {i + n i E}. The first passage time through E 2 for the newly constructed Markov chain will give the second passage time of the original Markov chain. The transition probability matrix for this Markov chain is P i,j if 1 i, j n P (2) P ij = i,j n if i E, n + 1 j 2n P i n,j n if n + 1 i, j 2n 0 otherwise To calculate the first passage time of this Markov chain, we will need to use the method of part (a). (c) The distribution is plotted below. 3
4 s t (d) Below see the plots of f(t) + s(t), as well as Prob(x t E) for t = 0,..., 100. We notice that f(t) + s(t) = Prob(x t E) for the first few time steps, after which it seems to have converged to a value around fpluss probofxine (e) Let s denote the first passage time starting from x 0 = i by f i (t). Then, r(t) = { Prob(τ E = t x 0 E) 0 t = 0 = n i=1 P (E, i)f i(t 1) t > 0 The distribution of recurrence time, r(t), is shown below. 4
5 r t (f) We will show that s(t) = f(t) r(t) as follows: f(t) r(t) f(m)r(t m) f(m)r(t m) = tm=0 Prob(τ E = m x 0 = i) Prob(τ E = t m x 0 E) = tm=0 Prob(τ E = m x 0 = i) Prob(τ E = t x m E) E = t x 0 = i) = m= = tm=0 = t m=0 Prob(τ E = m, τ (2) = Prob(τ (2) E = t x 0 = i) = s(t). Below you can see a plot of f(t) r(t) and s(t) s(t) f(t)*r(t) (g) To compute the k th passage time, we would need to make k copies of the Markov chain, so the number of states would be nk. We would connect the nodes in the 5
6 E for the ith copy to the corresponding nodes in the (i + 1)th copy. Calculating the first passage time involves evaluating π t P for t = 0, 1,..., which scales with O(k 2 ) as k grows. You can find the matlab implementation of parts (a)-(f) below. clear all; close all; passage_time_data; E = 1; % destination node x0 = 2; % initial state do_print = 1; %% part a T = 200; fp = first_passage(p,e,x0,t); plot([0:t-1], fp, b.-, LineWidth, 1, MarkerSize,16) set(gca, xlim, [0 50]) xlabel( t ) ylabel( f ) if do_print saveas(gcf,../figures/passage_1.eps, psc2 ); %% part c % second passage time n = 6; P2 = zeros(2*n,2*n); P2(1:n,1:n) = P; P2(n+1:2*n,n+1:2*n) = P; P2(E,:) = [zeros(1,n) P(E,:)]; % make links from E to the second copy E2 = E+n; sp = first_passage(p2,e2,x0,t); figure; plot([0:t-1], sp,.-, LineWidth, 1, MarkerSize,16); set(gca, xlim, [0 100]) xlabel( t ) ylabel( s ) if do_print saveas(gcf,../figures/passage_2.eps, psc2 ); %% part d 6
7 % Prob(x_t\in E x_0) pi = zeros(t,n); pi(1,x0) = 1; for t = 1:T-1 pi(t+1,:) = pi(t,:)*p; figure; plot([0:t-1], fp+sp,.-, LineWidth, 1, MarkerSize,16) hold on plot([0:t-1], pi(:,e), ro-, LineWidth, 1); set(gca, xlim, [0 100]); leg = leg( fpluss, probofxine ); set(leg, FontSize, 20); if do_print saveas(gcf,../figures/passage_fs_vs_prob.eps, psc2 ); %% part e: recurrence time % loop over next states r = zeros(t,1); for i = 1 : n if (P(E,i) ~= 0) fp_i = first_passage(p, E, i, T); r = r + P(E,i)*[0 ;fp_i(1:-1)]; figure; plot([0:t-1], r,.-, LineWidth, 1, MarkerSize,16); hold on set(gca, xlim, [0 100]); xlabel( t ) ylabel( r ) if do_print saveas(gcf,../figures/passage_recurrence.eps, psc2 ); %% part f figure; plot([0:t-1], sp, b.-, LineWidth, 1, MarkerSize,16); hold on c= conv(fp,r); 7
8 plot([0:t-1], c(1:t), ro-, LineWidth, 1); set(gca, xlim, [0 100]); leg=leg( s(t), f(t)*r(t) ); set(leg, FontSize, 24); if do_print saveas(gcf,../figures/passage_conv.eps, psc2 ); 2. Class decomposition of a Markov chain. In lecture we claimed that the states of a Markov chain can be ordered so that the probability-transition matrix has the form [ ] P11 P P = 12, 0 P 22 where P 11 is block upper triangular with irreducible blocks on the diagonal, and P 22 is block diagonal with irreducible blocks. Each of the blocks on the diagonal of P 11 represents a transient class, while each of the blocks on the diagonal of P 22 represents a recurrent class. In this problem you will write code to find an ordering of the states that puts P in this form. We will use standard graph-theory terminology throughout the problem. Feel free to consult Wikipedia or other external sources if you encounter any unfamiliar concepts. The file class_decomposition_data.m defines a specific probability-transition matrix that you should use throughout this problem. However, your code must work for any probability-transition matrix. (a) Let G be a graph with adjacency matrix A R n n. We write i j if there is a path from node i to node j in G. We define the reachability matrix R R n n such that { 1 i j, R ij = 0 otherwise. An algorithm for constructing R is given in algorithm 1. R = A /* A is the adjacency matrix */ repeat for i = 1 to n do /* iterate over all states k we know are reachable from i */ for k such that R ik = 1 do /* iterate over all states j we know are reachable from k */ for j such that R kj = 1 do /* j is reachable from i through k */ R ij = 1 until no changes are made to R ij Algorithm 1: Computing the reachability matrix Write a function that implements algorithm 1; use the following function header. 8
9 function R = reachable_states(a) For reference, our implementation of reachable_states is less than twenty lines. Hint. The function find if you are using MATLAB may be useful. (b) We write i j if i j and j i, and we define the communication matrix C R n n such that { 1 i = j or i j, C ij = 0 otherwise. Explain how to construct the communication matrix from the reachability matrix. (c) We define the transience vector t R n such that { 1 i is a transient state, t i = 0 otherwise. Explain how to construct the transience vector from the communication and reachability matrices. (d) Write a function that implements algorithm 2. L Empty List /* L will contain sorted nodes */ S Set of all nodes with no incoming edges while S is non empty do Remove a node n from S Add n to tail of L for each node m with edge e from n to m do Remove edge e from graph if m has no other incoming edges then Insert m into S if Graph has edges then return error: graph has at least one cycle else return L /* L a topologically sorted order */ Algorithm 2: Computing topological sort Use the following function header. function L = topological_sort(a) For reference, our implementation of topological_sort is less than twenty lines. (e) Suppose that duplicate rows of C have been removed, and the rows have been sorted so that the first n t rows represent the transient classes. (You need to write code to do this; the commands unique and sort may be useful.) Note that there is now a unique row of C corresponding to each class. For two classes 9
10 C i, C j {1,..., n}, we write C i C j if x y for some x C i and y C j. The adjacency matrix A t R nt nt for the set of transient classes is defined such that { 1 C i C j, (A t ) ij = 0 otherwise. Explain how to use the reachability matrix R of the Markov chain to find the adjacency matrix A t for the set of transient classes. (f) You should now have all the tools you need to construct an ordering of the states that puts the probability transition matrix in the desired form. Apply your method to the matrix in class_decomposition.data.m. Attach a plot of calling spy on your reordered matrix (the data file generates a plot of the original matrix). For reference, our solution has thirty-five lines (not including reachable_states and topological_sort). Solution: (a) An example implementation of reachable_states is given below. function R = reachable_states(a) n = size(a,1); R = A; no_changes = false; while ~no_changes no_changes = true; for i = 1:n for k = find(r(i,:)) for j = find(r(k,:)) if ~R(i,j) no_changes = false; R(i,j) = 1; (b) Note that (R T ) ij = 1 if j i and (R T ) ij = 0 otherwise. Form the matrix R R T, where denotes entrywise and. Then, we have that (R R T ) ij = 1 if i j, and (R R T ) ij = 0 otherwise. This is very close to the definition of C; the only difference is that the diagonal entries of R R T may not be equal to one. We can correct this deficiency using the formula C = (R R T ) I, where denotes entrwise or, and I is the identity matrix. 10
11 (c) Observe that i is a transient state if and only if n R ij > j=1 n C ij. j=1 This condition says that we can reach more states from i than there are states that communicate with i; this is what it means for i to be transient. We can use this condition to construct t from R and C. (d) An example implementation of topological_sort is given below. function L = topological_sort(a) L = []; S = find(sum(a) == 0); while ~isempty(s) n = S(1); S = S(2:); L = [L n]; for m = find(a(n,:)) A(n,m) = 0; if sum(a(:,m)) == 0 S = [S m]; if any(a(:)) L = []; (e) Let x and y be fixed representatives of C i and C j, respectively. We claim that (A t ) ij = 1 if and only if R xy = 1. The definition of A t says that (A t ) ij = 1 if and only if there exist x C i and ỹ C j such that x ỹ. Then, we have that x x ỹ y, so the properties of the communication relation imply that x y if and only if x ỹ. This proves the claim. (f) The following script uses the tools and observations developed above to compute the class decomposition of a probability-transition matrix. clear all; close all; clc; class_decomposition_data; R = reachable_states(p > 0); C = (R & R ) eye(n); 11
12 t = any(r & ~C,2); [C, idx] = unique(c, rows ); t = t(idx); [t, idx] = sort(t, desc ); C = C(idx,:); nt = sum(t); At = zeros(nt); for i = 1:nt x = find(c(i,:),1); for j = 1:nt y = find(c(j,:),1); if i ~= j && R(x,y) At(i,j) = 1; L = topological_sort(at); C(1:nt,:) = C(L,:); idx = []; for i = 1:size(C,1) idx = [idx, find(c(i,:))]; P = P(idx,idx); figure(); spy(p); print -depsc class_decomposition.eps The reordered probability-transition matrix is as follows. 12
13 nz =
14 3. Markov web surfing model. A set of n web pages labeled 1,..., n contain (directed) links to other pages. We define the link matrix L R n n as { 1 if page i links to page j L ij = 0 otherwise. We define o R n as o = L1, which gives the number of outgoing links from each page. A very crude model of a web surfer is a Markov chain on the pages, with transitions described as follows. The model includes a parameter θ (0, 1), which (roughly) gives the probability that the surfer follows a link from the current page. For a page with o i > 0 (i.e., with at least one outgoing link) the surfer moves to each of the linkedto pages with probability θ/o i, and jumps to a page not linked to i with probability (1 θ)/(n o i 1). For a page with no outgoing links (i.e., o i = 0) the surfer jumps to a random page, chosen from a uniform distribution on (the other) pages. We will assume that web surfer starts at a random page, uniformly distributed. We earn a payment when the surfer follows (i.e., clicks on) a link, given by R ij 0. This payment matrix satisfies R ij = 0 when L ij = 0 (i.e., we are not paid for random jumps; only following links). The following questions concern the specific instance of the problem with data given in link_matrix_data.m. (a) What is the most likely page the surfer is on, at time t = 10? at t = 100? (b) Let J denote the expected total payment over t = 0,..., 50. Compute J three ways: Monte Carlo simulation (which gives an estimate of J, not the exact value). Distribution propagation. Value iteration. Be sure to check that the values are consistent. Remark. The Markov model described in this problem leads to Google s famous PageRank, which corresponds to the fraction of time spent at each site, when T. (The current version of PageRank is based on far more than just the link topology, but the first versions really did make heavy use of the Markov surfing model.) Solution: (a) To find the most likely page the surfer is on, we will calculate the state distributions at times t = 10 and t = 100 by distribution propagation. The most likely page at t = 10 is page 96, and the most likely page at t = 100 is page 83. Below you can see a plot of the most likely page for all time t = 0,..., 100. Note that for t = 1, all pages are equally likely to be visited, so the choice of page 1 in the plot is arbitrary. 14
15 pmax t (b) We check the expected total payment using the three methods. We get J = using value iteration, J = using distribution propagation, and J = using Monte Carlo simulation. The code is shown below. clear all; close all; link_matrix_data; % create the probability transition matrix P = zeros(n,n); for i = 1 : n n_o = sum(l(i,:)); if n_o > 0 P(i,:) = (1-theta)/(n-n_o-1); P(i,L(i,:)>0) = theta/n_o; else P(i,:) = 1/(n-1); P(i,i) = 0; % distribution propagation T = 101; pi = zeros(t,n); pi(1,:) = 1/n; exp_g = zeros(t,1); for t = 1 : T 15
16 pi(t+1,:) = pi(t,:)*p; exp_g(t) = sum(pi(t,:)*(r.*p)); % most likely page at t max_prob = zeros(t,1); for t = 1:T [xx max_prob(t)] = max(pi(t,:)); stairs(0:t-1,max_prob, LineWidth, 2); xlabel( t ); ylabel( pmax ); set(gca, Ylim, [1 n]); saveas(gcf,../figures/markovian_pagerank_ml_page.eps, psc2 ); % cost over 50 time steps using distribution propagation T = 51; J_distprop = sum(exp_g(1:t)); % value iteration V = zeros(n,t+1); V(:,T+1) = 0; for t = T:-1:1 V(:,t) = sum(p.*r,2) + P*V(:,t+1); J_valiter = mean(v(:,1)); % monte carlo N = 1000; cost = zeros(n,1); for iter = 1 : N x = randsample(n,1,true,(1/n)*ones(n,1)); cost(iter) = 0; for t = 1 : T y = randsample(n,1,true,p(x,:)); cost(iter) = cost(iter) + R(x,y); x = y; J_mc = mean(cost); 16
Lecture 20 : Markov Chains
CSCI 3560 Probability and Computing Instructor: Bogdan Chlebus Lecture 0 : Markov Chains We consider stochastic processes. A process represents a system that evolves through incremental changes called
More information0.1 Naive formulation of PageRank
PageRank is a ranking system designed to find the best pages on the web. A webpage is considered good if it is endorsed (i.e. linked to) by other good webpages. The more webpages link to it, and the more
More informationSpectral Graph Theory and You: Matrix Tree Theorem and Centrality Metrics
Spectral Graph Theory and You: and Centrality Metrics Jonathan Gootenberg March 11, 2013 1 / 19 Outline of Topics 1 Motivation Basics of Spectral Graph Theory Understanding the characteristic polynomial
More informationSolutions to Homework 8 - Continuous-Time Markov Chains
Solutions to Homework 8 - Continuous-Time Markov Chains 1) Insurance cash flow. A) CTMC states. Since we assume that c, d and X max are integers, while the premiums that the customers pay are worth 1,
More informationCS246: Mining Massive Datasets Jure Leskovec, Stanford University
CS246: Mining Massive Datasets Jure Leskovec, Stanford University http://cs246.stanford.edu 2/7/2012 Jure Leskovec, Stanford C246: Mining Massive Datasets 2 Web pages are not equally important www.joe-schmoe.com
More informationOnline Social Networks and Media. Link Analysis and Web Search
Online Social Networks and Media Link Analysis and Web Search How to Organize the Web First try: Human curated Web directories Yahoo, DMOZ, LookSmart How to organize the web Second try: Web Search Information
More informationLecture 12: Link Analysis for Web Retrieval
Lecture 12: Link Analysis for Web Retrieval Trevor Cohn COMP90042, 2015, Semester 1 What we ll learn in this lecture The web as a graph Page-rank method for deriving the importance of pages Hubs and authorities
More informationStochastic process. X, a series of random variables indexed by t
Stochastic process X, a series of random variables indexed by t X={X(t), t 0} is a continuous time stochastic process X={X(t), t=0,1, } is a discrete time stochastic process X(t) is the state at time t,
More information= P{X 0. = i} (1) If the MC has stationary transition probabilities then, = i} = P{X n+1
Properties of Markov Chains and Evaluation of Steady State Transition Matrix P ss V. Krishnan - 3/9/2 Property 1 Let X be a Markov Chain (MC) where X {X n : n, 1, }. The state space is E {i, j, k, }. The
More informationDATA MINING LECTURE 13. Link Analysis Ranking PageRank -- Random walks HITS
DATA MINING LECTURE 3 Link Analysis Ranking PageRank -- Random walks HITS How to organize the web First try: Manually curated Web Directories How to organize the web Second try: Web Search Information
More informationNo class on Thursday, October 1. No office hours on Tuesday, September 29 and Thursday, October 1.
Stationary Distributions Monday, September 28, 2015 2:02 PM No class on Thursday, October 1. No office hours on Tuesday, September 29 and Thursday, October 1. Homework 1 due Friday, October 2 at 5 PM strongly
More informationMarkov Chains Handout for Stat 110
Markov Chains Handout for Stat 0 Prof. Joe Blitzstein (Harvard Statistics Department) Introduction Markov chains were first introduced in 906 by Andrey Markov, with the goal of showing that the Law of
More informationOnline Social Networks and Media. Link Analysis and Web Search
Online Social Networks and Media Link Analysis and Web Search How to Organize the Web First try: Human curated Web directories Yahoo, DMOZ, LookSmart How to organize the web Second try: Web Search Information
More informationIrreducibility. Irreducible. every state can be reached from every other state For any i,j, exist an m 0, such that. Absorbing state: p jj =1
Irreducibility Irreducible every state can be reached from every other state For any i,j, exist an m 0, such that i,j are communicate, if the above condition is valid Irreducible: all states are communicate
More informationMarkov chains (week 6) Solutions
Markov chains (week 6) Solutions 1 Ranking of nodes in graphs. A Markov chain model. The stochastic process of agent visits A N is a Markov chain (MC). Explain. The stochastic process of agent visits A
More informationA Note on Google s PageRank
A Note on Google s PageRank According to Google, google-search on a given topic results in a listing of most relevant web pages related to the topic. Google ranks the importance of webpages according to
More informationCPSC 540: Machine Learning
CPSC 540: Machine Learning Mark Schmidt University of British Columbia Winter 2019 Last Time: Monte Carlo Methods If we want to approximate expectations of random functions, E[g(x)] = g(x)p(x) or E[g(x)]
More informationBayesian Analysis - A First Example
Bayesian Analysis - A First Example This script works through the example in Hoff (29), section 1.2.1 We are interested in a single parameter: θ, the fraction of individuals in a city population with with
More informationLecture 10: Powers of Matrices, Difference Equations
Lecture 10: Powers of Matrices, Difference Equations Difference Equations A difference equation, also sometimes called a recurrence equation is an equation that defines a sequence recursively, i.e. each
More informationLecture 5: Random Walks and Markov Chain
Spectral Graph Theory and Applications WS 20/202 Lecture 5: Random Walks and Markov Chain Lecturer: Thomas Sauerwald & He Sun Introduction to Markov Chains Definition 5.. A sequence of random variables
More informationGoogle Page Rank Project Linear Algebra Summer 2012
Google Page Rank Project Linear Algebra Summer 2012 How does an internet search engine, like Google, work? In this project you will discover how the Page Rank algorithm works to give the most relevant
More informationCS145: Probability & Computing Lecture 18: Discrete Markov Chains, Equilibrium Distributions
CS145: Probability & Computing Lecture 18: Discrete Markov Chains, Equilibrium Distributions Instructor: Erik Sudderth Brown University Computer Science April 14, 215 Review: Discrete Markov Chains Some
More informationINTRODUCTION TO MARKOV CHAINS AND MARKOV CHAIN MIXING
INTRODUCTION TO MARKOV CHAINS AND MARKOV CHAIN MIXING ERIC SHANG Abstract. This paper provides an introduction to Markov chains and their basic classifications and interesting properties. After establishing
More informationPageRank. Ryan Tibshirani /36-662: Data Mining. January Optional reading: ESL 14.10
PageRank Ryan Tibshirani 36-462/36-662: Data Mining January 24 2012 Optional reading: ESL 14.10 1 Information retrieval with the web Last time we learned about information retrieval. We learned how to
More informationGoogle PageRank. Francesco Ricci Faculty of Computer Science Free University of Bozen-Bolzano
Google PageRank Francesco Ricci Faculty of Computer Science Free University of Bozen-Bolzano fricci@unibz.it 1 Content p Linear Algebra p Matrices p Eigenvalues and eigenvectors p Markov chains p Google
More informationPage rank computation HPC course project a.y
Page rank computation HPC course project a.y. 2015-16 Compute efficient and scalable Pagerank MPI, Multithreading, SSE 1 PageRank PageRank is a link analysis algorithm, named after Brin & Page [1], and
More informationStatistics 253/317 Introduction to Probability Models. Winter Midterm Exam Monday, Feb 10, 2014
Statistics 253/317 Introduction to Probability Models Winter 2014 - Midterm Exam Monday, Feb 10, 2014 Student Name (print): (a) Do not sit directly next to another student. (b) This is a closed-book, closed-note
More informationThe Markov Chain Monte Carlo Method
The Markov Chain Monte Carlo Method Idea: define an ergodic Markov chain whose stationary distribution is the desired probability distribution. Let X 0, X 1, X 2,..., X n be the run of the chain. The Markov
More informationLink Analysis. Reference: Introduction to Information Retrieval by C. Manning, P. Raghavan, H. Schutze
Link Analysis Reference: Introduction to Information Retrieval by C. Manning, P. Raghavan, H. Schutze 1 The Web as a Directed Graph Page A Anchor hyperlink Page B Assumption 1: A hyperlink between pages
More informationGraph Models The PageRank Algorithm
Graph Models The PageRank Algorithm Anna-Karin Tornberg Mathematical Models, Analysis and Simulation Fall semester, 2013 The PageRank Algorithm I Invented by Larry Page and Sergey Brin around 1998 and
More informationMarkov Chains CK eqns Classes Hitting times Rec./trans. Strong Markov Stat. distr. Reversibility * Markov Chains
Markov Chains A random process X is a family {X t : t T } of random variables indexed by some set T. When T = {0, 1, 2,... } one speaks about a discrete-time process, for T = R or T = [0, ) one has a continuous-time
More informationMarkov Chains. Sarah Filippi Department of Statistics TA: Luke Kelly
Markov Chains Sarah Filippi Department of Statistics http://www.stats.ox.ac.uk/~filippi TA: Luke Kelly With grateful acknowledgements to Prof. Yee Whye Teh's slides from 2013 14. Schedule 09:30-10:30 Lecture:
More informationData and Algorithms of the Web
Data and Algorithms of the Web Link Analysis Algorithms Page Rank some slides from: Anand Rajaraman, Jeffrey D. Ullman InfoLab (Stanford University) Link Analysis Algorithms Page Rank Hubs and Authorities
More informationToday. Next lecture. (Ch 14) Markov chains and hidden Markov models
Today (Ch 14) Markov chains and hidden Markov models Graphical representation Transition probability matrix Propagating state distributions The stationary distribution Next lecture (Ch 14) Markov chains
More informationLecture 11: Introduction to Markov Chains. Copyright G. Caire (Sample Lectures) 321
Lecture 11: Introduction to Markov Chains Copyright G. Caire (Sample Lectures) 321 Discrete-time random processes A sequence of RVs indexed by a variable n 2 {0, 1, 2,...} forms a discretetime random process
More informationLink Analysis. Leonid E. Zhukov
Link Analysis Leonid E. Zhukov School of Data Analysis and Artificial Intelligence Department of Computer Science National Research University Higher School of Economics Structural Analysis and Visualization
More informationWeb Ranking. Classification (manual, automatic) Link Analysis (today s lesson)
Link Analysis Web Ranking Documents on the web are first ranked according to their relevance vrs the query Additional ranking methods are needed to cope with huge amount of information Additional ranking
More informationLink Mining PageRank. From Stanford C246
Link Mining PageRank From Stanford C246 Broad Question: How to organize the Web? First try: Human curated Web dictionaries Yahoo, DMOZ LookSmart Second try: Web Search Information Retrieval investigates
More information4.7.1 Computing a stationary distribution
At a high-level our interest in the rest of this section will be to understand the limiting distribution, when it exists and how to compute it To compute it, we will try to reason about when the limiting
More informationLecture 5. If we interpret the index n 0 as time, then a Markov chain simply requires that the future depends only on the present and not on the past.
1 Markov chain: definition Lecture 5 Definition 1.1 Markov chain] A sequence of random variables (X n ) n 0 taking values in a measurable state space (S, S) is called a (discrete time) Markov chain, if
More informationUncertainty and Randomization
Uncertainty and Randomization The PageRank Computation in Google Roberto Tempo IEIIT-CNR Politecnico di Torino tempo@polito.it 1993: Robustness of Linear Systems 1993: Robustness of Linear Systems 16 Years
More informationStochastic modelling of epidemic spread
Stochastic modelling of epidemic spread Julien Arino Centre for Research on Inner City Health St Michael s Hospital Toronto On leave from Department of Mathematics University of Manitoba Julien Arino@umanitoba.ca
More informationCalculating Web Page Authority Using the PageRank Algorithm
Jacob Miles Prystowsky and Levi Gill Math 45, Fall 2005 1 Introduction 1.1 Abstract In this document, we examine how the Google Internet search engine uses the PageRank algorithm to assign quantitatively
More informationP(X 0 = j 0,... X nk = j k )
Introduction to Probability Example Sheet 3 - Michaelmas 2006 Michael Tehranchi Problem. Let (X n ) n 0 be a homogeneous Markov chain on S with transition matrix P. Given a k N, let Z n = X kn. Prove that
More informationMAS275 Probability Modelling Exercises
MAS75 Probability Modelling Exercises Note: these questions are intended to be of variable difficulty. In particular: Questions or part questions labelled (*) are intended to be a bit more challenging.
More informationIEOR 6711: Professor Whitt. Introduction to Markov Chains
IEOR 6711: Professor Whitt Introduction to Markov Chains 1. Markov Mouse: The Closed Maze We start by considering how to model a mouse moving around in a maze. The maze is a closed space containing nine
More informationCS6220: DATA MINING TECHNIQUES
CS6220: DATA MINING TECHNIQUES Mining Graph/Network Data Instructor: Yizhou Sun yzsun@ccs.neu.edu November 16, 2015 Methods to Learn Classification Clustering Frequent Pattern Mining Matrix Data Decision
More informationIR: Information Retrieval
/ 44 IR: Information Retrieval FIB, Master in Innovation and Research in Informatics Slides by Marta Arias, José Luis Balcázar, Ramon Ferrer-i-Cancho, Ricard Gavaldá Department of Computer Science, UPC
More informationMATH 552 Spectral Methods Spring Homework Set 5 - SOLUTIONS
MATH 55 Spectral Methods Spring 9 Homework Set 5 - SOLUTIONS. Suppose you are given an n n linear system Ax = f where the matrix A is tridiagonal b c a b c. A =.........,. a n b n c n a n b n with x =
More informationMarkov Chains, Random Walks on Graphs, and the Laplacian
Markov Chains, Random Walks on Graphs, and the Laplacian CMPSCI 791BB: Advanced ML Sridhar Mahadevan Random Walks! There is significant interest in the problem of random walks! Markov chain analysis! Computer
More informationData Mining Recitation Notes Week 3
Data Mining Recitation Notes Week 3 Jack Rae January 28, 2013 1 Information Retrieval Given a set of documents, pull the (k) most similar document(s) to a given query. 1.1 Setup Say we have D documents
More informationKrylov Subspace Methods to Calculate PageRank
Krylov Subspace Methods to Calculate PageRank B. Vadala-Roth REU Final Presentation August 1st, 2013 How does Google Rank Web Pages? The Web The Graph (A) Ranks of Web pages v = v 1... Dominant Eigenvector
More informationThe Google Markov Chain: convergence speed and eigenvalues
U.U.D.M. Project Report 2012:14 The Google Markov Chain: convergence speed and eigenvalues Fredrik Backåker Examensarbete i matematik, 15 hp Handledare och examinator: Jakob Björnberg Juni 2012 Department
More informationMath 502 Fall 2005 Solutions to Homework 3
Math 502 Fall 2005 Solutions to Homework 3 (1) As shown in class, the relative distance between adjacent binary floating points numbers is 2 1 t, where t is the number of digits in the mantissa. Since
More informationDesigning Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Homework 4
EECS 16A Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Homework This homework is due February 22, 2017, at 2:59. Self-grades are due February 27, 2017, at
More informationMath 515 Fall, 2008 Homework 2, due Friday, September 26.
Math 515 Fall, 2008 Homework 2, due Friday, September 26 In this assignment you will write efficient MATLAB codes to solve least squares problems involving block structured matrices known as Kronecker
More informationBirth-death chain models (countable state)
Countable State Birth-Death Chains and Branching Processes Tuesday, March 25, 2014 1:59 PM Homework 3 posted, due Friday, April 18. Birth-death chain models (countable state) S = We'll characterize the
More informationPageRank: The Math-y Version (Or, What To Do When You Can t Tear Up Little Pieces of Paper)
PageRank: The Math-y Version (Or, What To Do When You Can t Tear Up Little Pieces of Paper) In class, we saw this graph, with each node representing people who are following each other on Twitter: Our
More informationMarkov Chains, Stochastic Processes, and Matrix Decompositions
Markov Chains, Stochastic Processes, and Matrix Decompositions 5 May 2014 Outline 1 Markov Chains Outline 1 Markov Chains 2 Introduction Perron-Frobenius Matrix Decompositions and Markov Chains Spectral
More informationStochastic modelling of epidemic spread
Stochastic modelling of epidemic spread Julien Arino Department of Mathematics University of Manitoba Winnipeg Julien Arino@umanitoba.ca 19 May 2012 1 Introduction 2 Stochastic processes 3 The SIS model
More informationJanuary 18, 2008 Steve Gu. Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB,
Introduction to MATLAB January 18, 2008 Steve Gu Reference: Eta Kappa Nu, UCLA Iota Gamma Chapter, Introduction to MATLAB, Part I: Basics MATLAB Environment Getting Help Variables Vectors, Matrices, and
More informationLab 8: Measuring Graph Centrality - PageRank. Monday, November 5 CompSci 531, Fall 2018
Lab 8: Measuring Graph Centrality - PageRank Monday, November 5 CompSci 531, Fall 2018 Outline Measuring Graph Centrality: Motivation Random Walks, Markov Chains, and Stationarity Distributions Google
More information8. Statistical Equilibrium and Classification of States: Discrete Time Markov Chains
8. Statistical Equilibrium and Classification of States: Discrete Time Markov Chains 8.1 Review 8.2 Statistical Equilibrium 8.3 Two-State Markov Chain 8.4 Existence of P ( ) 8.5 Classification of States
More informationPowerful tool for sampling from complicated distributions. Many use Markov chains to model events that arise in nature.
Markov Chains Markov chains: 2SAT: Powerful tool for sampling from complicated distributions rely only on local moves to explore state space. Many use Markov chains to model events that arise in nature.
More informationIntroduction to Search Engine Technology Introduction to Link Structure Analysis. Ronny Lempel Yahoo Labs, Haifa
Introduction to Search Engine Technology Introduction to Link Structure Analysis Ronny Lempel Yahoo Labs, Haifa Outline Anchor-text indexing Mathematical Background Motivation for link structure analysis
More informationRobert Collins CSE586, PSU. Markov-Chain Monte Carlo
Markov-Chain Monte Carlo References Problem Intuition: In high dimension problems, the Typical Set (volume of nonnegligable prob in state space) is a small fraction of the total space. High-Dimensional
More informationLINK ANALYSIS. Dr. Gjergji Kasneci Introduction to Information Retrieval WS
LINK ANALYSIS Dr. Gjergji Kasneci Introduction to Information Retrieval WS 2012-13 1 Outline Intro Basics of probability and information theory Retrieval models Retrieval evaluation Link analysis Models
More informationCS224W: Social and Information Network Analysis Jure Leskovec, Stanford University
CS224W: Social and Information Network Analysis Jure Leskovec, Stanford University http://cs224w.stanford.edu How to organize/navigate it? First try: Human curated Web directories Yahoo, DMOZ, LookSmart
More informationLink Analysis. Stony Brook University CSE545, Fall 2016
Link Analysis Stony Brook University CSE545, Fall 2016 The Web, circa 1998 The Web, circa 1998 The Web, circa 1998 Match keywords, language (information retrieval) Explore directory The Web, circa 1998
More informationMarkov chains and the number of occurrences of a word in a sequence ( , 11.1,2,4,6)
Markov chains and the number of occurrences of a word in a sequence (4.5 4.9,.,2,4,6) Prof. Tesler Math 283 Fall 208 Prof. Tesler Markov Chains Math 283 / Fall 208 / 44 Locating overlapping occurrences
More informationL. Vandenberghe EE133A (Spring 2017) 3. Matrices. notation and terminology. matrix operations. linear and affine functions.
L Vandenberghe EE133A (Spring 2017) 3 Matrices notation and terminology matrix operations linear and affine functions complexity 3-1 Matrix a rectangular array of numbers, for example A = 0 1 23 01 13
More informationSlides based on those in:
Spyros Kontogiannis & Christos Zaroliagis Slides based on those in: http://www.mmds.org High dim. data Graph data Infinite data Machine learning Apps Locality sensitive hashing PageRank, SimRank Filtering
More informationMAT 1302B Mathematical Methods II
MAT 1302B Mathematical Methods II Alistair Savage Mathematics and Statistics University of Ottawa Winter 2015 Lecture 19 Alistair Savage (uottawa) MAT 1302B Mathematical Methods II Winter 2015 Lecture
More informationMath/Phys/Engr 428, Math 529/Phys 528 Numerical Methods - Summer Homework 3 Due: Tuesday, July 3, 2018
Math/Phys/Engr 428, Math 529/Phys 528 Numerical Methods - Summer 28. (Vector and Matrix Norms) Homework 3 Due: Tuesday, July 3, 28 Show that the l vector norm satisfies the three properties (a) x for x
More informationComputational Economics and Finance
Computational Economics and Finance Part II: Linear Equations Spring 2016 Outline Back Substitution, LU and other decomposi- Direct methods: tions Error analysis and condition numbers Iterative methods:
More informationLesson Plan. AM 121: Introduction to Optimization Models and Methods. Lecture 17: Markov Chains. Yiling Chen SEAS. Stochastic process Markov Chains
AM : Introduction to Optimization Models and Methods Lecture 7: Markov Chains Yiling Chen SEAS Lesson Plan Stochastic process Markov Chains n-step probabilities Communicating states, irreducibility Recurrent
More informationMATH 564/STAT 555 Applied Stochastic Processes Homework 2, September 18, 2015 Due September 30, 2015
ID NAME SCORE MATH 56/STAT 555 Applied Stochastic Processes Homework 2, September 8, 205 Due September 30, 205 The generating function of a sequence a n n 0 is defined as As : a ns n for all s 0 for which
More informationUpdating PageRank. Amy Langville Carl Meyer
Updating PageRank Amy Langville Carl Meyer Department of Mathematics North Carolina State University Raleigh, NC SCCM 11/17/2003 Indexing Google Must index key terms on each page Robots crawl the web software
More informationCPSC 540: Machine Learning
CPSC 540: Machine Learning Mark Schmidt University of British Columbia Winter 2018 Last Time: Monte Carlo Methods If we want to approximate expectations of random functions, E[g(x)] = g(x)p(x) or E[g(x)]
More information1998: enter Link Analysis
1998: enter Link Analysis uses hyperlink structure to focus the relevant set combine traditional IR score with popularity score Page and Brin 1998 Kleinberg Web Information Retrieval IR before the Web
More informationLecture 7. We can regard (p(i, j)) as defining a (maybe infinite) matrix P. Then a basic fact is
MARKOV CHAINS What I will talk about in class is pretty close to Durrett Chapter 5 sections 1-5. We stick to the countable state case, except where otherwise mentioned. Lecture 7. We can regard (p(i, j))
More informationCS6220: DATA MINING TECHNIQUES
CS6220: DATA MINING TECHNIQUES Mining Graph/Network Data Instructor: Yizhou Sun yzsun@ccs.neu.edu March 16, 2016 Methods to Learn Classification Clustering Frequent Pattern Mining Matrix Data Decision
More informationProject 2: Using linear systems for numerical solution of boundary value problems
LINEAR ALGEBRA, MATH 124 Instructor: Dr. T.I. Lakoba Project 2: Using linear systems for numerical solution of boundary value problems Goal Introduce one of the most important applications of Linear Algebra
More informationRobert Collins CSE586, PSU Intro to Sampling Methods
Robert Collins Intro to Sampling Methods CSE586 Computer Vision II Penn State Univ Robert Collins A Brief Overview of Sampling Monte Carlo Integration Sampling and Expected Values Inverse Transform Sampling
More informationLecture 9 Classification of States
Lecture 9: Classification of States of 27 Course: M32K Intro to Stochastic Processes Term: Fall 204 Instructor: Gordan Zitkovic Lecture 9 Classification of States There will be a lot of definitions and
More informationNumerical Linear Algebra
Numerical Linear Algebra Decompositions, numerical aspects Gerard Sleijpen and Martin van Gijzen September 27, 2017 1 Delft University of Technology Program Lecture 2 LU-decomposition Basic algorithm Cost
More informationProgram Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects
Numerical Linear Algebra Decompositions, numerical aspects Program Lecture 2 LU-decomposition Basic algorithm Cost Stability Pivoting Cholesky decomposition Sparse matrices and reorderings Gerard Sleijpen
More informationCS246: Mining Massive Datasets Jure Leskovec, Stanford University.
CS246: Mining Massive Datasets Jure Leskovec, Stanford University http://cs246.stanford.edu What is the structure of the Web? How is it organized? 2/7/2011 Jure Leskovec, Stanford C246: Mining Massive
More informationHomework set 2 - Solutions
Homework set 2 - Solutions Math 495 Renato Feres Simulating a Markov chain in R Generating sample sequences of a finite state Markov chain. The following is a simple program for generating sample sequences
More informationMath/CS 466/666: Homework Solutions for Chapter 3
Math/CS 466/666: Homework Solutions for Chapter 3 31 Can all matrices A R n n be factored A LU? Why or why not? Consider the matrix A ] 0 1 1 0 Claim that this matrix can not be factored A LU For contradiction,
More informationMATH 56A: STOCHASTIC PROCESSES CHAPTER 1
MATH 56A: STOCHASTIC PROCESSES CHAPTER. Finite Markov chains For the sake of completeness of these notes I decided to write a summary of the basic concepts of finite Markov chains. The topics in this chapter
More informationIntelligent Data Analysis. PageRank. School of Computer Science University of Birmingham
Intelligent Data Analysis PageRank Peter Tiňo School of Computer Science University of Birmingham Information Retrieval on the Web Most scoring methods on the Web have been derived in the context of Information
More informationNew Mexico Tech Hyd 510
Vectors vector - has magnitude and direction (e.g. velocity, specific discharge, hydraulic gradient) scalar - has magnitude only (e.g. porosity, specific yield, storage coefficient) unit vector - a unit
More informationStochastic Processes
Stochastic Processes 8.445 MIT, fall 20 Mid Term Exam Solutions October 27, 20 Your Name: Alberto De Sole Exercise Max Grade Grade 5 5 2 5 5 3 5 5 4 5 5 5 5 5 6 5 5 Total 30 30 Problem :. True / False
More informationEE364b Homework 4. L(y,ν) = (1/2) y x ν(1 T y 1), minimize (1/2) y x 2 2 subject to y 0, 1 T y = 1,
EE364b Prof. S. Boyd EE364b Homework 4 1. Projection onto the probability simplex. In this problem you will work out a simple method for finding the Euclidean projection y of x R n onto the probability
More information1 Locally computable randomized encodings
CSG399: Gems of Theoretical Computer Science Lectures 3-4 Feb 20-24, 2009 Instructor: Emanuele Viola Scribe: Eric Miles Cryptography in constant depth: II & III Locally computable randomized encodings
More information1 Mechanistic and generative models of network structure
1 Mechanistic and generative models of network structure There are many models of network structure, and these largely can be divided into two classes: mechanistic models and generative or probabilistic
More informationWeb Structure Mining Nodes, Links and Influence
Web Structure Mining Nodes, Links and Influence 1 Outline 1. Importance of nodes 1. Centrality 2. Prestige 3. Page Rank 4. Hubs and Authority 5. Metrics comparison 2. Link analysis 3. Influence model 1.
More informationAARMS Homework Exercises
1 For the gamma distribution, AARMS Homework Exercises (a) Show that the mgf is M(t) = (1 βt) α for t < 1/β (b) Use the mgf to find the mean and variance of the gamma distribution 2 A well-known inequality
More informationCS168: The Modern Algorithmic Toolbox Lecture #14: Markov Chain Monte Carlo
CS168: The Modern Algorithmic Toolbox Lecture #14: Markov Chain Monte Carlo Tim Roughgarden & Gregory Valiant May 17, 2018 The previous lecture covered several tools for inferring properties of the distribution
More information