We examine sorting algorithms for $n$ elements whose basic operation is comparing $t$ elements simultaneously (a $t$-comparator). We focus on algorithms that use only a single round or two rounds -- comparisons performed in the second round depend on the outcomes of the first round comparators. We design deterministic and randomized algorithms. In the deterministic case, we show an interesting relation to design theory (namely, to 2-Steiner systems), which yields a single-round optimal algorithm for $n=t^{2^k}$ with any $k\ge 1$ and a variety of possible values of $t$. For some values of $t$, however, no algorithm can reach the optimal (information-theoretic) bound on the number of comparators. For this case (and any other $n$ and $t$), we show an algorithm that uses at most three times as many comparators as the theoretical bound. We also design a randomized Las-Vegas two-rounds sorting algorithm for any $n$ and $t$. Our algorithm uses an asymptotically optimal number of $O(\max(\frac{n^{3/2}}{t^2},\frac{n}{t}))$ comparators, with high probability, i.e., with probability at least $1-1/n$. The analysis of this algorithm involves the gradual unveiling of randomness, using a novel technique which we coin the binary tree of deferred randomness.
翻译:我们研究了针对 $n$ 个元素的排序算法,其基本操作是同时比较 $t$ 个元素(即 $t$-比较器)。我们重点关注仅使用单轮或两轮的算法——第二轮进行的比较依赖于第一轮比较器的结果。我们设计了确定性和随机化算法。在确定性情形下,我们展示了其与设计理论(具体而言,与 2-斯坦纳系统)的有趣关联,从而为 $n=t^{2^k}$(其中 $k\ge 1$ 且 $t$ 可取多种值)设计出单轮最优算法。然而,对于某些 $t$ 值,算法无法达到比较器数量的最优(信息论)界。针对这种情况(以及任意其他 $n$ 和 $t$),我们给出了一种算法,其使用的比较器数量最多为理论界的3倍。我们还为任意 $n$ 和 $t$ 设计了一种随机化拉斯维加斯两轮排序算法。该算法使用渐近最优的 $O(\max(\frac{n^{3/2}}{t^2},\frac{n}{t}))$ 个比较器,且成功概率很高(即至少为 $1-1/n$)。该算法的分析涉及对随机性的逐步揭示,我们使用了一种新颖的技术,并将其命名为“延迟随机性二叉树”。