• Title/Summary/Keyword: 퀵 정렬 알고리즘

Search Result 14, Processing Time 0.021 seconds

Finding the Worst-case Instances of Some Sorting Algorithms Using Genetic Algorithms (유전 알고리즘을 이용한 정렬 알고리즘의 최악의 인스턴스 탐색)

  • Jeon, So-Yeong;Kim, Yong-Hyuk
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2010.06b
    • /
    • pp.1-5
    • /
    • 2010
  • 정렬 알고리즘에서 사용한 원소 간 비교횟수를 기준으로, 비교횟수가 많게 되는 순열을 최악의 인스턴스(worst-case instance)라 명명하고 이를 찾기 위해 유전 알고리즘(genetic algorithm)을 사용하였다. 잘 알려진 퀵 정렬(quick sort), 머지 정렬(merge sort), 힙 정렬(heap sort), 삽입 정렬(insertion sort), 쉘 정렬(shell sort), 개선된 퀵 정렬(advanced quick sort)에 대해서 실험하였다. 머지 정렬과 삽입 정렬에 대해 탐색한 인스턴스는 최악의 인스턴스에 거의 근접하였다. 퀵 정렬은 크기가 증가함에 따라 최악의 인스턴스 탐색이 어려웠다. 나머지 정렬에 대해서 찾은 인스턴스는 최악의 인스턴스인지 이론적으로 보장할 수 없지만, 임의의 1,000개 순열을 정렬해서 얻은 비교횟수들의 평균치보다는 훨씬 높았다. 본 논문의 최악의 인스턴스를 탐색하는 시도는 알고리즘의 성능 검증을 위한 테스트 데이터를 생성한다는 점에서 의미가 크다.

  • PDF

A New Sort Algorithm : Information Block Sort Algorithm(IBSA) (새로운 정렬 알고리즘 : 정보 블록 정렬 알고리즘)

  • 송태옥;김태영
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2000.10a
    • /
    • pp.560-562
    • /
    • 2000
  • 본 논문에서는 정보블록알고리즘(IBPA;Information Block Preprocessing Algorithm)을 이용한 정보블록 정렬알고리즘 (IBSA; Information Block Sort Algotithm)을 제안하고 그 성능을 평가하였다. IBSA의 시간복잡도는 O(N)이며, 데이터의 분포상태에 영향을 받지 않는다. IBPA의 성능을 측정해본 결과, 2백만개의 랜덤데이터를 정렬한 경우, 중복값 허용의 경우 (a)는 퀵 정렬의 32.42%, 기수정렬의 9%정도의 비교회수만으로도 정렬할 수 있음을 보여주었으며, 중복값이 없는 경우 (b)는 퀵 정렬의 53.12%, 기수정렬의 12.79%정도의 비교회수만으로도 정렬할 수 있음을 보여주었다.

  • PDF

An Implementation of Efficient Quicksort Utilizing SIMD-Based VBP Technique (SIMD 기반의 VBP 기법을 적용한 효율적인 퀵정렬의 구현)

  • Hong, Gilseok;Kim, Hongyeon;Kang, Seonghyeon;Min, Jun-Ki
    • KIISE Transactions on Computing Practices
    • /
    • v.23 no.8
    • /
    • pp.498-503
    • /
    • 2017
  • SIMD (Single Instruction Multiple Data) is a representative parallelization architecture that processes multiple data loaded in a SIMD register with a single instruction. Quicksort is a sorting algorithm that picks an element as a pivot from the array and reorders the array such that all elements having the values less than the pivot value are located in the left side on the pivot as well as all elements having the value greater than the pivot value are located in the right side on the pivot and then the algorithm performs the same task on both sublist recursively. In this paper, we propose an efficient Quicksort algorithm applying the SIMD instructions which minimally invokes conditional branches to avoid the performance degradation incurred by branch misprediction in a pipeline architecture. In addition, we improve the performance of the Quicksort algorithm by fetching data into a SIMD register as a byte unit to apply VBP (Vertical Bit Parallel) and the early pruning technique.

Probabilistic analysis of efficiencies for sorting algorithms with a finite number of records based on an asymptotic algorithm analysis (점근적 분석 모형에 기초한 유한개 레코드 정렬 알고리즘 효율성의 확률적 분석)

  • 김숙영
    • Journal of the Korea Computer Industry Society
    • /
    • v.5 no.2
    • /
    • pp.325-330
    • /
    • 2004
  • The Big O notation of a sorting algorithm analysis is an asymptotic algorithm analysis which gives information of a rough mathematical function with an infinite increase of a sample size, without any specification of a probabilistic model. Hence. in an application with a limited finite number of data, it is necessary to test efficiencies of sorting algorithms. I estimated probabilistic models which analyze the number of exchanges varying input sizes to sort. The estimated models to explain the relationship of sorting efficiency on the sample size (N of the sample size and S of the number of exchange of elements) are S=0.9305 $N^{1.339}$ for Quick sort algorithm with O(nlogn) time complexity, and S=0.2232 $N^{2.0130}$ for Insertion sort algorithm with O( $n^2$) time complexity. Furthermore, there are strongly supports that more than 99% of the above relationship could be explained by the estimated models (p<0.001). These findings suggest it is necessary to analyze sorting algorithm efficiency in applications with a finite number of data or a newly developed sorting algorithm.

  • PDF

