EXPLOITING FEW INVERSIONS WHEN SORTING - SEQUENTIAL AND PARALLEL ALGORITHMS

Citation
C. Levcopoulos et O. Petersson, EXPLOITING FEW INVERSIONS WHEN SORTING - SEQUENTIAL AND PARALLEL ALGORITHMS, Theoretical computer science, 163(1-2), 1996, pp. 211-238
Citations number
23
Categorie Soggetti
Computer Sciences","Computer Science Theory & Methods
ISSN journal
03043975
Volume
163
Issue
1-2
Year of publication
1996
Pages
211 - 238
Database
ISI
SICI code
0304-3975(1996)163:1-2<211:EFIWS->2.0.ZU;2-X
Abstract
We consider the problem of taking advantage of existing order within t he input sequence when sorting. The measure of presortedness used is t he number of inversions. Let X be a sequence of length n and let Inv(X ) be the (unknown) number of inversions in X. Our main results are: X can be sorted in-place, i.e. using only O(log n) bits of extra space, in time O(n log (Inv(X)/n)), which is optimal with respect to the numb er of inversions. Given p processors on an EREW PRAM, X can be sorted in time O(n log (Inv(X)/n)/p + log n), which is optimal with respect t o the number of inversions.