cos423: Theory of Algorithms handout #19
Michael Goldwasser
Princeton University Tuesday, April 7, 1998

Homework #7: Parallel Algorithms
Due Date: Tuesday, April 14, 1998 (5:00pm)


Collaboration Policy


You may collaborate with others on this entire homework. However, please re-read the policy guidelines from Handout #1.

Reading


You should read the introduction of Ch. 30 of CLR, along with sections 30.1, 30.2, and 30.4.

Practice


Recall, these exercises are purely for your own practice. You need only turn in the official problems.

Problems


1.
Do CLR 30-2. (35 points)
We wish to find the maximum of n numbers on a CRCW PRAM with p=n processors.
2.
(35 points)
Given an n-element list, where some elements of the list are marked as being blue, your goal is to create a list consisting of exactly the blue elements. Give an algorithm on an EREW PRAM, using P(n)=n processors, and $T(n) = O(\lg n)$ running time. In your write-up, you should reasonably justify the correctness of your algorithm, the running time, and also that it truly obeys EREW. (partial credit will be given for algorithms which require a more powerful model of concurrency.)

3.
CLR 30.1-5 and CLR 30.1-6 (30 points)
Show how to modify the Euler tour technique, to give EREW algorithms which compute the following information for an arbitrary n-node binary tree, using $O(\lg n)$ time and O(n) processors. (you should give a separate algorithm for each of the following)

Extra Credit


(CLR 30.2-6)
Prove that for any constant $\epsilon \gt 0$, there is an O(1)-time CRCW algorithm using $O(n^{1+\epsilon})$ processors to find the maximum element of an n-element array. (Hint: Think about your solution to Problem 1 above. Can you modify the analysis?)
This document was generated using the LaTeX2HTML translator Version 97.1 (release) (July 13th, 1997)

Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.