Instruct: Identify the main and secondary category of Arxiv papers based on the titles and abstracts
Query: A numerical analysis of Quicksort: How many cases are bad cases?   We present numerical results for the probability of bad cases for Quicksort,
i.e. cases of input data for which the sorting cost considerably exceeds that
of the average. Dynamic programming was used to compute solutions of the
recurrence for the frequency distributions of comparisons. From these
solutions, probabilities of numbers of comparisons above certain thresholds
relative to the average were extracted. Computations were done for array sizes
up to n = 500 elements and for several methods to select the partitioning
element, from a simple random selection to what we call "recursive median of
three medians." We found that the probability strongly depends on the selection
method: for n = 500 and a theshold 25% above the average number of comparisons
it ranges from 2.2*10^(-3) to 3.0*10^(-23). A version of Quicksort based on the
recursive median of medians approach is proposed, for which our data suggest a
worst case time complexity of O(n^1.37).

30
The categories of this paper are: q-alg
2
The categories of this paper are: math
21
The categories of this paper are: adap-org
12
The categories of this paper are: nucl-th
6
The categories of this paper are: astro-ph
5
The categories of this paper are: gr-qc
17
The categories of this paper are: q-fin
11
The categories of this paper are: hep-lat
20
The categories of this paper are: acc-phys
23
The categories of this paper are: solv-int
10
The categories of this paper are: q-bio
37
The categories of this paper are: supr-con
8
The categories of this paper are: hep-ex
35
The categories of this paper are: mtrl-th
16
The categories of this paper are: stat
32
The categories of this paper are: atom-ph