Question: Problem 2 (25pts) As discussed the deterministic algorithm partitions the solution choose to divide into groups of size 5 11. Does the algorithm work in

Problem 2 (25pts) As discussed the deterministic algorithm partitions the solution choose to divide into groups of size 5 11. Does the algorithm work in O(n) time, give a proof. . What if we choose groups of size Here is a reminder of the algorithm Deterministic Selection 1) choose pivot number 2.)check if smallest desired number 3.) return item ith smallest else recurse on subset of input let pivot(S,p) return S , S, SB. Clearly pivot is ?(n) time function given IS-n selection(S, , Is, l, k) select(S,, k)-p selection (SB, ISBl,k - IS ISpD k>IS let pivot p-median of medians of each group of size 11 It might help to draw a visual representation of median of the medians of groups of size 11 (a) how big can set S, be (b) how big can set SB be (c) what is mar(S, SB) (d) what is your recurrence relationship for this algorithm e) prove the big-O runtime Problem 2 (25pts) As discussed the deterministic algorithm partitions the solution choose to divide into groups of size 5 11. Does the algorithm work in O(n) time, give a proof. . What if we choose groups of size Here is a reminder of the algorithm Deterministic Selection 1) choose pivot number 2.)check if smallest desired number 3.) return item ith smallest else recurse on subset of input let pivot(S,p) return S , S, SB. Clearly pivot is ?(n) time function given IS-n selection(S, , Is, l, k) select(S,, k)-p selection (SB, ISBl,k - IS ISpD k>IS let pivot p-median of medians of each group of size 11 It might help to draw a visual representation of median of the medians of groups of size 11 (a) how big can set S, be (b) how big can set SB be (c) what is mar(S, SB) (d) what is your recurrence relationship for this algorithm e) prove the big-O runtime
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
