Show that randomized quick-sort runs in O(nlogn) time with probability at least 1−1/n, that is, with high probability, by answering the following:
a. For each input element x, define Ci, j(x) to be a 0/1 random variable that is 1 if and only if element x is in j+1 subproblems that have size s such that (3/4)i+1n < s ≤ (3/4)in. Argue why we need not define Ci, j for j > n.
b. Let Xi, j be an independent 0/1 random variable that is 1 with probability 1/2j, and let L=⌈log4/3 n⌉. Argue that ΣL−1i=0 Σnj=0Ci, j(x) ≤ ΣL−1i=0 Σnj=0 Xi, j.
c. Show that the expected value of ΣL−1i=0 Σnj=0 Xi, j is (2−1/2n)L.
d. Show that the probability that ΣLi=0Σnj=0 Xi, j > 4L is at most 1/n2, using the Chernoff bound that states that if X is the sum of a finite number of independent 0/1 random variables, having expected value μ > 0, then Pr(X > 2μ) < (4/e)−μ, where e = 2.71828128. . ..
e. Argue that randomized quick-sort runs in O(nlogn) time with probability at least 1−1/n.
Enjoy 24/7 customer support for any queries or concerns you have.
Phone: +1 213 3772458
Email: support@gradeessays.com