Question: if it is possible, please send the text solution instead of handwriting. if handwriting, please make it clear as possible as you can. Problem 3
if it is possible, please send the text solution instead of handwriting. if handwriting, please make it clear as possible as you can.

Problem 3 (3 3 bonus points). Suppose Bob has n balls of different sizes, indexed by 1,2, n. Each time, you can specify a set S C 11,2, m of size at most Vn and ask Bob the smallest ball in S. Your goal is to sort the n balls according the their sizes, using as few questions as possible (3 points). Give an algorithm that sorts the n balls using O(m) questions. You can assume n is an integer Hint. Divide S into Vn groups with size Vn, show that each the group could be sorted with O(Vn) questions and design an algorithm to merge the sorted groups. (3 bonus points). Prove that any correct sorting algorithm needs at least 2(n) ques- tions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
