Question: Show that randomized quick-sort runs in O(nlogn) time with probability at least 11/n, that is, with high probability, by answering the following: a. For each

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.

Step by Step Solution

3.45 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

For a note that we need not define C i j for j n since it is impos... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Introduction to Algorithms Questions!