lundi 29 février 2016

How to sort a list of weighted objects in O(n(logn)^2) if the scale used to weigh each object has a 1/3 chance of making an error?

The scale may return the wrong answer with probability at most 1/3. Every time we measure the weight of a stone we have probability 1/3 of getting the wrong answer independently from measure of the weight in previous measures. The scale is used for comparisons. The probability that the sorting is wrong has to be less than 0.01. The malfunction is random.

I've thought about this problem for a while. I think it has to be a randomized algorithm and we use repetition to get a high probability of it succeeding. I think we can prove that the algorithm is correct using Chernoff bounds.




Aucun commentaire:

Enregistrer un commentaire