0% found this document useful (0 votes)
43 views

6.851 Advanced Data Structures (Spring'12) Prof. Erik Demaine Problem 4 Due: Thursday, Mar. 15

This document provides instructions for Problem 4 of the 6.851 Advanced Data Structures course at MIT for Spring 2012. Students are asked to develop a cache-oblivious median finding algorithm that finds the median of an array using O(IN/B l) memory transfers and can assume knowledge of the median-of-medians selection algorithm. They are also asked to develop a cache-oblivious FIFO queue with O(1/B) amortized memory transfers for both enqueue and dequeue operations that uses only external memory indices up to O(N).

Uploaded by

djoseph_1
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views

6.851 Advanced Data Structures (Spring'12) Prof. Erik Demaine Problem 4 Due: Thursday, Mar. 15

This document provides instructions for Problem 4 of the 6.851 Advanced Data Structures course at MIT for Spring 2012. Students are asked to develop a cache-oblivious median finding algorithm that finds the median of an array using O(IN/B l) memory transfers and can assume knowledge of the median-of-medians selection algorithm. They are also asked to develop a cache-oblivious FIFO queue with O(1/B) amortized memory transfers for both enqueue and dequeue operations that uses only external memory indices up to O(N).

Uploaded by

djoseph_1
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

6.851 Advanced Data Structures (Spring12) Prof. Erik Demaine Problem 4 Due: Thursday, Mar.

15

Be sure to read the instructions on the assignments section of the class web page. Remember to keep your solutions to one page! Cache-oblivious median nding. Given an unordered array of N elements, develop and analyze a cache-oblivious algorithm to nd the median of the array in O(IN/B l) memory transfers. In your solution, you may assume knowledge of the standard median-of-medians deterministic selection algorithm. Cache-oblivous queue. Develop and analyze a cache-oblivious FIFO queue. Both the enqueue and the dequeue operation should take O(1/B ) amortized memory transfers. Your data structure should only use external memory indices in {0, 1, , O(N )}, where N is the maximum number of elements stored in the queue at once.

MIT OpenCourseWare http://ocw.mit.edu

6.851 Advanced Data Structures


Spring 2012

For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.

You might also like