RAssign2-2013

Embed Size (px)

Citation preview

  • 7/29/2019 RAssign2-2013

    1/1

    CS648 : Randomized Algorithms

    Semester I, 2013-14, CSE, IIT KanpurTheoretical Assignment - 2 (due on 16 September: 9AM)

    Note: Be very rigorous in providing any mathematical detail in support of your arguments. Also mentionany Lemma/Theorem you use. This assignment has 6 marks on the absolute scale. You are encouraged tohave a discussion with me on these problems in case you get stuck.

    1. Estimating the biasness of a coinSuppose you are given a biased coin that has Pr[HEADS] = p a, for some fixed a. This is all thatyou 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 flip thebiased coin to obtain this estimate. What is the smallest value of N for which you can still give thisguarantee?

    2. Approximate Ham-sandwich cutGiven n red points and n blue points in a plane, a line L is called ham-sandwich cut if it simultaneouslybisects the red points as well as the blue points, that is, there are n/2 red (as well as blue) points oneach 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, definedbelow, 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 youhave 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 distancesConsider 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. (Eachentry 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, find a small set of witnesses using random sampling, grow BFS trees on them andproceed,...

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

    1