Filters

3,575 Hits in 2.1 sec

The Number of Symbol Comparisons in QuickSort and QuickSelect [chapter]

Brigitte Vallée, Julien Clément, James Allen Fill, Philippe Flajolet
2009 Lecture Notes in Computer Science
We revisit the classical QuickSort and QuickSelect algorithms, under a complexity model that fully takes into account the elementary comparisons between symbols composing the records to be processed.  ...  We establish that, under our conditions, the average-case complexity of QuickSort is O(n log 2 n) [rather than O(n log n), classically], whereas that of QuickSelect remains O(n).  ...  Research for Fill was supported by The Johns Hopkins University's Acheson J. Duncan Fund for the Advancement of Research in Statistics.  ...

Optimal Partitioning for Dual-Pivot Quicksort

Martin Aumüller, Martin Dietzfelbinger
2015 ACM Transactions on Algorithms
Aumüller Optimal Partitioning for Dual Pivot Quicksort 11/17 Cost of an Arbitrary Decision Tree p n ≈ 4/3n + "average number of additional comparisons" Central: f q s, -average number of comparisons to  ...  Aumüller Optimal Partitioning for Dual Pivot Quicksort 11/17 Cost of an Arbitrary Decision Tree p n ≈ 4/3n + "average number of additional comparisons" Central: f q s, -average number of comparisons to  ...  Central: f q s, -average number of comparisons to the larger pivot first. Lemma For the average partition cost p n of a decision tree T we have: ⇒ dependence introduces an error term of o(n).  ...

Gerth Stølting Brodal, Rolf Fagerberg, Gabriel Moruz
2008 ACM Journal of Experimental Algorithmics
More precisely, we prove that randomized Quicksort performs expected O(n(1+log(1+ Inv/n))) element swaps, where Inv denotes the number of inversions in the input sequence.  ...  We then show that for the randomized version of Quicksort, the number of element swaps performed is provably adaptive with respect to the measure Inv.  ...  The x-axis shows log(Inv). of the expected number of comparisons performed by randomized Quicksort.  ...

Gerth Stølting Brodal, Rolf Fagerberg, Gabriel Moruz
2004 BRICS Report Series
More precisely, we prove that randomized Quicksort performs expected O(n (1 + log (1 + Inv/n))) element swaps, where Inv denotes the number of inversions in the input sequence.  ...  We then show that for the randomized version of Quicksort, the number of element swaps performed is provably adaptive with respect to the measure Inv.  ...  The x-axis shows log(Inv). of the expected number of comparisons performed by randomized Quicksort.  ...

Multi-Pivot Quicksort: Theory and Experiments [chapter]

Shrinu Kushagra, Alejandro López-Ortiz, Aurick Qiao, J. Ian Munro
2013 2014 Proceedings of the Sixteenth Workshop on Algorithm Engineering and Experiments (ALENEX)
We show that it makes fewer comparisons and has better cache behavior than the dual pivot quicksort in the expected case.  ...  More recently, this algorithm has been analysed in terms of comparisons and swaps by Wild and Nebel . Our contributions to the topic are as follows.  ...  SP p (n) -expected number of recursive calls to a subproblem greater in size than a block in cache invoked by the p-pivot quicksort algorithm sorting an array of n elements 3.1 Number of Comparisons Theorem  ...

On the Convergence of the Dual-Pivot Quicksort Process

Mahmoud Ragab, Beih El-Sayed El-Desouky, Nora Nader
2016 Open Journal of Modelling and Simulation
The limiting distribution of the normalized number of comparisons required by the Dual-pivot Quicksort algorithm is studied.  ...  In 2012, Wild and Nabel denoted exact numbers of swaps and comparisons for Yaroslavskiy's algorithm . In this paper, our aim is to analyze the running time performance of Dual-pivot Quicksort.  ...  Acknowledgments We thank the editor and the referee for their comments.  ...

How Good is Multi-Pivot Quicksort? [article]

Martin Aumüller, Martin Dietzfelbinger, Pascal Klaue
2016 arXiv   pre-print
Multi-Pivot Quicksort refers to variants of classical quicksort where in the partitioning step \$k\$ pivots are used to split the input into \$k + 1\$ segments.  ...  The analysis shows that the benefits of using multiple pivots with respect to the average comparison count are marginal and these strategies are inferior to simpler strategies such as the well known median-of  ...  We thank the referees of this submission for their insightful comments, which helped a lot in improving the presentation and focusing on the main insights.  ...

Performance Evaluation of Parallel Sorting Algorithms on IMAN1 Supercomputer

