We continue the study of selection and sorting of $n$ numbers under the adversarial comparator model, where comparisons can be adversarially tampered with if the arguments are sufficiently close. We derive a randomized sorting algorithm that does $O(n \log^2 n)$ comparisons and gives a correct answer with high probability, addressing an open problem of Ajtai, Feldman, Hassadim, and Nelson [AFHN15]. Our algorithm also implies a selection algorithm that does $O(n \log n)$ comparisons and gives a correct answer with high probability. Both of these results are a $\log$ factor away from the naive lower bound. [AFHN15] shows an $\Omega(n^{1+\varepsilon})$ lower bound for both sorting and selection in the deterministic case, so our results also prove a discrepancy between what is possible with deterministic and randomized algorithms in this setting. We also consider both sorting and selection in rounds, exploring the tradeoff between accuracy, number of comparisons, and number of rounds. Using results from sorting networks, we give general algorithms for sorting in $d$ rounds where the number of comparisons increases with $d$ and the accuracy decreases with $d$. Using these algorithms, we derive selection algorithms in $d+O(\log d)$ rounds that use the same number of comparisons as the corresponding sorting algorithm, but have a constant accuracy. Notably, this gives selection algorithms in $d$ rounds that use $n^{1 + o(1)}$ comparisons and have constant accuracy for all $d = \omega(1)$, which still beats the deterministic lower bound of $\Omega(n^{1+\varepsilon})$.
翻译:我们继续研究在对抗性比较器模型下对$n$个数的选择与排序问题,其中若比较对象足够接近,比较结果可能受到对抗性篡改。我们提出一种随机化排序算法,仅需$O(n \log^2 n)$次比较并以高概率给出正确结果,解决了Ajtai、Feldman、Hassadim和Nelson [AFHN15]提出的开放问题。该算法还蕴含一种选择算法,仅需$O(n \log n)$次比较并以高概率给出正确结果。这两个结果均与朴素下界相差一个$\log$因子。[AFHN15]表明确定情形下排序和选择均存在$\Omega(n^{1+\varepsilon})$下界,因此我们的结果还证明了在该场景中确定性与随机化算法能力存在差异。我们同时考虑轮次中的排序与选择问题,探索精度、比较次数与轮次数之间的权衡。基于排序网络的理论,我们给出一般性排序算法:在$d$轮中比较次数随$d$增加而增加,而精度随$d$增加而降低。利用这些算法,我们推导出$d+O(\log d)$轮的选择算法,其比较次数与对应排序算法相同,但具有恒定精度。值得关注的是,这给出了$d$轮中选择算法使用$n^{1+o(1)}$次比较且对所有$d = \omega(1)$保持恒定精度,这仍能突破$\Omega(n^{1+\varepsilon})$的确定下界。