### BibTeX

@MISC{Subramani_1problems,

author = {K. Subramani},

title = {1 Problems Computational Geometry- Homework I (Solutions)},

year = {}

}

### OpenURL

### Abstract

1. Tail Bounds: In class, we established that the RANDOMIZED-QUICKSELECT() algorithm runs in expected time O(n), when asked to find the k th largest element in an array of n elements. Argue that there exists a constant c, such that the probability that more than c · n · log n comparisons are made in a run of RANDOMIZED-QUICKSELECT() is at most 1 n. Solution: For this problem, we will need the Chernoff bound. Theorem 1.1 Let X1, X2,..., Xn denote the indicator random variables of n Bernoulli trials, each with probability of success p. The random variable X = �n i=1 Xi is a Binomial random variable with mean µ = �n i=1 p = np. The Chernoff bound states that for any δ> 0, Pr[X − np ≤ −δ] ≤ e −2·δ2 n See [MR95] or John Lafferty’s notes for the proof of the above theorem. We can think of the execution of RANDOMIZED-QUICKSELECT() in terms of its computation tree. At the root, there is a node containing all the elements; after the first pivot operation, two children are created, with the left child containing elements less than the pivot element and the right child containing the remaining elements. The crucial observation is that unlike RANDOMIZED-QUICKSORT(), the computation proceeds along one branch only; this branch is called the active branch. Let us declare a node S on the active branch to be good, if either it is a leaf or both its children have cardinalities between 1 3 4 · |S | and 4 · |S|. Observe that an active branch node has probability at n good nodes on any root-to-leaf path. (Why?) least 1 2 of being good. Secondly, there cannot be more than k = log 4 3 Assume that the active branch has r · k nodes in total. Clearly, the expected number of good nodes on this path is r·k 1 2. We are interested in the value of r, such that the probability of not having at least k good nodes is less than n. We associate a random variable Xi, with the node of the active branch at level i of the computation tree. Xi is set to 1, if the corresponding node is good and 0, otherwise. Thus the total number of good nodes is X = � r·k i=1 Xi. Now, observe that Z is a binomial random variable and we can hence apply Theorem (1.1) to write r · k r Pr[X ≤ k] = Pr[X ≤ ( − k · ( − 1))]

### Keyphrases

good node active branch problem computational geometry homework computation tree binomial random chernoff bound left child pr pr tail bound log comparison indicator random variable first pivot operation pivot element let x1 random variable crucial observation see mr95 right child john lafferty note total number root-to-leaf path bernoulli trial random variable xi active branch node corresponding node computation proceeds expected number