skip to main content
article

Bubble sort: an archaeological algorithmic analysis

Published:11 January 2003Publication History
Skip Abstract Section

Abstract

Text books, including books for general audiences, invariably mention bubble sort in discussions of elementary sorting algorithms. We trace the history of bubble sort, its popularity, and its endurance in the face of pedagogical assertions that code and algorithmic examples used in early courses should be of high quality and adhere to established best practices. This paper is more an historical analysis than a philosophical treatise for the exclusion of bubble sort from books and courses. However, sentiments for exclusion are supported by Knuth [17], "In short, the bubble sort seems to have nothing to recommend it, except a catchy name and the fact that it leads to some interesting theoretical problems." Although bubble sort may not be a best practice sort, perhaps the weight of history is more than enough to compensate and provide for its longevity.

References

  1. The jargon file. http://www.jargon.net/jargonfile/b/bogo-sort.html.Google ScholarGoogle Scholar
  2. Aho, A. V., Hopcroft, J. E., and Ullman, J. D. The Design and Analysis of Computer Algorithms. Addison-Wesley, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Bell, D. The principles of sorting. The Computer Journal 1 (1958), 71--77.Google ScholarGoogle ScholarCross RefCross Ref
  4. Bose, R. C., and Nelson, R. J. A sorting problem. Journal of the ACM (JACM) 9, 2 (1962), 282--296. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Cooper, D. Oh My! Modula-2! W.W. Norton, 1990.Google ScholarGoogle Scholar
  6. Dale, N., and Lewis, J. Computer Science Illuminated. Jones and Bartlett, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Demuth, H. Electronic Data Sorting. PhD thesis, Stanford University, 1956.Google ScholarGoogle Scholar
  8. Demuth, H. personal communication. 2000.Google ScholarGoogle Scholar
  9. Flores, I. Analysis of internal computer sorting. Journal of the ACM (JACM) 8, 1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Friend, E. Sorting on electronic computer systems. J. ACM 3 (1956), 134--168. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Gotlieb, C. Sorting on computers. Communications of the ACM 6, 5 (May 1963), 194--201. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Halstead, M. H. Elements of Software Science, Operating, and Programming Systems Series, vol. 7. Elsevier, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Iverson, K. A Programming Language. John Wiley, 1962. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Juelich, O. Remark on algoirthm 175 shuttle sort. Communications of the ACM 6, 12 (December 1963), 739. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Kernighan, B. W., and Plauger, P. Software Tools. Addison-Wesley, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Klerlein, J. B., and Fullbright, C. A transition from bubble sort to shell sort. In The Papers of the Nineteenth Technical Symposium on Computer Science Eduction (February 1988), ACM Press, pp. 183--184. SIGCSE Bulletin V. 20 N. 1. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Knuth, D. The Art of Computer Programming: Sorting and Searching, 2 ed., vol. 3. Addison-Wesley, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Knuth, D. E. The dangers of computer science theory. Logic, Methodology and Philosophy of Science 4 (1973). Also in Selected Papers on Analysis of Algorithms, CLSI, 2000.Google ScholarGoogle Scholar
  19. Ledley, R. Programming and Utilizing Digital Computers. McGraw-Hill, 1962.Google ScholarGoogle Scholar
  20. Martin, W. A. Sorting. ACM Computing Surveys 3, 4 (1971), 147--174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. McCracken, D., Weiss, H., and Lee, T. Programming Business Computers. John Wiley, 1959.Google ScholarGoogle Scholar
  22. Organick, E. I. A Fortran Primer. Addison-Wesley, 1963. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Press, W. H., Flannery, B. P., Teukolsky, S. A., and Vetterling, W. T. Numerical Recipes in C: The Art of Scientific Computing. Cambridge University Press, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Sedgewick, R. Algorithms in C++, 3~ed. Addison-Wesley, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Shaw, C., and Trimble, T. Algorithm 175: Shuttle sort. Communications of the ACM 6, 6 (June 1963), 312--313. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Stanat, D. F., and McAllister, D. F. Discrete Mathematics in Computer Science. Prentice-Hall, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Vitter, J., and Flajolet, P. Average-case analysis of algorithms and data structures. In Handbook of Theoretical Computer Science. Volume A, J. van Leeuwen, Ed. MIT Press, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Bubble sort: an archaeological algorithmic analysis

    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

    Full Access

    • Published in

      cover image ACM SIGCSE Bulletin
      ACM SIGCSE Bulletin  Volume 35, Issue 1
      January 2003
      406 pages
      ISSN:0097-8418
      DOI:10.1145/792548
      Issue’s Table of Contents
      • cover image ACM Conferences
        SIGCSE '03: Proceedings of the 34th SIGCSE technical symposium on Computer science education
        February 2003
        444 pages
        ISBN:158113648X
        DOI:10.1145/611892

      Copyright © 2003 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 January 2003

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader