next up previous
Next: Analysis Up: l4 Previous: Example

Analysis



$T_{BS}$ = 4n + $T_{IS}$n + 3



Let $n_i$ = number of elements in bucket B[i].

The expected time to sort elements in B[i] = \(E(O(n_i^2))\) = \(O(E(n_i^2))\).



Note that the expected value of a random variable X as described in Appendix C, is


\begin{displaymath}E(X) \;=\; \sum_x x Pr(X=x)\end{displaymath}

The variable x here represents the value of X, and Pr(X=x) represents the probability that the value of X is x.



The variance of a random variable X with mean E[X] is notated Var[X].




next up previous
Next: Analysis Up: l4 Previous: Example