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 but see lecture note In there, to compute the approxmedianelement within the middle we break the elements into small sets of size compute the median for each small set, and then output the median of these n medians as the approxmediana If instead of breaking into small sets of size we break into small sets of size : i Will the approxmedian we get in this way still be in the middle Find k such that the approxmedian we get will be guaranteed to be in the middle k portion. For example, if it is guaranteed to be in the middle then k 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
