• DocumentCode
    303041
  • Title

    On the pivot strategy of Quicksort

  • Author

    Munro, J.Ian ; Ji, X. Richard

  • Author_Institution
    Dept. of Comput. Sci., Waterloo Univ., Ont., Canada
  • Volume
    1
  • fYear
    1996
  • fDate
    26-29 May 1996
  • Firstpage
    302
  • Abstract
    Quicksort is probably the most widely used sorting method in computer science. Although it is well known that its worst-case running time is Θ(N2), it is not clear that what kind of data will cause such slow behavior. In this paper, we prove that a sorted array followed by one or more small elements will do. We also give examples for the pivot method of the middle element, since this is another popular pivot technique in practice. Our examples are pessimistic in the sense that they reach the worst case of Quicksort and cost the maximum number of comparisons for Quicksort, that they are extremely simple for they differ from sorted arrays only by one or two elements, and that they are well constructed so that one may tell their running time even at the first glance. Furthermore, we consider a general non-random pivoting scheme that is based on a constant number of messages about the array elements. We provide a general guideline to construct examples of running time Θ(N2) to this general pivoting scheme
  • Keywords
    computational complexity; sorting; Quicksort; complexity; pivot strategy; running time; sorted array; worst-case running time; Computer applications; Computer science; Costs; Guidelines; Lead; Multimedia communication; Multimedia systems; Runtime; Sorting; Telecommunications;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Electrical and Computer Engineering, 1996. Canadian Conference on
  • Conference_Location
    Calgary, Alta.
  • ISSN
    0840-7789
  • Print_ISBN
    0-7803-3143-5
  • Type

    conf

  • DOI
    10.1109/CCECE.1996.548097
  • Filename
    548097