Lab 8 - PageRank (Apr 25)

My code for this lab

Tasks

Task 1: Write a Sage function PageRank(G, alpha) that returns the PageRank transition matrix of a (di)graph G with random restart parameter alpha.

Task 2: Using my diGNP(n,p) function, generate random G(n,p) directed graphs with n=20 and p = 0.1, 0.15, 0.2. For these graphs, use PageRank (with alpha=.15) to rank the vertices. Plot the graphs and identify the vertices with the highest PageRank scores. Is this the different from ranking vertices by in degree? Roughly how many times do you need to iterate the matrix multiplication to perform this ranking? Do these seem like reasonable rankings to you?

Task 3: Turn the win-loss matrix m1 in the file above into a Sage matrix M1, and then into a digraph with the command DiGraph(M1). Apply PageRank to this directed graph to rank the teams in the Big 12 2013 football season. Experiment with this ranking for different values of alpha (0, .05, .15, .5, .85), and see how it compares to the official rankings. (The vertex ordering corresponds to the schools in the list V.)

Task 4: Repeat Task 3 with the win-loss score-differential matrix m2 in the file above.



Labs Page
Course Home