The problem of sorting with priced information was introduced by [Charikar, Fagin, Guruswami, Kleinberg, Raghavan, Sahai (CFGKRS), STOC 2000]. In this setting, different comparisons have different (potentially infinite) costs. The goal is to find a sorting algorithm with small competitive ratio, defined as the (worst-case) ratio of the algorithm's cost to the cost of the cheapest proof of the sorted order. The simple case of bichromatic sorting posed by [CFGKRS] remains open: We are given two sets $A$ and $B$ of total size $N$, and the cost of an $A-A$ comparison or a $B-B$ comparison is higher than an $A-B$ comparison. The goal is to sort $A \cup B$. An $\Omega(\log N)$ lower bound on competitive ratio follows from unit-cost sorting. Note that this is a generalization of the famous nuts and bolts problem, where $A-A$ and $B-B$ comparisons have infinite cost, and elements of $A$ and $B$ are guaranteed to alternate in the final sorted order. In this paper we give a randomized algorithm InversionSort with an almost-optimal w.h.p. competitive ratio of $O(\log^{3} N)$. This is the first algorithm for bichromatic sorting with a $o(N)$ competitive ratio.
翻译:带价格信息的排序问题由[Charikar, Fagin, Guruswami, Kleinberg, Raghavan, Sahai (CFGKRS), STOC 2000]提出。在该问题中,不同比较操作具有不同(可能为无穷大)的成本。目标是寻找一种竞争比小的排序算法,其中竞争比定义为算法最坏情况成本与排序顺序最廉价证明成本之比。[CFGKRS]提出的双色排序简单情形仍未解决:给定两个集合$A$和$B$,总规模为$N$,其中$A$内部或$B$内部的比较成本高于$A$与$B$之间的比较成本,需要对$A \cup B$进行排序。由于单位成本排序问题,竞争比存在$\Omega(\log N)$的下界。值得注意的是,这是经典螺母螺栓问题的推广形式——在螺母螺栓问题中$A$内部和$B$内部的比较成本为无穷大,且最终有序序列中$A$与$B$元素必然交替排列。本文提出随机化算法InversionSort,其高概率竞争比达到$O(\log^{3} N)$,接近最优。这是首个具有$o(N)$竞争比的双色排序算法。