Project: PageRank Algorithm · Random Walks on Graphs

Lesson 3

Nikolai Chukhin · Alexander S. Kulikov

Using the law of total probability, one finds out that \[\begin{align*}\Pr[\text{one ends up in the node \(3\)}]\\&=\Pr[s=0] \cdot \Pr[\text{edge \((0, 3)\) is chosen}]\\&+\Pr[s=1] \cdot \Pr[\text{edge \((1, 3)\) is chosen}]\\&+\Pr[s=2] \cdot \Pr[\text{edge \((2, 3)\) is chosen}]\\&+\Pr[s=3] \cdot \Pr[\text{edge \((3, 3)\) is chosen}]\\&+\Pr[s=4] \cdot \Pr[\text{edge \((4, 3)\) is chosen}]\\&=\frac{1}{5}\cdot 0 +\frac{1}{5}\cdot \frac{1}{4}+\frac{1}{5}\cdot \frac{1}{3}+\frac{1}{5}\cdot 0 + \frac{1}{5}\cdot 1\\&=\frac{19}{60}.\end{align*}\] Basically, this answer is the result of scalar multiplication of the original distribution vector \((1/5, 1/5, 1/5, 1/5, 1/5)\) and the vector \((0, 1/4, 1/3, 0, 1)\) containing the probability of arriving at \(3\) from each of the five nodes.