Consider a generalization of Median-of-Five algorithm which hasa parameter a for an integer a = 1. I
Consider a generalization of Median-of-Five algorithm which hasa parameter α for an integer α ≥ 1. Instead of partitioning inputinto n/5 blocks of size 5, the algorithm partitions the input inton/(2α + 1) blocks of size 2α + 1 (assume n is a power of 2α + 1).Note that the algorithm becomes the median-of-five algorithm when α= 2. a) Follow the same steps as slide 14 of lecture notes to derivea recursive formula for the time complexity T(n) of this algorithmas a function of n and α (there is no need to solve the recursion;just deduce the recursive definition of T(n)). b) Assume α = 3 (the algorithm will be “median of 7”). Rewritethe recursion for this particular α and try to solve the recursionby guessing that T(n) ∈ O(n). Follow the same steps as in theslides and indicate whether we can state T(n) ∈ O(n). c) [bonus] Assume α = 1 (the algorithm will be “median of 3”).Rewrite the recursion for this particular α and solve the recursionto provide a tight bound (in terms of Θ) for the time complexity ofthis algorithm. Attached
Needs help with similar assignment?
We are available 24x7 to deliver the best services and assignment ready within 3-8hours? Order a custom-written, plagiarism-free paper

