A $log(k)$ algorithm for the matroid secretary problem
It seems that there is a typo – $v_{i+1} - v_i$ should be $v_i - v_{i+1}$.

Suppose first that all elements are distinct. Then (using the convention $v_0 = 0$)
$$
 \sum_{i=1}^{q-1} (v_i-v_{i+1}) n_i(B^*) + v_q n_q(B^*) = \\
 \sum_{i=1}^{q-1} i (v_i-v_{i+1}) + q v_q = \\
 \sum_{i=1}^q i v_i - \sum_{i=2}^q (i-1) v_i = \sum_{i=1}^q v_i.
$$

Consider now the general case, in which we have
$$
v_1 = \cdots = v_{j_1} &gt; v_{j_1+1} = \cdots = v_{j_2} &gt; \cdots,
$$
where $j_r = q$. Then for $j_0 = 0$, $j_{r+1} = j_r+1$, and $v_{q+1} = 0$, we have
$$
 \sum_{i=1}^{q-1} (v_i - v_{i+1}) n_i(B^*) + v_q n_q(B^*) = \\
 \sum_{\ell=1}^{r+1} \sum_{t=0}^{j_\ell-1} (v_{j_{\ell-1}+t} - v_{j_{\ell-1}+t+1}) n_{j_{\ell-1}+t}(B^*) = \\
\sum_{\ell=1}^{r+1} (v_{j_{\ell-1}} - v_{j_{\ell-1}+1}) (j_1 + \cdots + j_{\ell-1}) = \\
\sum_{\ell=1}^r v_{j_\ell} j_\ell = \sum_{i=1}^q v_i.
$$
(This calculation might not be 100% correct, but you get the idea.)