Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Random Points and Random tools Dr Zvi Lotker Two that are almost the same עודד לוטקר עודד לוטקר Using Poisson assumption Assume we have an x~ Poisson[] Let A[0,1]2 be an area. Denote (A) to be the random variable that counts the number of points in A. P[ k ] e A A k k! The advantage of the Poisson assumption is that the random variable are i.i.d if (A), (B) if AB=. Poisson distribution Poisson distribution P[ k ] e A A k k! Some fact on Poisson Poisson property Parameters Support Probability mass function (pmf) Cumulative distribution function (cdf) Mean Median Mode Variance Skewness Excess kurtosis Entropy Moment-generating function (mgf) Characteristic function e A A P[ k ] k! Poisson and the binomial distribution. The binomial dis is Usually when p is fix we use the normal dis But when p~O(1/n) we use Poisson distribution k Tail of the Poisson[] Let X be a Poisson dis with parameter If t> then P[Xt]≤e-(e)t/tt Proof For any a>0 and t>, P[Xt]=P[Exp(aX)Exp(at)] ≤E[exp(aX)]/Exp(aX) Now E[exp(aX)] is the moment generating E[exp(aX)]=Exp((Exp(a)-1) Choosing a=log(t/) give the P[Xt] ≤e-t--tlog(t/) ≤e-(e)t/tt Poisson and the uniform distribution Thm: If Yi~Pos[i] follow a Poisson distribution with parameter i and Yi are independent, then Y=Yi ~Pos[ i] Thm: Let Yi~Pos[i], assume that Yi=k then (Y1,Y2,…,Yn)~ Uniform i.e. k n k1 , k1 ,..., kn P[Y1 k1 ,, Yn k n | Yi k] n n i 1 Two that are almost the same Any event that takes place with probability p in the Poisson case takes place with probability at most pem in the exact case. Poisson and the uniform distribution Suppose that m balls are thrown into n bins i.u. be the number of balls in the i bin be the independent Poisson var with mean m/m X im Yi m Theorem Let Let Let f(xm1,xm2,…,xmn) be a non negative function then E f X1m , X 2m ,..., X nm e mE f Y1m , Y2m ,..., Ynm ,..., Y E f Y , Y ,..., Y | Y k P[ Y k ] m 1 m 2 E f Y ,Y m n k 1 n m 1 m 2 m n n m i 1 i m i 1 i n m m n m m m E f Y1 , Y2 ,..., Yn | Yi m P[ Yi m] i 1 i 1 E f X , X ,..., X m 1 m 2 E f X , X ,..., X m 1 m 2 m n P[ Y m n n i 1 i m m] m me m 1 E f X 1m , X 2m ,..., X nm m! e m Birthday Paradox The birthday problem is: What is the probability of two or more people out of a group of m peoples do have the same birthday? Birthday Paradox What is the prob that no two students have the 365 same Birthday is m! P Note that if m>365 this is 0 m 365m We can also by considering one person at a time: If we take k to be small we get that We can use and get 1 j e m 1 k 1 e n k n j 1 m 1 n j n m 1 j 1 n j 1 j 1 m 1 j exp j 1 n e e m ( m 1) 2n m2 2n Birthday Paradox Hence the value for m at which the prob that all people have different birth is ½ is approximately: m2=ln 2 In case of n=365, m=22.5 j m 1 j m 1 n 1 e n j 1 j 1 m 1 j exp j 1 n e e m ( m 1) 2n m2 2n Balls into bins Suppose we have n bins and we randomly throw m balls into them We consider the case n=m. Balls into bins Suppose we have n bins and we randomly throw m balls into them We consider the case n=m. What is the maximum number of balls in any bin. Theorem: The prob that the max load bin has more them 3 ln n/ln(ln n) is less then 1/n for big n. Balls into bins Theorem: The prob that the max load bin has more them 3 ln n/ln(ln n) is less then 1/n for big n. The prob that bin 1 have at list M ball is Mn 1n Now we use the inequality The second inequality follows from Mn 1n M1 ! Me M M k i k k ek k! i i! M Balls into bins Theorem: The prob that the max load bin has more them 3 ln n/ln(ln n) is less then 1/n for big n. n 1 M n The prob that bin 1 have at list M ball is n 1 1 e Now we use the inequality M n M ! M Applying union bound for M> 3 ln n/ln(ln n) M M M e e ln ln n n n M 3 ln n ln ln n n ln n 1 n 3 ln n / ln ln n 3 ln n / ln ln n e ln n e ln ln ln n ln ln n 3 ln n / ln ln n M Coupon Collectors problem For n types of coupons, at each trial a coupon is picked at uniform random and independent probability . Find the earliest time at which all n objects have been picked at least once. We need nlog(n) time. Coupon Collectors problem Random coupon sequence a1, a2, …, an Ei = time to visit i+1st new couponn. a1 a2 … a3 … … ai … ai+1 … … an Assume we have i coupons and we are missing, n-i. (n-i)/n is probability the next node chosen is unvisited n/(n-i) is the expected timed until an unvisted node is chosen Cover time is E1 E2 En 1 n n n 1 n 1 n log n n 1 n 2 1 n 1 Coupon Collectors problem Theorem: Let be the random time we have all the coupons. Than for all c>0, P[ >nlog(n) + c n]< Exp[-c] Proof: Let Ai be the event that we did not have the i coupon at time T=nlog(n) + c n P[Ai]<(1-1/n)^T Using union bound the theorem follows. P[Ai]<nExp[-log [n]+c] Conclusion Birthday Paradox: n log( n) log(log( n)) Balls into bins: Coupon Collectors: n log( n)