2016 International Journal of Advanced Science and Technology
Moreover, on large number of processors, parallel Quicksort achieves the best parallel efficiency of up to 88%, while Merge sort and Merge-Quicksort algorithms achieve up to 49% and 52% parallel efficiency  ...  In this paper, parallel Quicksort, parallel Merge sort, and parallel Merge-Quicksort algorithms are evaluated and compared in terms of the running time, speedup, and parallel efficiency.  ...  In  a comparison between sequential and parallel versions of Quicksort algorithms is discussed.  ...

Why Is Dual-Pivot Quicksort Fast? [article]

Sebastian Wild
2016 arXiv   pre-print
I discuss the new dual-pivot Quicksort that is nowadays used to sort arrays of primitive types in Java.  ...  I sketch theoretical analyses of this algorithm that offer a possible, and in my opinion plausible, explanation why (a) dual-pivot Quicksort is faster than the previously used (classic) Quicksort and (  ...  Analysis of Quicksort The classical model for the analysis of sorting algorithm considers the average number of key comparisons on random permutations.  ...

Counting Zeros in Random Walks on the Integers and Analysis of Optimal Dual-Pivot Quicksort [article]

Martin Aumüller, Martin Dietzfelbinger, Clemens Heuberger, Daniel Krenn, Helmut Prodinger
2016 arXiv   pre-print
For both we calculate the expected number of comparisons exactly as well as asymptotically, in particular, we provide exact expressions for the linear, logarithmic, and constant terms.  ...  We present an average case analysis of two variants of dual-pivot quicksort, one with a non-algorithmic comparison-optimal partitioning strategy, the other with a closely related algorithmic strategy.  ...  As mentioned in the introduction, the number of comparisons of dual-pivot quicksort depends on the concrete partitioning procedure.  ...

High Performance Parallel Sort for Shared and Distributed Memory MIMD [article]

Thoria Alghamdi, Gita Alaghband
2020 arXiv   pre-print
a one-step MSD-Radix to distribute data in ten packets (MPI) while parallel cores of each node use Quicksort to sort their data partitions sequentially then merge and sort them in parallel employing the  ...  The speedup of Distributed Memory Parallel Hybrid Quicksort and Merge Sort is the best.  ...  In this MPI version the number of nodes can be varied from 1 to 10 and the number of threads should be a power of two.  ...

M. D. McIlroy
1999 Software, Practice & Experience
To do so we make a comparison function that observes the pattern of comparisons and constructs adverse data on the fly. Recall that quicksort sorts a sequence of n data items in three phases:  ...  Quicksort can be made to go quadratic by constructing input on the fly in response to the sequence of items compared.  ...  The function antiqsort(n, a) constructs in array a a bad permutation of 0..n − 1 and returns the number of comparisons qsort took to sort it.  ...

Using Non-Linear Difference Equations to Study Quicksort Algorithms [article]

Yukun Yao
2020 arXiv   pre-print
With non-linear difference equations, recurrence relations and experimental mathematics techniques, explicit expressions for expectations, variances and even higher moments of their numbers of comparisons  ...  the variants of single-pivot and multi-pivot Quicksort algorithms as discrete probability problems.  ...  Acknowledgment I would like to express my special thanks of gratitude to my advisor Doron Zeilberger for his mentoring and guidance. I am also  ...

On Smoothed Analysis of Quicksort and Hoare's Find

Mahmoud Fouz, Manfred Kufleitner, Bodo Manthey, Nima Zeini Jahromi
2011 Algorithmica
We prove that the expected number of comparisons to find the median is in Ω'(1 − p) n p log n´, which is again tight.  ...  Finally, we provide lower bounds for the smoothed number of comparisons of quicksort and Hoare's find for the median-of-three pivot rule, which usually yields faster algorithms than always selecting the  ...  The number of comparisons to find the specified element is Θ(n 2 ) in the worst case and Θ(n) on average. Furthermore, the variance of the number of comparisons is Θ(n 2 )  .  ...

Average Case Analysis of Java 7's Dual Pivot Quicksort [chapter]

Sebastian Wild, Markus E. Nebel
2012 Lecture Notes in Computer Science
Moreover, we present the first precise average case analysis of the new algorithm showing e.g. that a random permutation of length n is sorted using 1.9n n-2.46n+O( n) key comparisons and 0.6n n+0.08n+  ...  In this paper, we identify the reason for this unexpected success.  ...  of comparisons and swaps of the three Quicksort variants in the random permutation model.  ...
« Previous Showing results 1 — 15 out of 3,575 results