A New Sort Algorithm : Information Block Sort Algorithm(IBSA) (정보 블록 정렬 알고리즘)

  • Song, Tae-Ok;Jung, Sang-Wuk;Kim, Tae-Young
    • Proceedings of the Korea Information Processing Society Conference
    • /
    • 2000.10a
    • /
    • pp.195-198
    • /
    • 2000
  • 본 논문에서는 정보블록알고리즘(IBPA; Information Block Preprocessing Algorithm)을 이용한 정보블록 정렬알고리즘(IBSA; Information Block Sort Algorithm)을 제안하고 그 성능을 평가하였다. IBSA의 시간복잡도는 O(N)이며, 데이터의 분포상태에 영향을 받지 않는다. IBPA의 성능을 측정해본 결과, 2백만개의 랜덤데이터를 정렬한 경우, 중복 값 허용의 경우(a)는 퀵 정렬의 32.42%, 기수정렬의 9%정도의 비교회수만으로도 정렬할 수 있음을 보여주었으며, 중복 값이 없는 경우(b)는 퀵 정렬의 53.12%, 기수정렬의 12.79%정도의 비교회수만으로도 정렬할 수 있음을 보여주었다.

  • PDF

A Study on Information Block Sort Algorithm (정보 블록 정렬 알고리즘에 관한 연구)

  • Song, Tae-Ok
    • The Journal of Korean Association of Computer Education
    • /
    • v.6 no.3
    • /
    • pp.1-8
    • /
    • 2003
  • In this paper, I proposed a sort algorithm named Information Block Sort Algorithm(IBSAl which is not influenced on distribution of data in the list and has time complexity of O(NlogN). Also I evaluated the IBSA using a simulator. Performance analysis shows that, in case of sorting randomly generated two millions data, the number of actual comparisons has taken place about 36% of the number of comparisons in the improved Quick sort algorithm and 22% in Quick sort algorithm.

  • PDF

Proposal of Fast Counting Sort (빠른 계수 정렬법의 제안)

  • Lee, Sang-Un
    • The Journal of the Institute of Internet, Broadcasting and Communication
    • /
    • v.15 no.5
    • /
    • pp.61-68
    • /
    • 2015
  • Among comparison sorts, no algorithm excels a current set lower bound of O(nlogn) in operation. Quicksort, the fastest of its kind, has a complexity of O(nlogn) at its best and on average and $O(n^2)$ at worst. This paper thus presents two methods: first is an O(n+k) simple counting sort which operates much more speedily than an O(n+k), (k=maximum value) counting sort, and second is an O(ln) radix counting sort which counts the frequency of numbers in the digit l of a data and saves it in a corresponding virtual bucket in an array, only to virtually divide the array into radix digit numbers. For the 6 experimental data, the proposed algorithm makes O(nlogn) or $O(n^2)$ of Quicksort simple into O(n+k) or O(ln). After all, the proposed sorting algorithm has proved to be much faster than the counting sort and Quicksort.

Learning System of Sorting Algorithm using Web-based Animation (웹 기반의 애니메이션을 이용한 정렬 알고리즘 학습 시스템)

  • 유광열;정유진
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2003.10a
    • /
    • pp.574-576
    • /
    • 2003
  • 인터넷과 멀티미디어의 눈부신 발전은 교육현장에서도 다양한 교육매체로 활용되어 수업을 돕고 있다. 이러한 교육매체들은 학습자의 생각으로만 이해할 수 있는 것들을 시각적으로 표현하여 보다 직관적이고 구체적으로 이해시킬 수 있다. 이에 본 논문에서는 플래시 액션스크립트를 사용하여 버블, 삽입, 쉘, 퀵, 힙 알고리즘의 수행과정을 그래픽 애니메이션으로 구현함으로 시각적 효과를 통해 다양한 정렬과정을 스스로 학습할 수 있는 학습 시스템을 구현하였다.

  • PDF

Performance Analysis of an Advanced Paralled Join Algorithm on Hypercube System (하이퍼큐브구조 시스템에서 향상된 병렬 결합 알고리즘의성능 분석)

  • Won, Yeong-Seon;Jo, Seok-Bong;Lee, Gyu-Ok;Jwa, Yong-Gwon;Hong, Man-Pyo
    • Journal of KIISE:Computer Systems and Theory
    • /
    • v.26 no.6
    • /
    • pp.683-692
    • /
    • 1999
  • 관계형 데이터베이스 시스템에서 결합 연산자는 데이터베이스 질의를 구성하는 연산자들 중 가장 많은 처리시간을 요구한다. 따라서 이러한 결합연산자를 효율적으로 처리하기 위해 많은 병렬 알고리즘들이 소개되었다. 그 중 하이브리드 해쉬 결합 알고리즘은 가장 우수한 것으로 알려져왔다. 그러나 이 알고리즘은 여러 노드로 데이터를 분할하는 과정에서 데이터의 편중 문제가 발생하며, 이는 전체 시스템의 성능을 크게 저하시키게된다. 본 논문에서는 이러한 데이터 편중문제를 해결한 변형된 하이퍼퀵 정렬을 이용한 병렬 결합 알고리즘을 non-equijoin을 위한 알고리즘으로 확장하였다. 또한 T805로 연결된 하이퍼큐브 구조 시스템에서 시뮬레이션하여 얻은 결과를 수치 계산적 비용모델의 결과와 비교를 통해 변형된 하이퍼 퀵 정렬을 이용한 병렬 결합 알고리즘의 성능을 분석하고 , 비용모델의 타당성을 입증하였다.