## An Adaptive Generic Sorting Algorithm that Uses Variable Partitioning (1996)

### Cached

### Download Links

- [ftp.cs.ust.hk]
- [ftp.cs.ust.hk]
- [ftp.cs.ust.hk]
- DBLP

### Other Repositories/Bibliography

Citations: | 1 - 1 self |

### BibTeX

@MISC{Estivill-Castro96anadaptive,

author = {Vladimir Estivill-Castro and Derick Wood},

title = {An Adaptive Generic Sorting Algorithm that Uses Variable Partitioning},

year = {1996}

}

### OpenURL

### Abstract

A sorting algorithm is adaptive if its run time, for inputs of the same size n, varies smoothly from O(n) to O(n log n) as the disorder of the input varies. Recently, researchers have focused their attention on sorting algorithms that are optimally adaptive with respect to several measures of disorder, since the type of disorder in the input is usually not known. They have demonstrated a need to develop tools for the construction of sorting algorithms that are adaptive with respect to large classes of measures. We present Partition Sort, a new generic sorting algorithm for which we can establish adaptivity. It is based on divide-and-conquer in which the number of subproblems at each level of recursion depends on the disorder of the input. We apply this generic algorithm to obtain optimal adaptivity for several measures of disorder. In addition, we introduce Randomized Partition Sort, a randomized version of Partition Sort, that not only is adaptive in the expected case, but ...

### Citations

384 |
The art of computer programming, Vol. 3: sorting and searching
- Knuth
- 1973
(Show Context)
Citation Context ...d are placed there. The element 3 does not fit D 1 but it fits D 2 . Similarly, 8 fits D 2 and 0 fits D 1 , but the last element requires a new double-ended queue. The final encroaching set is fD 1 = =-=[0; 1; 2; 4; 6; 9]-=-; D 2 = [3; 5; 8]; D 3 = [7]g: The number of lists in the encroaching set is the measure Enc of disorder. Thus, in our example, Enc(h4; 6; 5; 2; 9; 1; 3; 8; 0; 7i) = 3: Since the encroachAn Adaptive G... |

334 |
The Art of Computer Programming, vol.2: Seminumerical Algorithms
- Knuth
- 1997
(Show Context)
Citation Context ...ement 3 does not fit D 1 but it fits D 2 . Similarly, 8 fits D 2 and 0 fits D 1 , but the last element requires a new double-ended queue. The final encroaching set is fD 1 = [0; 1; 2; 4; 6; 9]; D 2 = =-=[3; 5; 8]-=-; D 3 = [7]g: The number of lists in the encroaching set is the measure Enc of disorder. Thus, in our example, Enc(h4; 6; 5; 2; 9; 1; 3; 8; 0; 7i) = 3: Since the encroachAn Adaptive Generic Sorting Al... |

67 | A survey of adaptive sorting algorithms
- Estivill-Castro, Wood
- 1992
(Show Context)
Citation Context ...y sorted are often sorted again and that many files occur naturally in nearly sorted state. Thus, adaptive sorting is not only theoretically interesting but it brings improvements to current practice =-=[3]-=-. 1 Laboratorio Nacional de Inform'atica Avanzada, R'ebsamen 80, Xalapa, Veracruz 91000, M'exico. 2 Department of Computer Science, University of Western Ontario, London, Ontario N6A 5B7, Canada. 2 Es... |

51 |
Samplesort: A sampling approach to minimal storage tree sorting
- Frazer, McKellar
- 1970
(Show Context)
Citation Context ...tervals of almost equal length, a sample of size p = dk 2 =2e elements is chosen at random. These elements are used as pivots to stably partition X . This division protocol is analogous to Samplesort =-=[6]-=-. Samplesort is a generalization of Randomized Quicksort where rather than choosing a single pivot at random, a sample of several pivots is chosen at random. To select any subset of p elements with eq... |

