HOMEWORK 2 SOLUTIONS

Similar documents
Lecture 2: April 3, 2013

Problem Set 2 Solutions

Randomized Algorithms I, Spring 2018, Department of Computer Science, University of Helsinki Homework 1: Solutions (Discussed January 25, 2018)

CS 330 Discussion - Probability

Lecture 12: November 13, 2018

Math778P Homework 2 Solution

Lecture 5: April 17, 2013

Math 216A Notes, Week 5

It is always the case that unions, intersections, complements, and set differences are preserved by the inverse image of a function.

Lecture 9: Hierarchy Theorems

( ) = p and P( i = b) = q.

(b) What is the probability that a particle reaches the upper boundary n before the lower boundary m?

Lecture 2. The Lovász Local Lemma

Lecture 14: Graph Entropy

Application to Random Graphs

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 22

Axioms of Measure Theory

Lecture 6: Coupon Collector s problem

An Introduction to Randomized Algorithms

CS / MCS 401 Homework 3 grader solutions

CS 171 Lecture Outline October 09, 2008

Lecture 4: April 10, 2013

Shannon s noiseless coding theorem

Infinite Sequences and Series

STAT Homework 1 - Solutions

(A sequence also can be thought of as the list of function values attained for a function f :ℵ X, where f (n) = x n for n 1.) x 1 x N +k x N +4 x 3

6.3 Testing Series With Positive Terms

P1 Chapter 8 :: Binomial Expansion

Sequences I. Chapter Introduction

Sequences and Series of Functions

Sequences A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

Basics of Probability Theory (for Theory of Computation courses)

Math 2784 (or 2794W) University of Connecticut

1 Hash tables. 1.1 Implementation

CHAPTER 10 INFINITE SEQUENCES AND SERIES

MA131 - Analysis 1. Workbook 2 Sequences I

It is often useful to approximate complicated functions using simpler ones. We consider the task of approximating a function by a polynomial.

Lecture 2 February 8, 2016

Convergence of random variables. (telegram style notes) P.J.C. Spreij

Discrete Mathematics and Probability Theory Fall 2016 Seshia and Walrand Final Solutions

OPTIMAL ALGORITHMS -- SUPPLEMENTAL NOTES

Discrete Mathematics and Probability Theory Summer 2014 James Cook Note 15

A sequence of numbers is a function whose domain is the positive integers. We can see that the sequence

UC Berkeley Department of Electrical Engineering and Computer Sciences. EE126: Probability and Random Processes

w (1) ˆx w (1) x (1) /ρ and w (2) ˆx w (2) x (2) /ρ.

Massachusetts Institute of Technology

