Вы находитесь на странице: 1из 1

CS648 : Randomized Algorithms Semester I, 2013-14, CSE, IIT Kanpur

Theoretical Assignment - 2 (due on 16 September: 9AM)


Note: Be very rigorous in providing any mathematical detail in support of your arguments. Also mention any Lemma/Theorem you use. This assignment has 6 marks on the absolute scale. You are encouraged to have a discussion with me on these problems in case you get stuck. 1. Estimating the biasness of a coin Suppose you are given a biased coin that has Pr[HEADS] = p a, for some xed a. This is all that you know about p. Devise a procedure for estimating p by a value p such that you can guarantee that Pr[|p p | > p] < for any choice of the constants 0 < a, , < 1. Let N be the number of times you need to ip the biased coin to obtain this estimate. What is the smallest value of N for which you can still give this guarantee? 2. Approximate Ham-sandwich cut Given n red points and n blue points in a plane, a line L is called ham-sandwich cut if it simultaneously bisects the red points as well as the blue points, that is, there are n/2 red (as well as blue) points on each of the two sides of the line. There is a deterministic algorithm for this problem which uses point line duality concept and is quite nontrivial. For all practical purposes, even a slightly weaker version of the ham-sandwich cut, dened below, also works equally well. a line L is said to be (1 + )-approximate ham-sandwich cut if the number of red (as well as blue) points on each side of the line L is at most (1 + )n/2. You have to design an O(n) time randomized Monte Carlo algorithm which computes an (1 + )approximate ham-sandwich cut with probability 1 nc for any given constants c, > 0. Then you have to convert it into Las Vegas algorithm with expected O(n) running time. Hint: Get inspration from the Approximate-Median algorthm and think simple !! 3. Estimating all-pairs distances Consider an undirected unweighted graph G on n vertices. For simplicity, assume that G is connected. We are also given a partial distance matrix Mc for some c < 1 : For a pair of vertices i, j the entry Mc [i, j ] stores exact distance if i and j are separated by distance cn, otherwise Mc stores a symbol # indicating that distance between vertex i and vertex j is greater than cn. Unfortunately, there are (n2 ) # entries in Mc , i.e., for (n2 ) pairs of vertices, the distance is not known. (a)Design a Monte Carlo algorithm to compute exact distance matrix for G in O(n2 log n) time. (Each entry of the distance matrix has to be correct with probability exceeding 1 1/n2 ). Hint: Note that a BFS tree rooted at a vertex stores exact distances between certain pair of vertices. For this exercise, nd a small set of witnesses using random sampling, grow BFS trees on them and proceed,...

Ponder over these problems because each of them has a very inspirational solution.

Оценить