Write map-reduce functions for computing

Assignment Help Other Subject
Reference no: EM131731799

Write map-reduce functions for computing the degree distribution of a massive social network such as Facebook.

No actual code is needed; pseudocode is sufficient. To see an example of what pseudocode looks like, see slide 12 of the map-reduce lecture slides on Canvas.

The input given to you describes a dataset of nodes connected to each other via edges. An example of such a network could be the Facebook network, in which the users denote nodes and two nodes are connected by an edge if the corresponding users are friends with each other.

The degree of a node in a network is the number of connections it has to other nodes.

The degree distribution is the distribution of these degrees over the whole network.

As an example, you can assume that the input you are given is an edgelist in the form of a table as shown below. This table shows pairs of edges connected to each other and thus capture the graph shown on the right:
NODE 1 NODE 2
A B
A C
A D
B C
C A
C B
D A

The degree distribution for the above graph is given as:
Degree Count
1 2
2 1
3 1

As you can see, we have two nodes with degree 1 (which are B and D), one node with degree 2 (which is), and one node with degree 3 (which is A). Thus, the degree distribution captures, for each value of degree, the number of nodes that have that degree. Note that the sum of the counts (i.e., 4) equals the number of nodes in the network/graph.

Reference no: EM131731799

Questions Cloud

Propose a diagnosis based on the patients symptoms : Analyze and explain how the patient meets criteria for the disorder(s) according to the patient's symptoms and the criteria outlined in the diagnostic manual.
How many cases of cereal should foods galore order : How many cases of cereal should Foods Galore order each time it places an order? What will be the average inventory?
Discuss statement-breathing capacities : Suppose the following statement is made in a statistical summary: "A comparison of breathing capacities of individuals in households with low nitrogen dioxide.
Her feet and legs often swell to twice their normal size : Her feet and legs often swell to twice their normal size .The patient takes 80 mg of furosemide lasix each morning
Write map-reduce functions for computing : Write map-reduce functions for computing the degree distribution of a massive social network such as Facebook - The degree of a node in a network is the number
Describe the blood pressure levels for populations : Consider blood pressure levels for populations of young women using birth control pills and young women not using birth control pills.
Should mental disorders be utilized as a defense in court : Critical Thinking Based on the information in the text, and as an officer, develop a "New Theory" of Personality. Name it, describe it, and defend it.
How has your culture influenced your personality development : Have you experienced any challenges with cultural expectations for personality and how you perceive your personality to be?
Explain how you will over come the team structure issues : Explain how you will over come the below issues while managing your global team - global team to study the internet affects on university students nowadays

Reviews

inf1731799

12/26/2017 5:23:20 AM

This problem can be solved with only one map/reduce job. write pseudo-code, Using the concept of a dictionary/array for keeping the degrees will be right for this assignment, It’s about concept of using arrays/dictionary for keeping the degrees If you understood the solution I posted from the instructor, then you get understand the problem that was presented to you for this assignment I have attached the complete solution from the instructor. You have to do Map/Reduce on the output after first run of Map/Reduce, Thanks keep in mind these thing while preparing the solution of this assignment. # convert count (currently a string) to int try: count = int(count) except ValueError: # count was not a number, so silently # ignore/discard this line continue # this IF-switch only works because Hadoop sorts map output # by key (here: node) before it is passed to the reducer I have received the solution thanks.

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd