Design map reduce algorithms

Assignment Help Data Structure & Algorithms
Reference no: EM131221499

Q1. Prove or disprove each of the following relational algebra identities. These means that if they are true of all relations R and S of the same arity, then give a formal proof, otherwise provide a counterexample of two relations R and S of the same arity for which the identity fails.

(a) π1,2(R) U π1,2(S) = π1,2(R U S)

(b) π1,2(R) ∩ π1,2(S) = π1,2(R ∩ S)

(c) π1,2 (R \ S) = π1,2(R) \ π1,2(S)

(d) σ1=a(R \ S) = σ1=a(R)\ σ1=a(S)

Q2. Consider the relational schema about drinkers, beers, and bars, from the lecture slides "Relational algebra and SQL," slides nos. 31 and 32.

Express the following queries in (i) relational algebra, and in (ii) SQL

(a) Print the bars that serve a beer that drinker Bill likes.

(b) Print the drinkers that frequent at least one bar that serves a beer they like.

(c) Print the drinkers that frequent only bars that serve some beer they like. (Assume each drinker likes at least one beer and frequents at least one bar.)

(d) Print the drinkers that frequent no bar that serves a beer that they like.

Q3. Design Map Reduce algorithms to take a very large file of integers and produce as output:

(a) The largest integer.

(b) The average of all integers.

(c) The same set of integers, but with each integer appearing only' once.

(d) The count of the number of distinct integers in the input.

Q4. In the form of relational algebra implemented in SQL, relations are not sets, but bags; that is, tuples are allowed to appear more than once. There are extended definitions of union, intersection, and difference for bags, which we shall define below. Write Map Reduce algorithms for computing the following operations on bags R and S:

(a) Bag Union, defined to be the bag of tuples in which tuple t app ears the sum of the numbers of times it appears in R and S.

(b) Bag Intersection, defined to be the bag of tuples in which tuple t appears the minimum of the numbers of times it appears in R and S.

(c) Bag Difference, defined to be the bag of tuples in which the number of times a tuple t appears is equal to the number of times it appears in R minus the number of times it appears in S. A tuple that appears more times in S than in R does not appear in the difference.

Q5. The Hamming distance between a pair of bit-strings of the same length is the number of bits in which they differ.

Design a map-reduce algorithm that takes as input a (huge) set of bit-strings of length b, and outputs all pairs of strings that are at most distance d from each other.

Reference no: EM131221499

Questions Cloud

How much thought have you given to the way you practice : How much thought have you given to the way you practice engineering and its relationship to the quality of work you and your company succeeds?
Compute the mahalanobis distance between the origin : Suppose a cluster of three-dimensional points has standard deviations of 2, 3, and 5, in the three dimensions, in that order. Compute the Mahalanobis distance between the origin (0, 0, 0) and the point (1, -3, 4).
Discuss three aspects of the american judicial system : An analysis of at least three aspects of the American judicial system (such as eyewitness testimony, transfer of juveniles to criminal court, etc.), which are impacted most heavily by psychology and psychological research (3 pages). Be sure to dis..
Worldview impact personal reactions : Within difficult circumstances how can a worldview impact personal reactions? Within positive circumstances how can a worldview impact personal reactions?
Design map reduce algorithms : Design Map Reduce algorithms to take a very large file of integers and produce as output: The largest integer.  The average of all integers. The same set of integers, but with each integer appearing only' once
What potential synergies drove the merger : Summarize the chronology of events from the first offer that was made by the acquiring firm until the final acquisition was agreed. Include information about other firms that were involved, even in an indirect manner (for example, where there any “wh..
Compute the radius in the sense used by the grgpf algorithm : Compute the radius, in the sense used by the GRGPF Algorithm (square root of the average square of the distance from the clustroid) for the cluster that is the five points in the lower right of Fig. 7.8. Note that (11,4) is the clustroid.
Prepare t-accounts for accounts receivable : During the year FC estimated doubtful accounts expense at 1% of credit sales. At year end, FC ages its accounts receivable and adjusts the balances in Allowance for Doubtful Accounts to correspond to the aging schedule. Prepare an aging schedule. Pre..
Distinction between good nervousness and bad nervousness : Many musicians and performers make a distinction between "good nervousness" and "bad nervousness" - What do you think this distinction means? How does it apply to public speaking?

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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