Analysis of Approximate Median Selection
- M. Hofri
Analysis of Approximate Median Selection M. Hofri Department of - - PDF document
Analysis of Approximate Median Selection M. Hofri Department of Computer Science, WPI Collaborators: Domenico Cantone & students Universit` a di Catania, Dipartimento di Matematica Svante Janson Department of Mathematics, Uppsala
2
Sicilian Median Selection 3
12 22 26 13 21 7 10 2 16 5 11 27 9 17 25 23 1 14 20 3 8 24 15 18 19 4 6 22 13 10 11 17 14 8 18 6 13 14 8 13
s ✰ ❯ ☛ ❄
4
3(n−1).
3(n−1).
1 2(n−1).
Sicilian Median Selection 5
a,b def
3 = 3r−1 entries.
6
(n/3)! (b−1)!(n
3−b)! = n
3
3−1
b−1
i
3 −b
a,b = 2n(a−1)!(n−a)!
3 −1
i
3 −br
a,b = q(r) a,b/n!:
a,b = 2
3−1
b−1
a−1
i
3 −b
3−1
b−1
a−1
n 3−b.
Sicilian Median Selection 7
a : the probability that the algorithm chooses
a
a,brP(r−1) br
br,br−1,···,b3
a,brp(r−1) br,br−1 ··· p(2) b3,2
a
a−1
br,br−1,···,b3 r
j=2 ∑ ij≥0
8
Sicilian Median Selection 9 0.05 0.1 0.15 0.2 0.25 8 10 12 14 16 18 20
10 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 20 40 60 80 100 120 140 160 180 200 220
Sicilian Median Selection 11
n , but—due to the indpendence
12
2
r (x)(1−Fr(x))+F3 r (x)
r (x)−2F3 r (x).
Sicilian Median Selection 13
2Gr(x)−2G3 r(x).
2
1 2
n → 0,
def
2 .
2
14
2
Sicilian Median Selection 15
16
k≥1
Sicilian Median Selection 17
k bk 1 1.00000000000000×10+00 2 −1.06666666666667×10+00 3 1.05025641025641×10+00 4 −8.42310905468800×10−01 5 5.66391554459281×10−01 6 −3.29043692201665×10−01 7 1.69063219329527×10−01 8 −7.82052123482121×10−02 9 3.30170547707520×10−02 10 −1.28576608229956×10−02 11 4.65739657183461×10−03 12 −1.57980373987906×10−03 13 5.04579631846217×10−04 14 −1.52443954167610×10−04 15 4.37348017371645×10−05 20 −4.33903859413399×10−08 25 1.70629958951577×10−11 30 −3.20126276232555×10−15 40 −1.94773425996709×10−23 50 −1.85826863188012×10−32 60 −4.03988860877434×10−42
We show an example later.
18
Sicilian Median Selection 19
20
d