3
$\begingroup$

Title pretty much explains the question. E.g.

http://en.wikipedia.org/wiki/Selection_algorithm#Linear_general_selection_algorithm_-_Median_of_Medians_algorithm

Should there in theory also be an algorithm with guaranteed runtime that is also linear?

Not looking for a response to this specific case necessarily, but more generally.

Thanks all.

$\endgroup$
  • 2
    $\begingroup$ Please learn Las Vegas algorithms and complexity class ZPP. The answer to your question depends on what you allow as error. $\endgroup$ – Tsuyoshi Ito Sep 20 '12 at 14:45
5
$\begingroup$

No. See Chapter 2 of the book Randomized Algorithms by Motwani and Raghavan. They discuss a tree-evaluation problem for which:

  • any deterministic algorithm takes linear time;
  • there is a Las Vegas randomized algorithm with sublinear expected running time.
| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.