arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.07526cs.DS
收藏

QR Sort:一种新颖的非比较排序算法

QR Sort: A Novel Non-Comparative Sorting Algorithm

Randolph T. Bushman, Tanya M. Tebcherani, Alhassan S. Yasin

AI总结:

本文提出QR Sort,一种基于商余定理与计数排序的非比较整数排序算法,通过设定参数实现线性时间复杂度,并在大范围输入序列上优于既有算法。

摘要:

本文提出并证明了QR Sort,一种新颖的非比较整数排序算法。该算法利用源自商余定理和计数排序子程序的原理,对输入序列进行稳定排序。QR Sort的一般时间和空间复杂度为O(n+d+m/d),其中n表示输入序列长度,d表示预定的正整数,m表示输入序列值范围加1。设d=sqrt(m)可将时间和空间最小化为O(n+sqrt(m)),当m<=O(n^2)时实现线性时间和空间O(n)。我们提供了实现优化,以最小化QR Sort的时间、空间复杂度、运行时和计算次数,展示了其适应性。结果显示,QR Sort常优于既有算法,在m相对n较大的输入序列中是可靠的排序算法。

英文摘要:

In this paper, we introduce and prove QR Sort, a novel non-comparative integer sorting algorithm. This algorithm uses principles derived from the Quotient-Remainder Theorem and Counting Sort subroutines to sort input sequences stably. QR Sort exhibits the general time and space complexity $\mathcal{O}(n+d+\frac{m}{d})$, where $n$ denotes the input sequence length, $d$ denotes a predetermined positive integer, and $m$ denotes the range of input sequence values plus 1. Setting $d = \sqrt{m}$ minimizes time and space to $\mathcal{O}(n + \sqrt{m})$, resulting in linear time and space $\mathcal{O}(n)$ when $m \leq \mathcal{O}(n^2)$. We provide implementation optimizations for minimizing the time and space complexity, runtime, and number of computations expended by QR Sort, showcasing its adaptability. Our results reveal that QR Sort frequently outperforms established algorithms and serves as a reliable sorting algorithm for input sequences that exhibit large $m$ relative to $n$.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