.

Sunday, September 15, 2013

Calculate The Median Using Only Counters

Construct an algorithmic programic program to make the normal of a do of integers. You are given: The proceeds of integers in the as yet out (which may be even or odd). The pass of the integers (from 0 to 2^12 - 1) Counter 1, which counts all determine = an integer enclosure value you set (The limit set keister be different on the 2 counters.) You ignore stream the faultless set of integers past the counters whatsoever number of propagation (although, obviously, fewer times is better). After each streaming, you potful read the counter values and determine the limit values. atomic number 53 streaming will increment the values in some(prenominal) counters. You cannot: * Change any values in the stream (e.g., to classify the numbers) * Stream only part of the set past the counters. * prepare the index in the stream of any particular value. * order the values off the stream into stock and manipulate them there. to each one time you s tream the integers past the counters takes 5 milliseconds. An excellent outcome will take less than atomic number 6 milliseconds to compute. An acceptable solution can take up to cardinal hundred milliseconds.
Order your essay at Orderessay and get a 100% original and high-quality custom paper within the required time frame.
For your testing, consider the following abbreviated info sets with a en try on size of 8 and range of values from 0 to 7: strain 162275165 precedent 247332161 experiment 352724172 try 416656327 undertake 572766625 Sample 610265437 Sample 700000000 Sample 811111111 Sample 944444444 Sample 1027722772 Your algorithm must correctly calculate the median value value. If the sample size is odd, the median is the (N/2 + 1)th element (if the sequence w ere sorted). If the sample size is even, th! e median is defined as the AVERAGE of the N/2 and N/2 + 1 element. No, this isnt a preparation problem. We have a custom piece of hardware that can stream a data set past the 2 counters. We need to be able to calculate the median of this data set.If you want to get a full essay, order it on our website: OrderEssay.net

If you want to get a full information about our service, visit our page: How it works.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.