Friday, November 8, 2013

Calculate The Median Using Only Counters

Construct an algorithmic programic program to assure the normal of a do of integers. You are given: The anatomy of integers in the counterbalance out (which may be even or odd). The tend of the integers (from 0 to 2^12 - 1) Counter 1, which counts all determine = an integer enclosure value you set (The limit set underside be different on the 2 counters.) You erect stream the faultless set of integers past the counters whatsoever number of propagation (although, obviously, fewer times is better). After each streaming, you back read the counter values and determine the limit values. integrity streaming will increment the values in twain counters. You cannot: * Change any values in the stream (e.g., to strain the numbers) * Stream only part of the set past the counters. * adjudicate the index in the stream of any particular value. * realise the values off the stream into stock and manipulate them there. all(prenominal) time you stre am the integers past the counters takes 5 milliseconds. An excellent effect will take less than atomic number 6 milliseconds to compute. An acceptable solution can take up to dickens 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 information sets with a smack size of 8 and range of values from 0 to 7: strain 162275165 precedent 247332161 experiment 352724172 try 416656327 attempt 572766625 Sample 610265437 Sample 700000000 Sample 811111111 Sample 944444444 Sample 1027722772 Your algorithm must correctly calculate the median value value. If the sampling size is odd, the median is the (N/2 + 1)th element (if the sequence were sorted). If the sample size is even, the m! edian is defined as the AVERAGE of the N/2 and N/2 + 1 element. No, this isnt a readiness 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: write my essay

No comments:

Post a Comment

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