Selection Problem: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
=Internal=
=Internal=


* [[Data Structures and Algorithms#Selection_Problem|Data Structures and Algorithms]]
* [[Algorithms#Selection_Problem|Algorithms]]
* [[Sorting Algorithms#Overview|Sorting Algorithms]]
* [[Sorting Algorithms#Overview|Sorting Algorithms]]



Revision as of 23:17, 28 May 2019

Internal

Overview

The ith order statistic of a set of n numbers is the ith smallest number in the set.

Finding the ith order statistic of a set of n distinct numbers is known as the selection problem. Finding the median is a particular case of the selection problem. The selection problem can be resolved generically by sorting the entire set and then selecting the desired element. However, key comparison sorting cannot be done more efficiently than Ω(n lgn), and more specialized and faster algorithms exist.

The general selection problem can be resolved with a randomized divide-and-conquer algorithm with an expected running time of Θ(n). The algorithm is somewhat similar to the one used by randomized Quicksort.

TODO CLRS page 213.