Parallel Sorting Flashcards
What is the best sequential comparison-based sorting algorithm running time?
O(nlogn)
What is the difference between a compare exchange operation and a compare split operation?
Compare split contains more than one element per processor with each of the two processors have n/p elements.
What is the computational cost of performing a compare split operation when processors contain sub-arrays of size n/p?
ts + (tw * n / p)
ts = comparison time
tw = data transfer time
How can we parallelize divide-and-conquer-based sorting algorithms using functional decomposition?
Is functional decomposition sufficient to obtain an efficient comparison-based parallel sorting algorithm?
By dividing the problem into smaller independent subproblems thru functional decomposition, we can parallelize these independent sections to achieve faster execution times.
We need data decomposition because data is always distributed and won’t be on one processor.
The bitonic sort is a parallel version of which divide and conquer sorting algorithm?
Merge Sort
How is the merge step implemented in the bitonic sort?
Is there merge also parallelized?
Bitonic sort recursively split the input into halves and then repeatedly performs bitonic merging operations to combine them until all is sorted.
What are sorting networks?
How can they be used to define sorting algorithms?
Networks of comparators designed for sorting.
Used to order which comparisons and exchanges are performed.
What is an increasing comparator? How is it implemented?
compares two elements and orders them in increasing order.
Used for increasing tones for bitonic sequences.
In the bitonic sorting algorithm, why do we need both increasing and decreasing comparator elements in the sorting network?
To perform compare and exchange operations using the sorting process.
What is the definition of a bitonic sequence?
A sequence of increasing and then decreasing elements (or vice versa) with no repetitions in pattern.
What happens to a bitonic sequence when we perform a bitonic split?
The sequence is divided into two smaller bitonic sequences to be sorted.
What does a bitonic merging network do to a bitonic sequence?
Merge two bitonic sequences into a single bitonic sequence.
What is the depth of a bitonic sorting network that can sort a sequence of size 2^n.
log2(n)
What is the cost of a serial bitonic sorting algorithm when applied to a sequence of size n?
O(n log2 n)
If we want to sort n numbers on p processors with n-p elements per processor, what is the depth of the bitonic sorting network that would be used to sort this sequence?
What operations do the elements of this bitonic sorting network represent?
Depth: O(log2 n)
n/2 comparators