arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.20362cs.DScs.CC
收藏

TwinArray Sort:一种超快速条件非比较排序算法

TwinArray Sort: An Ultrarapid Conditional Non-Comparison Based Sorting Algorithm

Amin Amini

AI总结:

本文提出TwinArray Sort,一种利用双辅助数组和条件去重验证的非比较排序算法,达到O(n+k)复杂度,在多种数据分布下优于传统排序算法,适用于大规模数据处理和机器学习数据集管理。

摘要:

在计算机科学中,排序算法对于数据处理和机器学习至关重要。大规模数据集和高效率需求给基于比较的算法(如 Quicksort 和 Merge sort)带来了挑战,这些算法的时间复杂度为 O(n log n)。非比较算法(如 Spreadsort 和 Counting Sort)虽然在某些情况下可以达到线性时间复杂度,但存在内存消耗问题和相对较高的计算需求。我们提出了 TwinArray Sort,这是一种新颖的条件非比较排序算法,能够有效利用数组索引。在最坏情况时间和空间复杂度方面,TwinArray Sort 达到 O(n+k)。该方法在所有设置下都保持高效,并且适用于随机排序、逆序排序或近似排序分布的数据集。TwinArray Sort 能够处理重复元素并优化内存使用,因为它使用两个辅助数组分别进行值存储和频率计数,并配备一个条件去重数组验证器。实验评估表明,TwinArray Sort 始终优于传统算法,尤其是在所有数据分布场景下对无重复数组进行排序时。该方法适用于大规模数据处理和机器学习数据集管理,这得益于其创造性地使用双辅助数组和条件去重数组验证,从而改善了内存使用和重复元素处理。TwinArray Sort 通过将前沿方法与非比较排序的优势相结合,突破了传统排序算法的限制。其在多种数据分布下的可靠性能使其成为满足当代计算需求的一种适应性强且有效的解决方案。

英文摘要:

In computer science, sorting algorithms are crucial for data processing and machine learning. Large datasets and high efficiency requirements provide challenges for comparison-based algorithms like Quicksort and Merge sort, which achieve O(n log n) time complexity. Non-comparison-based algorithms like Spreadsort and Counting Sort have memory consumption issues and a relatively high computational demand, even if they can attain linear time complexity under certain circumstances. We present TwinArray Sort, a novel conditional non-comparison-based sorting algorithm that effectively uses array indices. When it comes to worst-case time and space complexities, TwinArray Sort achieves O(n+k). The approach remains efficient under all settings and works well with datasets with randomly sorted, reverse-sorted, or nearly sorted distributions. TwinArray Sort can handle duplicates and optimize memory efficiently since thanks to its two auxiliary arrays for value storage and frequency counting, as well as a conditional distinct array verifier. TwinArray Sort constantly performs better than conventional algorithms, according to experimental assessments and particularly when sorting unique arrays under all data distribution scenarios. The approach is suitable for massive data processing and machine learning dataset management due to its creative use of dual auxiliary arrays and a conditional distinct array verification, which improves memory use and duplication handling. TwinArray Sort overcomes conventional sorting algorithmic constraints by combining cutting-edge methods with non-comparison-based sorting advantages. Its reliable performance in a range of data distributions makes it an adaptable and effective answer for contemporary computing requirements.

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

↑