arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

带有序检查的自顶向下归并排序的归并代价≤(ℋ+3)n

Top-Down Mergesort with Sorted Check Has Mergecost $\le(\mathcal H+3)n$

Sebastian Wild

arXiv 2608.08348首次发表:更新:

AI 中文总结

该研究提出带有序检查的自顶向下归并排序,证明其归并代价满足M≤(ℋ+3)n,其中ℋ为游程长度熵,优化了归并排序的性能。

AI 中文摘要

我们研究标准的自顶向下递归归并排序,该算法在调用归并前会进行一次比较,以检查两个递归排序的子问题是否已正确有序(若是,则可跳过归并步骤)。对于任意输入数组A[0..n),其由r个长度分别为L₁,…,Lᵣ的游程(A中最大递增连续子范围)组成,我们证明归并代价M(所有归并输出大小之和)满足M≤(ℋ+3)n,其中ℋ=∑ᵢ₌₁ʳ(Lᵢ/n)log₂(n/Lᵢ)为游程长度熵。

英文摘要

We consider standard top-down recursive Mergesort, where we do a single comparison before calling merge to check if the two recursively sorted subproblems happens to already be correctly ordered. (If so, we can skip the merging step). We show for any input $A[0..n)$ of elements consisting of $r$ runs (maximal increasing contiguous subranges in $A$) of respective lengths $L_1,\ldots, L_r$, the mergecost $M$ (the sum of output sizes of all merges) satisfies $M \le (\mathcal H+3)n$ for $\mathcal H = \sum_{i=1}^r (L_i / n) \log_2(n/L_i)$ the runlength entropy.

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