29 |
Measures of presortedness and optimal sorting algorithms
- Mannila
- 1985
(Show Context)
Citation Context ...e number of ascending runs is directly related to the measure Runs, Natural Mergesort takes O(jX j(1 + log[Runs(X) + 1])) time and is, therefore, Runs-optimal; a new proof of a Mannila's known result =-=[11]-=-. Our second application is an optimal algorithm with respect to Dis. The division protocol computes in O(jX j) time the value Dis(X) as described by Altman and Igarashi [1]. Then, it divides the inpu... |

25 | Fifty Challenging Problems in Probability with Solutions - Mosteller - 1987 |

16 |
Combinatorics, Complexity, and Randomness
- Karp
- 1986
(Show Context)
Citation Context ...fit D 1 but it fits D 2 . Similarly, 8 fits D 2 and 0 fits D 1 , but the last element requires a new double-ended queue. The final encroaching set is fD 1 = [0; 1; 2; 4; 6; 9]; D 2 = [3; 5; 8]; D 3 = =-=[7]-=-g: The number of lists in the encroaching set is the measure Enc of disorder. Thus, in our example, Enc(h4; 6; 5; 2; 9; 1; 3; 8; 0; 7i) = 3: Since the encroachAn Adaptive Generic Sorting Algorithm tha... |

7 | A new measure of presortedness - Estivill-Castro, Wood - 1989 |

7 |
Sorting shuffled monotone sequences
- Levcopoulos, Petersson
- 1994
(Show Context)
Citation Context ...og[Enc(X)+1])) time, Melsort takes O(jX j(1 + log[Enc(X)+ 1])) time; therefore, Melsort is Enc-optimal and we have obtained a new proof of Skiena's result [13]. Our fourth application is to Slab Sort =-=[10]-=-, a sorting algorithm that achieves optimality with respect to SMS(X) (the minimum number of shuffled monotone subsequences of X) and, therefore, optimality with respect to Dis, Max, Runs and SUS. Alt... |

6 |
D.Wood."A Survey of Adaptive Sorting Algorithms", Computing Surveys
- Estivill-Castro
- 1992
(Show Context)
Citation Context ...on, Ontario N6A 5B7, Canada. 2 Estivill-Castro and Wood One task that faces us is how to measure disorder or nearly-sortedness. In the literature, there are a number of so called measures of disorder =-=[5]-=-, the most popular of which is the number Inv(X) of inversions in a sequence X , where an inversion is a pair (i; j) of positions in X such that i ! j and x i ? x j . It is certainly useful to design ... |

4 |
Roughly sorting: Sequential and parallel approach
- Altman, Igarashi
- 1989
(Show Context)
Citation Context ... a Mannila's known result [11]. Our second application is an optimal algorithm with respect to Dis. The division protocol computes in O(jX j) time the value Dis(X) as described by Altman and Igarashi =-=[1]-=-. Then, it divides the input sequence X into Dis(X) + 1 subsequences, each containing the elements Dis(X) + 1 elements apart (for example, if Dis(X) were 1 then the division protocol would obtain two ... |

4 |
Encroaching lists as a measure of presortedness
- Skiena
- 1988
(Show Context)
Citation Context ...le. By Theorem 3.1, the algorithm sorts in O(jX j(1 + log[Dis(X) + 1]) which is optimally adaptive with respect to Dis and Max [4]. Our third application is to Skiena's Melsort, which we now describe =-=[13]-=-. When Melsort is applied to an input sequence X , it constructs a partition of the input that consists of a set of sorted lists called the encroaching lists of X . Since encroaching lists are sorted,... |

2 |
On partitions and presortedness of sequences
- Chen, Carlsson
- 1991
(Show Context)
Citation Context ...d to define generic measures of disorder as ": : : minimal size of a specific type �� of partitions" hopping that the relationship between the size of the partition and the measure would=-= be immediate [2]-=-. 6 Estivill-Castro and Wood 3.1 Applications of Partition Sort The first application is to Natural Mergesort [9, page 161]. Natural Mergesort partitions the input into ascending runs. A sequence is c... |