:: The Journal of the Institute of Internet, Broadcasting and Communication ::, Vol.14 No.6 | (2014) pp.295~301

3-점 평균 피벗 퀵정렬

Sang-Un Lee

(정회원, 강릉원주대학교 과학기술대학 멀티미디어공학과)

Abstract

데이터를 정렬하는 방법들 중 O(nlogn)보다 빠른 방법은 알려져 있지 않고 있으며, 가장 빠른 방법으로 퀵정렬이 있다. 개의 데이터에 대해 퀵정렬은 최적의 경우 O(nlogn), 최악의 경우 O(n^{2}) 수행 복잡도를 갖고 있다. 본 논문에서는 퀵정렬보다 빠르게 정렬하는 방법으로, 분할된 리스트의 첫 번째 L=a[s], 마지막 H=a[e]과 중간 M=a[⌊(s+e)/2⌋]에 대해 P=(L+M+H)/3의 3-점 평균을 피벗값으로 결정하는 방법을 제안하였다. 실험 결과 제안된 3-점 평균 피벗 퀵정렬은 최적, 평균, 최악 모두 수행 복잡도가 O(nlogn)으로 퀵정렬의 O(n^{2})정렬 시간을 단축시킬 수 있었다.
In the absence of a sorting algorithm faster than O(nlogn), Quicksort remains the best and fastest of its kind in practice. For given n data, Quicksort records running in O(nlogn) at best and O(n^{2}) at its worst. In this paper, I propose an algorithm by which 3-points average is set as a pivot for first array L=a[s], last array H=a[e], and middle array M=a[⌊(s+e)/2⌋]in order to find the more fast than Quicksort. Test results prove that the proposed 3-points average pivot Quicksort has the time complexity of O(nlogn)at its best, average, and worst cases. And the proposed algorithm can be reduce the O(n^{2}) time of Quicksort to O(nlogn).
  Quicksort,Pivot,Leftmost,Rightmost,Median,Random

Download PDF List