Question: 20 points Consider the following problem. Two weather stations periodically take temperature data samples. Each data point consists of a pair, (d,t) where d is

 20 points Consider the following problem. Two weather stations periodically take

20 points Consider the following problem. Two weather stations periodically take temperature data samples. Each data point consists of a pair, (d,t) where d is the date/time of the sample and t is the temperature. The two weather stations are not necessarily synchronized, however. The collections of data are not necessarily in chronological order and may or may not contain samples on the same time(s) or the same temperature(s). The problem is to detect data anomalies in which the two stations differ in temperature (a) Consider the following algorithm that solves this problem (dn't.) and B= {(Di,Ti), (Dn,T,)) input : Two lists of date/temperature data. A-((di,h), output: All data points that differ for i-1....n do for j = 1, if d ndo D, then if ti T, then 1 output ((4%), (D,,T;)) end end end end Analyze this algorithm using the 5-step process and give an asymptotic characterization of the algorithm. (b) How wel would this algorithm perform in practice? Suppose our machine can process data at 1 mlion pairs per second. How long would it take to execute this algorithm on the following input 1. n 100 2. n 10,000 3. n-1,000, 000 4. n 10, 000, 000 5. n-1,000, 000, 000 (c) Can you do better? Design a better algorithm and give a full analysis. Indicate how fast your algorithm would run on the machine that can process 1 million pairs per second

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!