10.1145/3377713.3377808acmotherconferencesArticle/Chapter ViewAbstractPublication PagesacaiConference Proceedingsconference-collections
research-article

Comparing Four Important Sorting Algorithms Based on Their Time Complexity

Authors Info & Claims
Published:07 February 2020Publication History

ABSTRACT

Time complexity and memory complexity are significant for all algorithms, especially sorting algorithms. Using the right sorting algorithm for our data can possibly decrease time and memory usage. The sorting problem has attracted a great deal of attention because efficient sorting is essential to optimize other algorithms as well. Most of the time, a sorting algorithm consists of two nested loops, which can determine the complexity of the algorithm; however, other factors such as the number of data and data types play an important role as well. Thus, by using the right sorting algorithm, we can make more efficient use of time and memory. In this paper, we use different sorting algorithms for different data types in order to determine the optimum use of time and memory for these algorithms. It means that if we know what kind of dataset we have, it can help us to use a more efficient algorithm even close to linear time. One of the interesting results is shell sort. So, by checking each type of data, like primes, Fibonacci, odd, and even datasets, we can know more information about each sorting algorithm. Also, we can determine which algorithm needs additional memory for sorting and which does not. To reduce the time and memory allocation, we use various data, such as numbers in random order or reverse order, as well as a large number of data and a small number of data. By comparing the results, the optimal algorithm in various scenarios may be recognized.

References

  1. Sipser, M., 2006. Introduction to the Theory of Computation (Vol. 2). Boston: Thomson Course Technology.Google ScholarGoogle Scholar
  2. Hammad, Jehad. "A Comparative Study between Various Sorting Algorithms." International Journal of Computer Science and Network Security (IJCSNS), vol. 15, no. 3, (2015), pp 11--12.Google ScholarGoogle Scholar
  3. Yadav, Neelam, and Sangeeta Kumari. "SORTING ALGORITHMS." International Research Journal of Engineering and Technology (IRJET), vol. 03, no. 02, (2016), pp 528--529.Google ScholarGoogle Scholar
  4. Ayush Pathak, Abhijeet Vajpayee, Deepak Agrawal," A Comparative Study of Sorting Algorithm Based on Their Time Complexity"International Journal of Engineering Sciences & Research Acropolis Institute of Technology & Research, Indore, India(IJESRT), vol. 03, no. 12, (2014), pp 629--631Google ScholarGoogle Scholar
  5. Rajagopal, D., and K. Thilakavalli. "Different Sorting Algorithm's Comparison based Upon the Time Complexity." International Journal of u-and e-Service, Science and Technology (IJUNESST), vol. 9, no. 8, (2016), pp. 287--296.Google ScholarGoogle ScholarCross RefCross Ref
  6. Faujdar, Neetu, and Satya Prakash Ghrera. "Analysis and testing of sorting algorithms on a standard dataset." Communication Systems and Network Technologies (CSNT), 2015 Fifth International Conference on. IEEE, (2015) April, 962--967.Google ScholarGoogle Scholar
  7. Aliyu, Ahmed M., and Dr PB Zirra. "A Comparative Analysis of Sorting Algorithms on Integer and Character Arrays." The International Journal of Engineering and Science (IJES), vol. 2, no. 7, (2013), pp 25--29.Google ScholarGoogle Scholar
  8. Thomas H. Cormen, Charles E. LeisersonRonald, L. RivestClifford Stein, "Introduction to Algorithms" (Third Edition) (2009).Google ScholarGoogle Scholar
  9. Horowitz, Ellis, Sartaj Sahni, and Susan Anderson-Freed. Fundamentals of data structures. No. 04; QA76. D35, H6.. London: Pitman, 1983.Google ScholarGoogle Scholar
  10. Bender, Michael A., Martin Farach-Colton, and Miguel A. Mosteiro. "Insertion sort is O (n log n)." Theory of Computing Systems 39.3 (2006): 391--397.Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Shell, Donald L. "A high-speed sorting procedure." Communications of the ACM, vol. 2, no. 7, (1959), pp. 30--32.Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Pratt, Vaughan R. Shellsort and Sorting Networks. No. STAN-CS-72-260. STANFORD UNIV CALIF DEPT OF COMPUTER SCIENCE, 1972.Google ScholarGoogle Scholar
  13. Hoare, C. A. R. "Algorithm 64: Quicksort", vol. 4, no. 7, Comm. ACM. (1961) July, pp 321.Google ScholarGoogle Scholar
  14. R. Sedgewick, "Quicksort," PhD dissertation, Stanford University, Stanford, CA, May 1975. Stanford Computer Science Report STAN-CS-75-492.Google ScholarGoogle Scholar
  15. J. L. Bentleyand R. Sedgewick, "Fast algorithmsfor sorting and Searching strings", In Proc. 8th annual ACM-SIAM Symposium on Discrete algorithms, New Orleans, Louisiana, USA, 1997, pp 360--369Google ScholarGoogle Scholar
  16. R. Loeser, "Some performance tests of: quicksort: and descendants," Comm. ACM 17, 3, Mar. 1974, pp 143--152. descendants," Comm. ACM 17, 3, Mar. 1974, pp 143--152.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Hoare, Charles AR. "Quicksort." The Computer Journal, vol. 5, no. 1, (1962), pp. 10--16.Google ScholarGoogle ScholarCross RefCross Ref
  18. Horowitz, Ellis, and Sartaj Sahni. Fundamentals of computer algorithms. Computer Science Press, 1978. (PAGE 126 Quicksort).Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Kumari, Anchala, Niraj Kumar Singh, and Soubhik Chakraborty. "A statistical comparative study of some sorting algorithms." International Journal in Foundations of Computer Science & Technology (IJFCST), vol. 5, no. 4, (2015), pp 28.Google ScholarGoogle Scholar
  20. Jadoon, Sultanullah, Salman Faiz Solehria, and Mubashir Qayum. "Optimized selection sort algorithm is faster than insertion sort algorithm: a comparative study." International Journal of Electrical & Computer Sciences IJECS-IJENS 11.02 (2011): 19--24.Google ScholarGoogle Scholar
  21. Knuth, Donald. "Sorting and Searching" Section 6.2. 1: Searching an Ordered Table, USA, vol. 3, (1997), pp. 409--426.Google ScholarGoogle Scholar

Index Terms

  1. Comparing Four Important Sorting Algorithms Based on Their Time Complexity

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Other conferences
        ACAI '19: Proceedings of the 2019 2nd International Conference on Algorithms, Computing and Artificial Intelligence
        December 2019
        614 pages
        ISBN:9781450372619
        DOI:10.1145/3377713

        Copyright © 2019 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 7 February 2020

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed limited

        Acceptance Rates

        ACAI '19 Paper Acceptance Rate97of203submissions,48%Overall Acceptance Rate173of395submissions,44%
      • Article Metrics

        • Downloads (Last 12 months)66
        • Downloads (Last 6 weeks)3

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!