Lab 7 - Random Walks (Apr 18)

My code for this lab

Matrices in Sage

Here we'll be working with matrices in Sage. Some points to keep in mind are:

Tasks

Task 1: For each of the following graphs G, compute the transition matrix T and use this to study the behavior of a random walk starting at vertex 0. Try to determine the limiting behavior of the random walk. Discuss with your neighbors the meaning of these results.

  1. The path graph of length 3
  2. The path graph of length 4
  3. The cycle graph of order 3
  4. The cycle graph of order 4
  5. The star graph of order 4
  6. The complete graph of order 4

Task 2: Let C5 be the cycle graph of order 5, and K5 be the complete graph of order 5. For each of these graphs, about how many steps does it take for a random walk starting at vertex 0 to approach of the limiting value (say, for each coordinate to get within 0.01 of the limiting value)? Which converges faster? Why do you think that is? Discuss with your neighbors.

Task 3: Repeat task 1 for the Florentine families and karate club graphs. What does this tell you about which nodes are most important? Discuss with your neighbors.



Labs Page
Course Home