Chapter 11: Problem 8
Write a CREW PRAM algorithm for determining for each element of an \(n\) -element linked list if it is the middle ( \([n / 2]\) th ) element in \(\theta\) ( \(\lg n\) ) time.
Chapter 11: Problem 8
Write a CREW PRAM algorithm for determining for each element of an \(n\) -element linked list if it is the middle ( \([n / 2]\) th ) element in \(\theta\) ( \(\lg n\) ) time.
All the tools & learning materials you need for study success - in one app.
Get started for freeWrite a PRAM algorithm that runs in \(\theta(\lg n)_{2}\) ) time for the problem of mergesorting. (Hint: Use \(n\) processors, and assign each processor to a key to determine the position of the key in the final list by binary searching.)
Consider the proble of adding two \(n \times n\) matrices. If it takes \(t_{a}\) time for one person to add two numbers, how many people do we need to minimize the total time spent to get the final answer? What will be the minimum amount of time needed to find the answer, if we assume that we have enough people? Justify your answers.
Write a sequential algorithm that implements the Tournament method to find the largest key in an array of \(n\) keys. Show that this algorithm is no more efficient than the standard sequential algorithm.
If we have two people add \(n\) numbers in a list and it takes \(t_{a}\) time for one person to add two numbers, how long will it take the two people to add all \(n\) numbers in the list, if we consider the operation of addition as the basic operation and include \(t_{p}\) time for passing the result of an addition from one person to the other? Justify your answer.
Consider the problem of adding the numbers in a list of \(n\) numbers. If it takes \(t_{a}(n-1)\) time for one person to add all \(n\) numbers, is it possible for \(m\) people to compute the sum in less than \(\left[t_{a}(n\right.\) -1)]\(/ m\) time? Justify your answer.
What do you think about this solution?
We value your feedback to improve our textbook solutions.