2012-12-11

Practice final solution for Problem 10.

Originally Posted By: ranjith
10. Ignoring dangling nodes and the random jump factor give the mapper and reducer for a Map Reduce implementation of page rank.

Ans.

MAP REDUCE IMPLEMENTATION OF PAGE RANK
Let epsilon be the constant we used to decide if we stop.
Compute initial current_r
do
{
store in distributed file system [DFS] current_r as old_r.
Do map reduce job to compute A* current_r
where A is the normalized adjacency matrix
store result in DFS as current_r
Do map reduce job to compute len = ||current_r - old_r || /*A seperate map reduce job should be created to calculate (current_r_old_r) */ᵋ
} while (len>epsilon)
output current_r as page rank

class MAPPER [to calculate A*current_r]
method MAP(nid n , Node N)
p Pass Page rank to neighbors

class REDUCER
method REDUCE ( nid m , [p1, p2,....])
m ranjith — Tue Dec 11, 2012 11:43 am <hr>
'''Originally Posted By: ranjith''' 10. Ignoring dangling nodes and the random jump factor give the mapper and reducer for a Map Reduce implementation of page rank.<br><br>Ans.<br><br>MAP REDUCE IMPLEMENTATION OF PAGE RANK<br>Let epsilon be the constant we used to decide if we stop.<br>Compute initial current_r<br>do<br>{<br>store in distributed file system [DFS] current_r as old_r.<br>Do map reduce job to compute A* current_r<br>where A is the normalized adjacency matrix<br>store result in DFS as current_r<br>Do map reduce job to compute len = ||current_r - old_r || /*A seperate map reduce job should be created to calculate (current_r_old_r) */ᵋ<br>} while (len&gt;epsilon)<br>output current_r as page rank<br><br>class MAPPER [to calculate A*current_r]<br>method MAP(nid n , Node N)<br>p Pass Page rank to neighbors<br><br>class REDUCER<br>method REDUCE ( nid m , [p1, p2,....])<br>m ranjith &mdash; Tue Dec 11, 2012 11:43 am <hr>
X