Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

=============================================================

CS646: Assignment
=============================================================

1) Odd-Even Merging Network :


a) State and prove the strategy used in Odd-Even Merging Network.
b) Explain how it can be used to sort n elements.
c) Determine the number of parallel steps and comparators needed in
the network to sort n elements.

Solution: Please refer Lecture No: 7.

2) Mesh Connected Computer :


a) Write an algorithm to multiply two matrices, each of size n x n on 2D Mesh Connected Computer having n2 processors.
b) Determine its time complexity.
c) Discuss how this algorithm can be used to determine whether there
exists a path between any two vertices in a graph.

Solution: Please refer Lecture No: 18.

3) Lexicographic Combination:
If the first m elements of the th lexicographic combination X() are a1,
a2, ...., am then show that satisfies the following:
n- am

Cr-m+1 nCr - 1 km-1 n- akCr-k+1 - n- am +1Cr-m+1

Given a combination, explain a method which can be used to generate


the next lexicographic combination.

Solution: Please refer Lecture No: 21.

4) kth Element (EREW model) :


Is it possible to design a cost optimal parallel algorithm to find the kth
element on EREW model? Justify.

Solution: Please refer Lecture No: 14.

5) kth Smallest Element in X+Y (CREW algorithm):


Let X and Y be two sorted sequences of n elements each. Then,
a) Define UBL which is a portion of X+Y and can contain the kth smallest
element in X+Y.
b) Write a CREW algorithm to find the kth smallest element in X+Y =
{xi + yj | xi belong to X, yj belong to Y, for all i,j}.

Solution: Please refer Lecture No: 16.

6) Bitonic merge :
a) State and prove the theorem of Bitonic merge.
b) Write the Biotonic sort algorithm to sort 2n elements using a
Hypercube with 2n processors.
c) Derive its time complexity.

Solution: Please refer Lecture No: 8 and 11.

7) Merging Algorithm (EREW model) :


a) Write a cost optimal merging algorithm for EREW model.
b) Derive its time complexity.
c) Determine the condition for which the algorithm becomes the cost
optimal.

Solution: Please refer Lecture No: 13.

The Books Referred:


[A]

The Design and Analysis of Parallel Algorithms by Selim G. Akl (Apr 1989)
[B]
Parallel Sorting Algorithms (Notes and Reports in Computer Science and Applied Mathematics, 12)
by Selim G. Akl (Oct 1985)
[C]

Parallel Computation: Models and Methods by Selim G. Akl (Nov 6, 1996)


[D]
Foundations of parallel processing, Ratan K Ghosh, Rajat Moona, Phalguni Gupta, Narosa
Publishing House, 1995

You might also like