Developing a Negative Fractional CountingSort Algorithm for Fast Real Number Sorting
DOI:
https://doi.org/10.53799/gh76b857Keywords:
Fast Counting Sorty, Mixed Numeric Arrays, Optimized Counting Sort, Linear Complexity, Computational EfficiencyAbstract
Sorting algorithms play a vital role in numerous computational processes, and the need for efficient sorting methods is expanding daily, particularly for real numbers. In this study, we extend prior work by proposing a novel sorting algorithm that handles mixed numeric arrays containing negative, positive, and fractional values. Our approach improves performance by using a counting sort with scaling and offset techniques to reduce memory utilization and computational overhead, while maintaining linear complexity of O(n + range × precision). This modification addresses limitations of the traditional counting sort when dealing with large ranges and real-number precision. We empirically show that the proposed method outperforms conventional algorithms in large datasets with moderate precision and range, providing reduced running time and better scalability. However, the algorithm is less effective for small datasets or cases requiring very high precision. The results indicate that this enhanced counting sort offers a competitive, practical solution for tasks that require sorting real numbers quickly, such as data processing and machine learning preprocessing.
References
[1] R. Sedgewick and K. D. Wayne, Algorithms, 4th ed.Upper Saddle River: Addison-Wesley, 2011.
[2] D. Sarker, D. Gomes, S. Hossain, and Md. M. Hasan, “AnEfficient Integrated Negative Fractional Counting SortAlgorithm,” in 2024 IEEE International Conference onComputing, Applications and Systems (COMPAS), Cox’sBazar, Bangladesh: IEEE, Sept. 2024, pp. 1–6. doi:10.1109/compas60761.2024.10796657.
[3] T. H. Cormen, Ed., Introduction to algorithms, 3rd ed.Cambridge, Mass: MIT Press, 2009.
[4] M. Marcellino, D. W. Pratama, S. S. Suntiarko, and K.Margi, “Comparative of advanced sorting algorithms(Quick Sort, Heap Sort, Mergesort, Intro Sort, RadixSort) based on time and memory usage,” in InternationalConference on Computer Science and ArtificialIntelligence (ICCSAI), Oct. 2021. [Online]. Available:https://doi.org/10.1109/ICCSAI53272.2021.9609715
[5] C. Song and H. Li, “Improvement of Counting SortingAlgorithm,” JCC, vol. 11, no. 10, pp. 12–22, 2023, doi:10.4236/jcc.2023.1110002.
[6] Y. Chauhan and A. Duggal, “Different sorting algorithmscomparison based upon the time complexity,”International Journal of Research and AnalyticalReviews (IJRAR), vol. 7, no. 3, pp. 114–121, 2020.
[7] S. M. Cheema, N. Sarwar, and F. Yousaf, “Contrastiveanalysis of bubble & Mergesort proposing hybridapproach,” in 2016 Sixth International Conference onInnovative Computing Technology (INTECH), Dublin,Ireland: IEEE, Aug. 2016, pp. 371–375. doi:10.1109/intech.2016.7845075.
[8] I. M. Al-Amin, A. E. Okeyinka, and A. Ibrahim,“Comparative complexity study of bubble sort andinsertion sort using Java programming language: Areview,” Journal of Science Innovation and TechnologyResearch, vol. 3, no. 9, 2024.
[9] O. Esau Taiwo, A. O. Christianah, A. N. Oluwatobi, K.A. Aderonke, and A. J. Kehinde, “Comparative study oftwo divide and conquer sorting algorithms: Quicksortand Mergesort,” Procedia Computer Science, vol. 171,pp. 2532–2540, 2020, doi: 10.1016/j.procs.2020.04.274.
[10] A. Kristo, K. Vaidya, U. Çetintemel, S. Misra, and T.Kraska, “The case for a learned sorting algorithm,” inProc. 2020 ACM SIGMOD International Conference onManagement of Data, May 2020. [Online]. Available:https://doi.org/10.1145/3318464.3389752
[11] O. Ismail and A. M. Elhabashy, “Bucket then binaryradix sort – A novel sorting technique,” in Proc. Int.Conf. Knowledge Discovery and Information Retrieval(KDIR), Part of IC3K, 2009.
[12] W.-C. Yeh and M. Forghani-Elahabad, “An efficientalgorithm for sorting and duplicate elimination by usinglogarithmic prime numbers,” Big Data and CognitiveComputing, vol. 8, no. 9, p. 96, Aug. 2024.
[13] R. Joshi, “Analysis of non-comparison based sortingalgorithms: A review.”
[14] N. A. Turzo, P. Sarker, B. Kumar, J. Ghose, and A.Chakraborty, “Defining a modified cycle sort algorithmand parallel critique with other sorting algorithms,”Global Research and Development Journal ForEngineering, vol. 55, pp. 1–8, 2020.
[15] R. N. Vilchez, “Modified selection sort algorithmemploying Boolean and distinct function in abidirectional enhanced selection technique,”International Journal of Machine Learning andComputing, vol. 10, no. 1, pp. 93–98, 2020.
[16] Z. Marszałek, “Parallelization of modified Mergesortalgorithm,” Symmetry, vol. 9, no. 9, p. 176, Sept. 2017.
[17] J. Hammad, “A Comparative Study between VariousSorting Algorithms”, [Online]. Available:http://paper.ijcsns.org/07_book/201503/20150302.pdf
[18] D. J. Mankowitz et al., “Faster sorting algorithmsdiscovered using deep reinforcement learning,” Nature,vol. 618, no. 7964, pp. 257–263, June 2023, doi:10.1038/s41586-023-06004-9.
[19] W. Deng and others, “An enhanced fast non-dominatedsolution sorting genetic algorithm for multi-objectiveproblems,” Information Sciences, vol. 585, pp. 441–453,Mar. 2022.[20] I. Ilic, I. Tolovski, and T. Rabl, “RMG Sort: Radix-Partitioning-Based Multi-GPU Sorting,” 2023, doi:10.18420/BTW2023-15.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 AIUB Journal of Science and Engineering

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
AJSE contents are under the terms of the Creative Commons Attribution License. This permits anyone to copy, distribute, transmit and adapt the work non-commercially provided the original work and source is appropriately cited.