hw5 - multiple selection problem is that of ±nding the k...

Info icon This preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 413, Analysis of Algorithms Fall Semester, 2004 Assignment 5 Due Date : Nov. 1, 2004 (at the beginning of CSE 413 class) 1. Problem 6.37, page 179. For this problem, the time complexity is not our concern (i.e., your algorithm may take as much time as you want). But, the space bound is our target. Also, we assume that the sequence of input numbers x 1 , x 2 , . . . , x n is given only once to your algorithm. ( 20 points ) 2. Let S be a set of n real numbers a 1 , a 2 , . . . , a n , not in a sorted order. Given m integers k 1 , k 2 , . . . , k m , with 1 k 1 < k 2 < · · · < k m n , the
Image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: multiple selection problem is that of ±nding the k i-th smallest element in the set S for every i = 1, 2, . . . , m . A person solved this problem by applying m times the Selection algorithm that was discussed in class, one for each integer k i . This resulted in an O ( mn ) time algorithm. You are asked to design an O ( n log m ) time algorithm for this problem. ( 20 points ) 3. Problem 5.16, page 115. ( 20 points ) 4. Problem 5.19, page 115. ( 20 points ) Total Points : 80...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern