Question: Recall the deterministic selection algorithm for the median that we saw in class ( Lecture 8 , but see lecture note 7 ) . In

Recall the deterministic selection algorithm for the median that we saw in class (Lecture 8, but see lecture note 7). In there, to compute the approx-median(element within the middle 40%), we break the elements into small sets of size 5, compute the median for each small set, and then output the median of these n/5 medians as the approx-median.(a) If instead of breaking into small sets of size 5, we break into small sets of size 3: i. Will the approx-median we get in this way still be in the middle 40%? Find k, such that the approx-median we get will be guaranteed to be in the middle k portion. For example, if it is guaranteed to be in the middle 40%, then k =25. Justify your answer, and k should be as tight (small) as possible. ii. Will the deterministic selection algorithm be still correct in this case? Briefly justify your answer. iii. Give a recurrence relation for the runtime of this version of the deterministic selection algorithm. Can we still argue that it is in linear time? Justify your answer.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!