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

  Decryption speed and diffie-hellman

Increase of a single bit in the size of the encryption key doubles the amount of needed computations - Show how the recipient of the message, who knows e, produces the plaintext.

  Importance of database documentation

Assume your database is performing poorly, and you just started this new job within the past month. You ask to see the documentation for system and are told it does not exist.

  Sorting arrays of name in descending order

Then sort arrays so that records are in descending order by purchase amount for month. Output lists the names of the top five customers.

  Create the entity relationship diagram

Create the entity relationship diagram for your project database based on the initial data requirements.

  The time delay of a long-distance

The time delay of a long-distance call can be determined by multiplying a small fixed constant by the number of communication links on the telephone network between the caller and callee

  Setup an example rsa public/private key pair using primes

RSA with three primes would also work: n = pqr, ?(n) = (p?1)(q?1)(r?1), gcd(e, ?(n)) = 1, and d = e^?1 (mod ?(n)).

  Draw the two points of intersection in red

Output: Draw a circle centered at with the given radius in a window with coordinates running from -10,-10 to 10,10. Draw a horizontal line across the window with the given y-intercept. Draw the two points of intersection in red. Print out the x va..

  Skech-perofrm pre order traversal on binary search tree

Let the binary search tree (BST) which is initially empty. Sketch the tree which will result if following numbers are inserted in the same order.

  Write a function with the heading function nonodes

Write a function with the heading: function NoNodes( t : treeptr) : natural whose value is the number of nodes on the tree t.

  Implementing ajax programming

In the AJAX scripts construct, refer to the DSN datasource as flamingo. Even though its not in your own folder or directory, it has been set up as SYSTEM DSN, so your AJAX script will have access to it.

  Discuss the issues involved in managing software selection

Prepare a PowerPoint presentation which summarizes the background, requirements, analysis and reasons for your choice. Alternative presentation formats such as Prezi are acceptable

  2n-1 comparisons are necessary in the worst case

Prove that 2n-1 comparisons are necessary in the worst case to merge two sorted lists containing n elements each.

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