In this project, we will analyze the execution of the PageRank algorithm.
Note: Due to privacy policies, I am not allowed to post the dataset publicly.
- Each student will draw (on a sheet of paper) a directed graph with n = 10 nodes and random arcs.
- The graph will be represented using Python data structures (any representation can be used).
- Based on the graph, construct the transition matrix M.
- The vector v₀ will be initialized as:
and will be updated through repeated multiplications with the transition matrix M.
v₀ = [1/n] [1/n] [...] [1/n]
- The algorithm stops when the ranks vector changes sufficiently little between two generations (
|v' - v| < ε
). - Graphically represent using a bar chart the color rankings of n nodes at each step.
- The program should use Python's built-in data structures.
- The transition matrix M represents the probability of transitioning from one node to another.
- The initial vector v₀ assigns equal probability to all nodes.
- The convergence criterion ε determines when the algorithm stops.
- The visualization should show how node rankings evolve over iterations.
The PageRank algorithm uses an iterative approach where:
- M is the transition matrix.
- v is the ranking vector.
- The process continues until convergence.
- Final values represent the relative importance of each node in the graph.