MMD Hw2
MMD Hw2
Instructions:
• Submission:
Grading Criteria:
1. PageRank
Consider a directed graph with 5 nodes:
Using the PageRank algorithm with a damping factor of 0.85, calculate the PageRank values
for each node after 3 iterations. Show your calculations step by step.
2. Node Embedding
Describe the role of node embeddings in graph analysis. Using the Karate Club dataset as
an example, explain how Node2Vec generates embeddings for nodes. Illustrate your expla-
nation with a simple example of a walk generation process and the role of hyperparameters
like p and q.
1
3. Graph Convolutional Network (GCN)
Given a simple undirected graph with 4 nodes and the following adjacency matrix:
0 1 1 0
1 0 1 1
A= 1 1 0
1
0 1 1 0
0 0
Calculate the output features for each node after applying one layer of a GCN with a
weight matrix:
1 1
W =
1 1
Normalize the adjacency matrix using  = D−1/2 (A + I)D−1/2 , where D is the degree
matrix, and show all intermediate steps.
• f ({A}) = 3
• f ({B}) = 5
• f ({A, B}) = 7
• f ({A, C}) = 6
• f ({B, C}) = 8
Run the first two steps of the greedy algorithm to select k = 2 users and justify your
choices based on marginal gains.