Parallel random walks
description
Transcript of Parallel random walks
![Page 1: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/1.jpg)
Parallel random walks
Brian Moffat
![Page 2: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/2.jpg)
Outline
• What are random walks• What are Markov chains• What are cover/hitting/mixing times• Speed ups for different graphs• Implementation
![Page 3: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/3.jpg)
What is a random walk
• An agent which traverses a graph randomly• Each step randomly goes from node A to a
random neighbour A’
![Page 4: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/4.jpg)
Advantages of Random walk
• Easy to implement• No knowledge of underlying graph required• Little memory footprint
![Page 5: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/5.jpg)
Disadvantages of random walk
• Unpredictable cover and hitting time• Worst case of infinite
![Page 6: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/6.jpg)
Uses of random walks
• Sampling massive graphs– Social networks
• Estimating the size of an unknown graph• Simplified model of brownian motion
![Page 7: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/7.jpg)
What is a markov chain
• A probability model involving states• Each state has probabilities that determine
the transitions to neighbouring state• Can be represented as a matrix• Similar to a random walk
![Page 8: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/8.jpg)
The Times
• Cover time– Expected time for a random walk to visit every
node in a graph
• Hitting time– Expected time for a random walk to visit a specific
vertex starting from a specific vertex
• Mixing time– time before a markov chain hits the steady state
![Page 9: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/9.jpg)
Mixing time
• Time for a markov chain to converge to a steady state
• Steady state is when time i and time i+1 are less then ε apart
![Page 10: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/10.jpg)
Mixing times of graphs
• Fast mixing times– Complete graphs
• Slow mixing times– Barbell graph
![Page 11: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/11.jpg)
Markov chains and graphs
• a random walk on a graph can be easily represented as a Markov chain
• Expected Cover time can be calculated using the Markov time
![Page 12: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/12.jpg)
Calculating cover Time
![Page 13: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/13.jpg)
Speed ups
• Three kinds of speed ups• Logarithmic– cycles
• Linear– cliques
• Exponential– Barbell graph
![Page 14: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/14.jpg)
Logarithmic
![Page 15: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/15.jpg)
Linear speed up
• Cliques have a linear speed up of k for k ≤ n random walks
![Page 16: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/16.jpg)
Exponential speed up
• Barbell graphs have an exponential speed up when the random walks are started on the center node.
![Page 17: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/17.jpg)
Barbell
• The barbell graph is 2 cliques connected by 1 path with a node in between known as vc
• Once a random walk is in a given node there is 1 exit with 1/(n/2) probability of leaving the clique and ((n/2)-1/(n/2)) probability of staying in the clique
• This bottleneck causes a massive slow down in the cover time
![Page 18: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/18.jpg)
Barbell graph parallel
• For k=20 ln n the expected cover time starting from vc is O(n)
• Proof: with high probability the following will not happen– In one of the cliques there are less than 4 ln n
walks after the first step– During the first 10n steps at least 2ln n vertices
return to the center– One of the cliques is not covered within the first
10n steps
![Page 19: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/19.jpg)
Barbell graph parallel
• Starting node effects speed up of parallel walks
• Best nodes are spread out• Best single node is the center node• Worst is in a clique
![Page 20: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/20.jpg)
Implementation
• Intel cilk plus• Graphs represented as arrays of booleans• Random walk stores array index for which
vertex its at• Randomly steps to another index based on
graph type
![Page 21: Parallel random walks](https://reader036.fdocuments.us/reader036/viewer/2022081504/56814f5f550346895dbd13e7/html5/thumbnails/21.jpg)
Questions
• What property of a barbell graph that allows exponential speed up?
• What other kinds of graphs could have an exponential speed up?