L09_-_MCMC

L09_-_MCMC - 6.046 Design and Analysis of Algorithms...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
6.046- Design’and’Analysis’of’ Algorithms Prof. Constan±nos Daskalakis Lecture’09’ Markov Chain Monte Carlo (supplementary material to these slides has also been posted)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Menu Random walks on graphs Markov Chains Examples: – pagerank – card-shuffling – colorings
Background image of page 2
Menu Random walks on graphs Markov Chains Examples: – pagerank – card-shuffling – colorings
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Random Walks Given undirected graph G = ( V , E ) A squirrel stands at vertex v 0 : Squirrel ate fermented pumpkin so doesn’t know what he’s doing So jumps to random neighbor v 1 of v 0 Then jumps to random neighbor v 2 of v 1 etc Question: Where is squirrel after t steps? A: At some random location. OK, with what probability is squirrel at each vertex of the graph? Want to compute x t R n , where x t ( i ) : probability squirrel is at node i at time t . v t : random variable representing location at time t. v 0 v 1 v 2
Background image of page 4
x t x t + 1 ? Simplification: all nodes have same degree d, e.g. x 0 = (1, 0, 0, 0, 0) x 0 x 1 ? if u 1 , u 2 ,…, u d are the d neighbors of v 0 , then v 1 = u i with probability 1/ d so x 1 = (0, ½ , 0, 0, ½ ) x 2 = ( ½ , 0, ¼ , ¼ ,0) A = (adjacency matrix divided by d ) 1 2 3 4 5 ½ 0 0 0 ½ 0 ½ ½ 0 0 ½ 0 0 ½ 0 0 0 ½ 0 ½ 0 ½ 0 ½ 0 A ij : probability of jumping to j if squirrel is at i formally A ij = Pr[ v t +1 = j | v t = i ] x 1 = x 0 A x 2 = x 1 A = x 0 A 2 x 3 = x 2 A =x 0 A 3 x t +1 = x t A = x 0 A t +1 (1) “the transition matrix”
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
x t More general undirected graphs? Transition Matrix: A =adjacency matrix where row i is divided by the degree d i of i x t = x 0 A t Computing x t fast? – repeated squaring! – compute A A 2 A 4 A t (if t is a power of 2; if not see lecture 2) – then do vector-matrix product Limiting distribution x t as t →∞ ? e.g. what is x in 5-cycle? x = ( , , , , ) 1 2 3 4 5
Background image of page 6
Verifying x t ( , , , , ) Recall A = x 0 = [1 0 0 0 0 ] x 1 = [0 0.5000 0 0 0.5000] x 2 = [0.5000 0 0.2500 0.2500 0 ] x 3 = [0 0.3750 0.1250 0.1250 0.3750] x 4 = [0.3750 0.0625 0.2500 0.2500 0.0625] x 5 = [0.0625 0.3125 0.1562 0.1562 0.3125] x 6 = [0.3125 0.1094 0.2344 0.2344 0.1094] x 7 = [0.1094 0.2734 0.1719 0.1719 0.2734] x 8 = [0.2734 0.1406 0.2227 0.2227 0.1406] x 9 = [0.1406 0.2480 0.1816 0.1816 0.2480] x 10 =[0.2480 0.1611 0.2148 0.2148 0.1611] x 11 =[0.1611 0.2314 0.1880 0.1880 0.2314] x 12 =[0.2314 0.1746 0.2097 0.2097 0.1746] x 13 =[0.1746 0.2206 0.1921 0.1921 0.2206] x 14 =[0.2206 0.1833 0.2064 0.2064 0.1833] 1 2 3 4 5 ½ 0 0 0 ½ 0 ½ ½ 0 0 ½ 0 0 ½ 0 0 0 ½ 0 ½ 0 ½ 0 ½ 0 x 15 = [0.1833 0.2135 0.1949 0.1949 0.2135] x 16 = [0.2135 0.1891 0.2042 0.2042 0.1891] x 17 = [0.1891 0.2088 0.1966 0.1966 0.2088] x 18 = [0.2088 0.1929 0.2027 0.2027 0.1929] x 19 = [0.1929 0.2058 0.1978 0.1978 0.2058] x 20 = [0.2058 0.1953 0.2018 0.2018 0.1953] x 21 = [0.1953 0.2038 0.1986 0.1986 0.2038] x 22 = [0.2038 0.1969 0.2012 0.2012 0.1969] x 23 = [0.1969
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 24

L09_-_MCMC - 6.046 Design and Analysis of Algorithms...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online