Problem Cosider the curve give parametrically as x = si t ad y = + cos t for» t» ß: (a) Describe the path this traverses: Where does it start (whe t =

Statistics 511 Additional Materials

Ma/CS 6b Class 19: Extremal Graph Theory

Approximations and more PMFs and PDFs

kp(x = k) = λe λ λ k 1 (k 1)! = λe λ r k e λλk k! = e λ g(r) = e λ e rλ = e λ(r 1) g (1) = E[X] = λ g(r) = kr k 1 e λλk k! = E[X]

Fall 2013 MTH431/531 Real analysis Section Notes

Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 21. Some Important Distributions

page Suppose that S 0, 1 1, 2.

Here, e(a, B) is defined as the number of edges between A and B in the n dimensional boolean hypercube.

Disjoint Systems. Abstract

Ma 530 Introduction to Power Series

Lesson 10: Limits and Continuity

Chapter Vectors

Discrete Mathematics and Probability Theory Spring 2012 Alistair Sinclair Note 15

Fourier Series and the Wave Equation

Topic 9: Sampling Distributions of Estimators

Lecture 10 October Minimaxity and least favorable prior sequences

Chapter 4. Fourier Series

# fixed points of g. Tree to string. Repeatedly select the leaf with the smallest label, write down the label of its neighbour and remove the leaf.

Topic 9: Sampling Distributions of Estimators

CSE 191, Class Note 05: Counting Methods Computer Sci & Eng Dept SUNY Buffalo

A Probabilistic Analysis of Quicksort

Series III. Chapter Alternating Series

CS161 Handout 05 Summer 2013 July 10, 2013 Mathematical Terms and Identities

10.6 ALTERNATING SERIES

4.1 Sigma Notation and Riemann Sums

NUMERICAL METHODS FOR SOLVING EQUATIONS

Discrete Mathematics for CS Spring 2008 David Wagner Note 22

Putnam Training Exercise Counting, Probability, Pigeonhole Principle (Answers)

lim za n n = z lim a n n.

Model Theory 2016, Exercises, Second batch, covering Weeks 5-7, with Solutions

Math 10A final exam, December 16, 2016

Design and Analysis of Algorithms

Lecture 2: Concentration Bounds

On Random Line Segments in the Unit Square

Random Models. Tusheng Zhang. February 14, 2013

Solutions to Math 347 Practice Problems for the final

PRACTICE PROBLEMS FOR THE FINAL

MA131 - Analysis 1. Workbook 3 Sequences II

DS 100: Principles and Techniques of Data Science Date: April 13, Discussion #10

THE ASYMPTOTIC COMPLEXITY OF MATRIX REDUCTION OVER FINITE FIELDS

Test One (Answer Key)

Math 113 Exam 3 Practice

ACO Comprehensive Exam 9 October 2007 Student code A. 1. Graph Theory

Advanced Stochastic Processes.

Disjoint set (Union-Find)

Zeros of Polynomials

Information Theory and Statistics Lecture 4: Lempel-Ziv code

4x 2. (n+1) x 3 n+1. = lim. 4x 2 n+1 n3 n. n 4x 2 = lim = 3

Topic 9: Sampling Distributions of Estimators

sin(n) + 2 cos(2n) n 3/2 3 sin(n) 2cos(2n) n 3/2 a n =

6.883: Online Methods in Machine Learning Alexander Rakhlin

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials

4.3 Growth Rates of Solutions to Recurrences

Transcription:

HOMEWORK SOLUTIONS CSE 55 RANDOMIZED AND APPROXIMATION ALGORITHMS 1. Questio 1. a) The larger the value of k is, the smaller the expected umber of days util we get all the coupos we eed. I fact if = k the the umber of days we eed to collect every coupo is, because every day we have the choice to select 1 coupo out of k = coupos ad therefore the probability is 0 that we are ot able to select a distict coupo. The other extreme is if k = 1. The the problem reduces to the coupo collector problem as preseted i class. Therefore at worst, the same boud applies, H. To be more precise, let us calculate the expected umber of days we eed as a fuctio of k ad. Let X i = umber of attempts before you get i + 1 distict coupos. Let X = 1 X i. The the probability of the evet Y i that we get the (i+1)th distict coupo whe i k is ( i ( ) ( P (Y i ) = 1 ( k i =!(i! i!(! ( ) =!(i! k Here ( i is the umber of ways that you ca select k coupos out of i distict coupos you already have. This is divided by ( which is the umber of possible ways to select k coupos out of the total umber of coupos. As show i class, E(X i ) = 1. The Y P (Y i ) i evets are idepedet so: E(X) = 1 1 1 P (Y i ) =!(i!!(i! i!(! b) As show i Figure 1, the expected umber of days util all the coupos are collected decreases rapidly as k icreases. I this case, we have that k = c for c a fixed real costat with 0 c 1. Cosider!(i! i!(!!(i! whe > i k c. I the iterval i [c, 1], this is 1

CSE 55 RANDOMIZED AND APPROXIMATION ALGORITHMS 30 80 5 60 0 15 40 10 0 5 0 0 50 500 00 400 150 300 100 00 50 100 Figure 1. The expected umber of days util all the coupos are collected as a fuctio of k for specific values of. largest whe i = 1, whe it is!( 1 c)! ( 1)!( c)!. This is!( 1 c)! ( 1)!( 1 c)! ( 1)!( c)( 1 c)! ( 1)!( 1 c)! = ( c) = c Hece E(X) is bouded by /c, ad hece is O(). (See Figure.) c) Figure 1 shows that as k icreases, the expected umber of days to collect all the coupos rapidly decreases. The questio is: Whe c is fixed but grows without boud, what is the asymptotic growth rate? Whe k > 1, this ca take o loger (expected) tha the usual coupo collector, so the expected time is O( log ). Ca it be less? Compare the modified coupo collector problem with c coupos ad c give at a time with the usual coupo collector problem with coupos. The probability of gettig the last coupo i the coupo collector problem is 1, ad i the modified

HOMEWORK SOLUTIONS 3 00 150 100 50 c Figure. The expected umber of days util all the coupos are collected as a fuctio of c. oe it is 1 (c 1 c ) ( c c ) same (expected). = 1 c( 1) c = c = 1. So the time to get the last coupo is the c I selectig the lth coupo from the ed, i the basic coupo collector the probability is l. I the modified oe the probability of gettig ay specific oe of the l remaiig is 1, as we just saw. By the uio boud (Boole s iequality), the probability of gettig at least oe of the l caot exceed l. Hece gettig the last coupos i the modified coupo collectio problem takes a expected time at least as log as the basic coupo colector. The for coupos offered c at a time the expected time is at least H c /c, i.e. it is Θ( log ) because c is a costat.

4 CSE 55 RANDOMIZED AND APPROXIMATION ALGORITHMS. Questio. We represet the source ad destiatio vertices i biary represetatio as we did i class. Because we have a -dimesioal hypercube we eed bits to represet each of the vertices. Let Π : V V be a permutatio fuctio for a -dimesioal hypercube. We defie the permutatio ext, supposig without loss of geerality that is eve. Let D be the set of all the distict biary sequeces of legth. For all sequeces A D ad B D, for source vertex AB set the destiatio to be BA (Π(AB) BA.) This way, we make sure that give every source vertex there is a destiatio vertex ad it is ideed a permutatio. We use the same bit-fixig strategy as explaied i class. A bottleeck occurs at each of the / vertices {BB : B D, because / messages go through each of these odes (ad each oly ecouters oe of these bottleecks.) It follows that the total delay is at least / / 1 i; divide by to see that the average delay is Ω(). (Note that the value i the sum is approximately 1.) 3. Questio 3. Cosider a radom -colorig (idepedetly, color each edge red or blue). For a fixed set R of k vertices, let A R be the evet that the iduced subgraph of K o R is moochromatic. Clearly, P (A R ) = 1 (k ). Sice there are ( possible choices for R, the probability that at least oe of the evets A R occurs is at most ( 1 ( k ) < 1. Thus, with positive probability o evet A R occurs ad there is a two-colorig of K without a moochromatic K k, that is, R(k,. If k 3 ad we take = k/ the we get that R(k, > k/ for all k 3. 4. Questio 4. (a) A reasoable lower boud is obtaied by otig that I ca get at most ( k ) ew pairs of diers each ight ad I have to get ( ( ) by the ed. So ( ) / k ) = ( 1) is a k(k 1) reasoable boud. A better boud of ( 1) ca be obtaied by seeig that every dier has to k (k 1) be ivited o at least ( 1) ights. (k 1) (b) Defie X l as i the questio statemet. The E[X 0 ] = ( ). The crucial observatio is that E[X l+1 ] = E[X l ](1 k(k 1) ). Why is this true? ( 1) Cosider a pair that is ot yet covered after l ights. What is the chace that it will be covered toight? It is k(k 1). By liearity of expectatio the umber of ew ( 1)

HOMEWORK SOLUTIONS 5 pairs of diers o ight l + 1 is the E[X l ] k(k 1). Subtract these from E[X ( 1) l] to get E[X l+1 ]. Apply this repeatedly to get E[X N ] = ( ) (1 k(k 1) ( 1) )N. Whe E[X N ] < 1, there must be at least oe way to fiish the ivitatios after N ights. Usig the Markov iequality, whe E[X N ] < 1, the probability that we fiish withi N ights is at least 1. So we wat to solve ( ) (1 k(k 1) ( 1) )N < 1 for N. Now cosider ( ) N ( 1) k(k 1) ( 1) < 1. ( 1) Take logarithms ad multiply by -1. So log(( 1)) + N(log(( 1)) log(( 1) k(k 1))) > 0. N > log(( 1)) log(( 1)) log(( 1) k(k 1)). The smallest value of N satisfyig this is eough to get the desired probability of success. Oe ca estimate this to get simpler expressios for N. Whe k =, this is a coupo collector problem with ( ) coupos, so we expect the time to be O( log ). The time caot icrease as k icreases. (c) Let Y l be the umber of pairs of diers who have ot died together after l ights. Because we always select to hadle a umber of pairs that is at least the expectatio, Y l E[X l ]. I particular, whe E[X N ] < 1, Y N < 1 so Y N = 0, ad all pairs of diers have shared a dier. Note that Y l is ot a radom variable, rather it takes o a specific iteger value with certaity. 5. Questio 5. Let us cosider the graph G described i the questio. Suppose that it has m edges ad vertices. The k vertices we are after cosist of ay set of k vertices that iduce a subgraph of G with at least the average umber of edges over all k-vertex subgraphs. We are goig to pick the k vertices oe vertex at a time. Call a vertex i, ad put it i I if we decide to iclude it (we will ever remove it). Call a vertex out, ad put it i O if we decide ot to iclude it (we will ever add it). Let X be a radom variable that gives the umber of edges iduced o a radom k-vertex subgraph. Defie the coditioal expectatio E[X [I, O]] to be the expectatio of X coditioed o the iclusio of all vertices i I, the exclusio of all vertices of O, ad the radom selectio of k I vertices that are either i I or O.

6 CSE 55 RANDOMIZED AND APPROXIMATION ALGORITHMS Iitially the probability that a chose subgraph cotais a specific edge is E[X [, ]] which is just the expectatio a priori. We also ote that whe I O cotais all vertices, the radomess is goe, ad the expectatio is the actual umber of edges i the chose subgraph. The key observatio is that for ay vertex x I O, k I O k E[X [I, O]] = E[X [I {x}, O]] + E[X [I, O {x}]] I O I O To see this, compute the probability that a radom selectio of k I vertices from the I O that remai cotais, or does ot cotai, x. It is the same for every x. First treat boudary cases. Whe k I = 0, stop ad place all remaiig vertices i O. The we are guarateed to have realized at least the iitial expectatio. Whe k I = I O, place all remaiig vertices i I ad we have the same guaratee. Otherwise at least oe of E[X [I {x}, O]] or E[X [I, O {x}]] is at least as large as E[X [I, O]] ad we just eed to figure out which oe. Now focus o a specific edge e of G, ad cosider its probability of beig i the subgraph evetually chose. Suppose that we have already decided to iclude I ad exclude O, ad we wat to decide about icludig x. We compute its cotributio to the expectatio before decidig about x, whe x is added, ad whe x is excluded, as follows Cotributio of e to Expectatio Coditio o x, e E[X [I, O]] E[X [I {x}, O]] E[X [I, O {x}]] e O 0 0 0 e I, x e e I, x e e I =, x e k I I O k I k I 1 I O 1 k I I O 1 I O 1 0 (k I )(k I 1) ( I O )( I O 1) (k I )(k I 1) ( I O )( I O 1) (k I 1)(k I ) ( I O 1)( I O ) (k I )(k I 1) ( I O 1)( I O ) k I 1 I O 1 0 e I =, x e Now the idea is simple. Cout edges of each of the last four types give your curret selectio of I ad O. Compute the differeces betwee the expectatio of icludig x ad for excludig x usig the table above. Choose the larger oe, ad the proceed to the ext step (checkig the boudary cases agai to see if you are doe).