* Bitonic sort consists ofO(n·log(n)2) comparisons inO(log(n)2) stages.

사용자 삽입 이미지
Figure 7:  Sorting network BitonicSort for n = 8

 

In order to form a sorted sequence of lengthnfrom two sorted sequences of lengthn/2, there are log(n) comparator stages required (e.g. the 3 = log(8) comparator stages to form sequenceifromdandd'). The number of comparator stagesT(n) of the entire sorting network is given by:

 T(n)  =  log(n) + T(n/2)
The solution of this recurrence equation is
 T(n)  =  log(n) + log(n)-1 + log(n)-2 + ... + 1  =  log(n) · (log(n)+1) / 2
Each stage of the sorting network consists ofn/2 comparators. On the whole, these areO(n·log(n)2) comparators.

 

** Simulation

http://www.iti.fh-flensburg.de/lang/algorithmen/sortieren/bitonic/bitonicen.htm

 

 

 

'Programming > Algorithm' 카테고리의 다른 글

Dynamic Programming  (0) 2007.11.29
알고리즘 디자인 기법  (0) 2007.09.12
개발자 순서도  (0) 2006.08.11
순서도 도형  (0) 2006.08.11
컴 공부 방법론-알고리즘/자료구조  (0) 2006.08.11

Posted by 영웅기삼
,