lect05 - Lecture 5 Sorting Networks Comparator x min y x x...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Lecture 5 Sorting Networks Comparator x ) , min( ' y x x = y comparator ) , max( ' y x y = ) , min( ' y x x = ) , max( ' y x y = x y time ) 1 ( O A Sorting Network 9 5 2 6 5 9 2 6 2 5 6 9 2 5 6 9 A sorting network is a comparison network which output monotone nondecreasing sequence for every input . Depth 9 5 2 6 5 9 2 6 2 5 6 9 2 5 6 9 Depth is the maximum number of comparators on a path from an input wire to an output wire. Depth = parallel time 9 5 2 6 5 9 2 6 2 5 6 9 2 5 6 9 Depth is the maximum number of comparators on a path from an input wire to an output wire. for.- end ; ] 1 [ ; 1 and ] [ ] 1 [ do ] [ and while ; 1 ]; [ begin do ] [ to 2 for key i A i i i A i A key i A i j i j A key A length j ← +- ← ← +- ← ← ← Insertion Sort A array input 3 1, , 6 5, 4, 2, 3 1, 6, 5, , 4 2, 3 1, 6, , 4 5, 2, 3 1, 6, 4, 5, , 2 3 1, 6, 4, , 2 5, , , , , , 6 5, 4, , 3 2, 1, 6 5, , 3 4, 2, 1, 6 , 3 5, 4, 2, 1, 3 6, 5, 4, 2, 1, , , , , 3 6, 5, 4, 2, , 1 3 6, 5, 4, , 1 2, 3 6, 5, , 1 4, 2, 3 6, , 1 5, 4, 2, 3 , 1 6, 5, 4, 2, , , , , , key 5 a 1 a 2 a 6 a 3 a 4 a Sorting network constructed from insertion sort ....
View Full Document

This note was uploaded on 11/03/2010 for the course COMPUTER S CS 6363 taught by Professor Dingzhudu during the Fall '10 term at University of Texas at Dallas, Richardson.

Page1 / 42

lect05 - Lecture 5 Sorting Networks Comparator x min y x x...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online