Show how to compute prefix sum in constant time using pram

Assignment Help Data Structure & Algorithms
Reference no: EM13996937

1. Given a sequence of numbers {a1, a2, ... , an}, show how to compute the prefix sum in constant time using PRAM. Which PRAM is used, how many processors are needed, and what is the cost of this algorithm?

2. Design an algorithm to distribute a copy of a sequence X = {x1, x2, ... , xk} that is stored in global memory to the local memory of each processor in O(log n) time, assuming you have an n-processor EREW PRAM and k =O(log n).

3. The suffix sum (or suffix maxima) was briefly discussed in class and is defined in our textbook by Akl. The prefix maxima can be computed by first reversing the sequence, then computing its prefix sum, and finally reversing the results of this computation. Provide a formal description of this PRAM algorithm and analyze its running time and cost. (Note: A formal description is illustrated by the one on slide 31 of our PRAM slide chapter.)

4. Show the simulation of CR by EREW PRAM. This is problem 30.2-8 in the Cormen, et. al. reference. NOTE: This is similar to the simulation of CW by EREW PRAM covered in slides. Recall that for a CW simulation, values must be carried from processors to memory. However, for the CR simulation, values must be carried from the selected memory cells back to the processors that are reading a memory cell value.

5. Give an O(lg n)-time EREW algorithm that determines for each object in an n-object list whether it is in the middle object. (Note: The middle object is defined to be the object in the |n/2|position.)

Reference no: EM13996937

Questions Cloud

How long does it take light incident perpendicular to glass : A 5.5 cm -thick layer of oil (n=1.46) is sandwiched between a 1.5 cm -thick sheet of glass. How long (in ns) does it take light incident perpendicular to the glass to pass through this 9.5 cm -thick sandwich?
What is the width of the central maximum on the screen : What is the width of the central maximum on the screen (in cm)? What is the distance from the center of the central maximum to the 3rd order minimum of the single slit pattern (in cm)?
What are its disadvantages relative to revenue sharing : Profit sharing is not widely practiced in the franchise business. What are its disadvantages relative to revenue sharing?
At what x-coordinate could you place a proton : At what x-coordinate could you place a proton so that it would experience no net force? Express your answer to two significant figures and include the appropriate units.
Show how to compute prefix sum in constant time using pram : Given a sequence of numbers {a1, a2, ... , an}, show how to compute the prefix sum in constant time using PRAM. Which PRAM is used, how many processors are needed, and what is the cost of this algorithm?
What are the costs and benefits of outsourcing : What are the costs and benefits of outsourcing? Can outsourcing be used to avoid tariffs and other trade restrictions? Provide 2 real-world examples of outsourcing by a firm(s) which competes globally. Need citations
Identify legal responsibilities of teachers : Use the GCU eLibrary to research information beyond what is provided in the course materials to explore the law and its application to special education issues covered in this course. Explore state departments of education Web sites to investigate..
How will people know that the screen is touch-sensitive : Sketch two (2) alternative interface designs for the ATM and indicate which alternative you prefer. The goal of this assignment is to exercise your user interface design abilities. Creativity in balancing usability with the constraints of the inte..
Define a sympathy strike : Provide a two paragraph summary of the case and Define a "sympathy strike?" How does it apply to this case study

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Complications in a time sharing system

Determine what complications could happen in a time-sharing system if two processes need access to the same file at the same time?

  Returns true if a string contains properly nested

Give an algorithm that returns true if a string contains properly nested and balanced parentheses, and false if otherwise. Hint: At no time while scanning a legal string from left to right will you have encountered more right parentheses than left..

  Develop a number of classification models

First task you should complete is a data investigation exercise, where you will document the characteristics and other information that you can determine about each Feature.

  Creating decision tree

Premium Airlines has currently offered to settle claims for a class action suit, which was originated for alleged price fixing of tickets. The settlement is stated as follows. Create a decision tree for this condition.

  Evaluate the given problem of data types

Comprehensive quiz 1) Evaluate the following: a) (5 > 3 && 4 6 && true) c) (3 >= 3 || false) d) (true || false) ? 4 : 5.

  Show how the box can be used to factor n

That is, given a quadratic residue y, the box outputs an x with x2 = y (equation is modulo n). Show how the box can be used to factor n.

  If you can monitor when sql injections are performed on an

if you can monitor when sql injections are performed on an sql database what would you recommend as a security

  Creating code for a class called arrayqsn

Create all the code for a class called ArrayQsn. This class will contain 2-techniques. The first technique runningSumMean accepts an array of ints as a parameter, and will return the mean of the values as a double.

  How to work on datasturetur assignment kdfk dskf

kdfk dskf jkfjksdjkf jksdjfkjskfjksdjkf jksdjkf jsdkjfk dsk fkdsjkfj kdsjkf jdsk jksdjkf kdfk dskf jkfjksdjkf

  What is the running time of your algorithm in terms of n

If you give a greedy algorithm, be sure to prove that your algorithm is correct by proving both greedy choice and optimal program substructure. What is the running time of your algorithm, in terms of n?

  Data structures and algorithm design

Data Structures and Algorithm Design

  What do you mean by query evaluation plan what are its

question 1 what is a query evaluation plan? what are its advantages and disadvantages?question 2 discuss the different

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd