Unformatted text preview: n/2 = 6*(n/2)*((nn/2)/(n2))*(1/(n1)) The ratio between the two probabilities is 1/n * 6 *(n/ 2 )*((nn/2)/(n2 ))*(1/(n1 )) 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
 Dr.Ayman
 Algorithms, Analysis of algorithms, Computational complexity theory, original randomized algorithm

Click to edit the document details