COMP9313
Problem statement::
Given a directed graph,, c ompute the average length of the in – com ing edges for each node .
Input files :
In the input file,, each line is in format of::
“ EdgeId FromNodeId ToNodeId Distance ” .
In the above example,, the input i s like :
0 0 1 10.0
1 0 2 5.0
2 1 2 2.0
3 1 3 1.0
4 2 1 3.0
5 2 3 9.0
6 2 4 2.0
7 3 4 4.0
8 4 0 7.0
9 4 3 5 .00
O utput::
S et the number of reducers to 1.. Each line in t he single output file is in format of “ NodeID \ t Average length of in – com ing edges ” . The average length is of double precision ( us ing DoubleWritable)) . Remove the nodes that have no in – coming edges and s ort the output by NodeID in ascending order of its numeric value.. Given the example graph,, the output file is like::
0 \ t 7.0
1 \ t 6 .55
2 \ t 3.5
3 \ t 5 .00
4 \ t 3.0
S ubmission::
Deadline:: Sunday 1 st Apr 09::559::559 PM
Log in any CSE server ( e..gg..,, w illiams or wagner)),, and u se the give command below to submit your solutions :
$ give cs9313 assignment 1 EdgeAvgLen1 .jjava EdgeAvgLen2 .jjava
O r you can submit through::
https::////ccgi..ccse..uunsw..eedu..aau//~~ggive//SStudent//ggive..pphp
If you submit your assignment more than once,, the last submission will replace the previous one.. To prove successful submission,, please take a screenshot as assignment submission instructions show and keep it by yourself.. If you have any problems in submissions,, please email to
xuefeng..cchen @ student .uunsw..eedu..aau
.
Late submission penalty
You will receive zero marks for this assignment..
Plagiarism :
The work you submit must be your own work.. Submission of work partially or completely derived from any other person or jointly written with any other person is not permitted.. The penalties for such an offence may include negative marks,, automatic failure of th e course and possibly other academic discipline.. Assignment submissions will be examined manually.. Relevant scholarship authorities will be informed if students holding scholarships are involved in an incident of plagiarism or other misconduct.. Do not provide or show your assignment work to any other person – apart from the teaching staff of this subject.. If you knowingly provide or show your assignment work to another person for any reason,, and work derived from it is submitted you may be penali zed,, even if the work was submitted without your knowledge or consent..