Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In pseudocode rather than actual java, c, or python code write Map and Reduce functions in pseudocode for the following problem: Assume that you have

In pseudocode rather than actual java, c, or python code write Map and Reduce functions in pseudocode for the following problem:

Assume that you have the Twitter follower list for a large number of users. The follower list is provided in the following format:

first user's twitter handle, second user's twitter handle to indicate that the second user is a follower of the first user.

For example, alice01, bob02 would indicate that bob02 follows alice01.

1. Given input data containing many such user, follower pairs, write map and reduce functions to calculate the total number of followers for each user. The output file should contain the user names followed by a comma followed by a number indicating the number of followers of the user.

For example, if alice01 has 7 followers, then the output should contain the line alice01, 7

[Hint: You can adapt the word count example to solve the above problem]

2. Given input data containing many such user, follower pairs, write map and reduce functions to calculate the number of common followers for all pairs of users.

For example, if alice01 and bob02 has 3 common followers, then the output should contain the line alice01, bob02, 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions