You are here

Quicksort Using Median of Medians as Pivot

Journal Name:

Publication Year:

Author Name
Abstract (2. Language): 
Median of Median is an algorithm for selecting the kth largest element in an unordered list, having worst case linear time complexity [1]. It is based on the Hoare’s selection algorithm also called quickselect algorithm [6]. The Median of Median algorithm uses an asymptotically optimal approximate median selection algorithm to make an asymptotically optimal general search algorithm. It finds the approximate median in linear time which is then used as pivot in the quickselect algorithm. This approximate median can be used as pivot in Quicksort, giving an optimal sorting algorithm that has worst-case complexity O(n log n) [2]. This paper proposes variation in the above mentioned implementation technique for the median selection problem to find the Median of Medians and the value obtained is further used to guarantee a good pivot for the Quicksort algorithm. The result of the experiment performed show that the strategy proposed has worst-case complexity O(n log n) for Quicksort. Graphs were also plotted for the usual Quicksort function and the Quicksort function that uses the proposed median of median (PMOM) as pivot for relatively large values of size of array and results were compared. These confirm that proposed algorithm indeed has worst-case complexity O(n log n) for Quicksort.
28
33

REFERENCES

References: 

[1] Manuel Blum, Robert W. Floyd, Vaughan Pratt, Ronald L. Rivest, and Robert E. Tarjan. Time bounds for selection. Journal of Computer and System Sciences, 7:448{461, 1973.
[2] Introduction to Algorithms, Second Edition, Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein, The MIT Press, ISBN 0- 07-013151-1 (McGraw-Hill)
[3] http://web.stanford.edu/class/archive/cs/cs161/cs161.1138 /lectures/08/Small08.pdf
[4] A. Schnhage, M. Paterson, and N. Pippenger, Finding the median, Journal of Computer and System Sciences, 13:184{199, 1976.
[5] DoritDor and Uri Zwick, Selecting the median, In Proceedings of 6th SODA, pages 88{97, 1995.Journal version in SIAM Journal on Computing, 28:1722{1758, 1999.
[6] Hoare, C.A.R. (1961), ”Algorithm 65:Find” Comm ACM, 4(7):321-322
[7] Musser, David R. (1997).Introspective Sorting and Selection Algorithms, Software: Practice and Experience, Wiley. 27 (8): 983–993.
[8] Chazelle, B. 2000,The soft heap: an approximate priority queue with optimal error rate, J. ACM 47, 6 (Nov. 2000), 1012-1027.

Thank you for copying data from http://www.arastirmax.com