Unformatted text preview: n/2 = 6*(n/2)*((n-n/2)/(n-2))*(1/(n-1)) The ratio between the two probabilities is 1/n * 6 *(n/ 2 )*((n-n/2)/(n-2 ))*(1/(n-1 )) If n goes to infinity, their limiting ratio will be 2/3 c. This variation just tries to enhance the way of choosing the pivot, if it succeeds to get balanced partition in each iteration (best case), it will take running time of (n lg n). so, it can only affect the constant factor and not the whole running time....
View Full Document
- Spring '09
- Algorithms, Analysis of algorithms, Computational complexity theory, original randomized algorithm