Questions tagged «selection»

2
确切的比较次数以计算中位数
Knuth的《计算机编程艺术》第三章(第5章,第3.2节)包括下表,该表列出了从大小为的未排序集合中选择第个最小元素对所有所需的确切最小比较数。。该表中,与公知的封闭形式的表达式沿和,表示大部分的现有技术的状态的作为1976年。Ñ 1 ≤ 吨≤ Ñ ≤ 10 V 1(Ñ )= ñ - 1 V 2(Ñ )= ñ - 2 + ⌈ Ñ / 2 ⌉Ťttñnn1 ≤ 吨≤ Ñ ≤ 101≤t≤n≤101\le t \le n\le 10V1个(n )= n − 1V1(n)=n−1V_1(n) = n-1V2(Ñ )= ñ - 2 + ⌈ Ñ / 2 ⌉V2(n)=n−2+⌈n/2⌉V_2(n) …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.