I have an Algorithm course this semester. Everything is fine until I reached the lecture about Order Statistics.
Here is the first slide of that lecture:
Order Statistics
Select the ith smallest of n elements (the
element with rank i).
• i = 1: minimum;
• i = n: maximum;
• i = ⎣(n+1)/2⎦ or ⎡(n+1)/2⎤: median.
Naive algorithm: Sort and index ith element.
Worst-case running time = Θ(n lg n) + Θ(1)
= Θ(n lg n)
I cannot understand what are the following:
What is Order Statistics?
What does it mean on the ith smallest of n eleents? please I need an example to know what is "ith"!!
Any simple explanation about these?
All I know is that this is related to Divide and Conquer, because the next slide is about it :).
"Order statistics" is a fancy name for "K-th element of an N-element sequence sorted in ascending order". The rest of the slide simply illustrates the idea, explaining that 1-order statistics is the smallest element in a sequence, n-order statistics is the largest element, n/2
order statistics is the median, and so on.