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

  Discuss the technological advancements and challenges

Discuss the Technological Advancements and Challenges. You have been tasked with creating a press release to make this decision public.

  What technology assessment made amory lovins famous

What are the purposes of Technological Assessment? How is this process similar and different from Environmental Assessment - Explain the perspective of technology "questioners" such as Neil Postman? How is this different from the perspective of tech..

  How mass-volume effect perception of each work

Distinguish: Quennefer, Steward of Palace, Man Pointing & Dancing Krishna. How have artists considered Open / Closed Forms?

  Calculate the required flow rate of low pressure steam

Determine the required flow rate (in kg/sec) of low pressure steam (P = 1 bar, T = 200°C) required in the heat exchanger if all of the steam fed condenses isobarically.)

  Explain how would you promote your completed strategic plan

Primary Task Response: The Discussion- How would you promote your completed strategic plan so that your organization would benefit from the plan? Explain.

  What are the advantages for teenagers maturing early

What are the advantages and disadvantages for teenagers maturing early or late?

  What does machiavelli seem to believe on this score

In political thought prior Machiavelli, leaders are encouraged to put their ultimate hope in God, who is believed to be active in human affairs.

  Four perspectives on power in organizations

Examine the four perspectives on power in organizations and outline their weaknesses. Which model best fits the organization which you are most familiar?

  Explain the role of the us supreme court in criminal justice

Explain the role of the U.S. Supreme Court in criminal justice policy making. Explain how the court's decisions changed the selected criminal justice policy.

  Maximum revenue to be generated for this configuration

Suppose product A sells for $125/unit, product B sells for $175/unit, and product C sells for $100/unit. And suppose that all products have a guaranteed buyer (i.e., no matter how many are produced it will be sold for the asking price), and that you ..

  Procedural controls for decreasing incidence

Determine and discuss at least two procedural controls for decreasing the incidence of employee theft. Discuss security's role in labor disputes.

  The nature of the companys communication strategy of state

write one page analyzethe nature of the companys communication strategy of state farm insurance

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