Uploaded by trash can

HW-3

advertisement
G. Alaghband
Parallel and Distributed Computing
CSCI 4551
Homework Assignment 3
In this assignment, we recognize application of topics covered in class to an example real-world
problem. We learn about the various parallel algorithms and the amount of parallelism they may
provide as we discussed in lectures. [ABET Criteria 1 & 6]
Read chapter 2 and do the following problems:
1. Assume that we have N = 2l data structures, and that the amount of memory required by each
is given by len[i], i =0,1,...,N-1. It is desired to determine for all K whether data structures
0,1,...,K-1, K will all fit in a memory area of size M. The result of the computation is a logical
vector fit[i], i = 0,1,...,N-1 such that fit[K] = true if and only if data structures 0,1,...,K-1, K will all
fit together in a memory area of size M.
a) What is the size of a sequential algorithm to perform this computation?
Note: Comparison of two numbers is counted the same as any other arithmetic operation.
b) What is the minimum depth for a parallel algorithm to perform this computation?
c) For N = 8 show the dependence graph of an algorithm of size no more than 19 operations and
depth no more than 5 which does the computation.
2. Draw P0(32). While coming up with this solution, pay attention to the relation between the
depth and the recursive application of the algorithm. Can you show that the depth is Log2N?
Download