Selection of K elements of given ranks Given a procedure/function 

$Select(S,r)$ - which selects element of rank r from set S
which uses at most $|S|. constant$ comparisons

We design another function $Multiselect(S,R)$
with $R =\{r_1&lt;r_2&lt;...&lt;r_k\}$
returns $X =\{x_1&lt;x_2&lt;...&lt;x_k\}$  such that rank of $x_i$ is $r_i$

What is the minimum no of comparisons for this function?

From Wikipedia I found the upper bound for it -


But while utilising this for deriving the answer I got it totally messed up!
I tried using algorithm to utilise Select(S,r) repeatedly each time
each time decreasing the search space by logn  ... but I guess the answer could be found
in a more concise mathematical way.

By the way, answer given was - $constant.|S|(1+logR)$
Hint: Find first the element of rank $r_{(k+1)/2}$, and split the list accordingly into two parts $S_1,S_2$ satisfying $|S_1| + |S_2| = |S|$. Now repeat.