0% found this document useful (0 votes)
38 views

CS646: Assignment: 1) Odd-Even Merging Network

This document outlines 7 assignments for a course on parallel computing algorithms. The assignments cover topics like odd-even merging networks, matrix multiplication on a 2D mesh, generating lexicographic combinations, finding the kth element in parallel models, finding the kth smallest element in two sorted arrays, bitonic sorting, and an optimal merging algorithm for the EREW model. For each problem, students are instructed to refer to specific lecture materials to find the solutions.

Uploaded by

sdawdwsq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

CS646: Assignment: 1) Odd-Even Merging Network

This document outlines 7 assignments for a course on parallel computing algorithms. The assignments cover topics like odd-even merging networks, matrix multiplication on a 2D mesh, generating lexicographic combinations, finding the kth element in parallel models, finding the kth smallest element in two sorted arrays, bitonic sorting, and an optimal merging algorithm for the EREW model. For each problem, students are instructed to refer to specific lecture materials to find the solutions.

Uploaded by

sdawdwsq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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