{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Bitonic Sort - Batcher's Networks for Merging Sorting a b L...

Info icon This preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Batcher’s Networks for Merging / Sorting L H max(a , b) b min(a , b) a Compare-exchange operation Building Block Comparator
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
A sequence a 0 , a 1 , a 2 , ..., a m-1 , a m , ..., a n-1 of length n in which the first part a 0 , a 1 , a 2 , ..., a m-1 is monotonically increasing and the second part a m , ..., a n-1 is monotonically decreasing (where index 0 m n – 1) is called a bitonic sequence A sequence which can be made bitonic by a cyclic shift is also considered bitonic
Image of page 2
A single compare-exchange step splits a bitonic sequence into two bitonic sequences L H L H L H L H a n-2 a n-1 a n/2-2 a n/2-1 a n/2 a n/2+1 a 0 a 1 High Bitonic Sequence Low Bitonic Sequence Every element in LBS is smaller than every element in HBS. Repeating log n times yields sorted sequence
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
7 8 10 19 16 5 14 20 High Low n = 8
Image of page 4
7 8 10 19 20 16 14 5 5 14 20 High Low n = 8
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
A C A L D E C P G H D O J K E N L P G M O N H I M I F J F B B K A G A G C H C H D F D F E B B E L M L M P I I P O J J O N K K N A D A D C B B C G F F G H E E H L J J L I K I K M O M O P N N P A B A B D C C
Image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern