Lecture 4: Two-point Sampling, Coupon Collector s problem

Size: px
Start display at page:

Download "Lecture 4: Two-point Sampling, Coupon Collector s problem"

Transcription

1 Randomized Algorithms Lecture 4: Two-point Sampling, Coupon Collector s problem Sotiris Nikoletseas Associate Professor CEID - ETY Course Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 1 / 36

2 Overview A. Pairwise independence of random variables B. The pairwise independent sampling theorem C. Probability amplification via reduced randomness D. The Coupon Collector s problem Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 2 / 36

3 A. On the Additivity of Variance In general the variance of a sum of random variables is not equal to the sum of their variances However, variances do add for independent variables (i.e. mutually independent variables) In fact, mutual independence is not necessary and pairwise independence suffices This is very useful, since in many situations the random variables involved are pairwise independent but not mutually independent. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 3 / 36

4 Conditional distributions Let X, Y be discrete random variables. Their joint probability density function is f(x, y) = Pr{(X = x) (Y = y)} Clearly f 1 (x) = Pr{X = x} = y f(x, y) and f 2 (y) = Pr{Y = y} = x f(x, y) Also, the conditional probability density function is: Pr{(X = x) (Y = y)} f(x y) = Pr{X = x Y = y} = Pr{Y = y} f(x, y) f(x, y) = = f 2 (y) f(x, y) x = Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 4 / 36

5 Pairwise independence Let random variables X 1, X 2,..., X n. These are called pairwise independent iff for all i j it is Pr{(X i = x) (X j = y)} = Pr{X i = x}, x, y Equivalently, Pr{(X i = x) (X j = y)} = = Pr{X i = x} Pr{X j = y}, x, y Generalizing, the collection is k-wise independent iff, for every subset I {1, 2,..., n} with I < k for every set of values { {a i }, b and j / I, it is Pr X j = b i I X i = a i } = Pr{X j = b} Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 5 / 36

6 Mutual (or full ) independence The random variables X 1, X 2,..., X n are mutually independent iff for any subset X i1, X i2,..., X ik, (2 k n) of them, it is Pr{(X i1 = x 1 ) (X i2 = x 2 ) (X ik = x k )} = = Pr{X i1 = x 1 } Pr{X i2 = x 2 } Pr{X ik = x k } Example (for n = 3). Let A 1, A 2, A 3 3 events. They are mutually independent iff all four equalities hold: Pr{A 1 A 2 } = Pr{A 1 } Pr{A 2 } (1) Pr{A 2 A 3 } = Pr{A 2 } Pr{A 3 } (2) Pr{A 1 A 3 } = Pr{A 1 } Pr{A 3 } (3) Pr{A 1 A 2 A 3 } = Pr{A 1 } Pr{A 2 } Pr{A 3 } (4) They are called pairwise independent if (1), (2), (3) hold. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 6 / 36

7 Mutual vs pairwise independence Important notice: Pairwise independence does not imply mutual independence in general. Example. Let a probability space including all permutations of a, b, c as well as aaa, bbb, ccc (all 9 points considered equiprobable). Let A k = at place k there is an a (for k = 1, 2, 3). It is Pr{A 1 } = Pr{A 2 } = Pr{A 3 } = = 1 3 Also Pr{A 1 A 2 } = Pr{A 2 A 3 } = Pr{A 1 A 3 } = 1 9 = thus A 1, A 2, A 3 are pairwise independent. But Pr{A 1 A 2 A 3 } = 1 9 Pr{A 1} Pr{A 2 } Pr{A 3 } = 1 27 thus the events are not mutually independent Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 7 / 36

8 Variance: key features Definition: V ar(x) = E[(X µ) 2 ] = x (x µ) 2 Pr{X = x} where µ = E[X] = x x Pr{X = x} We call standard deviation of X the σ = V ar(x) Basic Properties: (i) V ar(x) = E[X 2 ] E 2 [X] (ii) V ar(cx) = c 2 V ar(x), where c constant. (iii) V ar(x + c) = V ar(x), where c constant. proof of (i): V ar(x) = E[(X µ) 2 ] = E[X 2 2µX + µ 2 ] = E[X 2 ] + E[ 2µX] + E[µ 2 ] = E[X 2 ] 2µE[X] + µ 2 = E[X 2 ] µ 2 Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 8 / 36

9 The additivity of variance Theorem: if X 1, X 2,..., X n ( are pairwise independent random n ) n variables, then: V ar X i = V ar(x i ) i=1 Proof: V ar(x X n ) = E[(X X n ) 2 ] E 2 [X X n ] = n n n n = E Xi 2 + X i X j µ 2 i + µ i µ j = = i=1 1 i j n n (E[Xi 2 ] µ 2 i ) + i=1 n 1 i j n i=1 i=1 1 i j n (E[X i X j ] µ i µ j ) = (since X i pairwise independent, so 1 i j n E(X i X j ) = E(X i )E(X j = µ i µ j ) n V ar(x i ) Note: As we see in the proof, the pairwise independence suffices, and mutual (full) independence is not needed. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 9 / 36 i=1

10 B. The pairwise independent sampling theorem Another Example. Birthday matching: Let us try to estimate the number of pairs of people in a room having birthday on the same day. Note 1: Matching birthdays for different pairs of students are pairwise independent, since knowing that (George, Takis) have a match tell us nothing about whether (George, Petros) match. Note 2: However, the events are not mutually independent. Indeed they are not even 3-wise independent since if (George,Takis) match and (Takis, Petros) match then (George, Petros) match! Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 10 / 36

11 Birthday matching Let us calculate the probability of having a certain number of birthday matches. Let B 1, B 2,..., B n the birthdays of n independently chosen people and let E i,j be the indicator variable for the event of a (i, j) match (i.e. B i = B j ). As said, the events E i,j are pairwise independent but not mutually independent. Clearly, Pr{E i,j } = Pr{B i = B j } = i j). Let D the number of matching pairs. Then D = 1 i<j n E i,j By linearity of expectation we have E[D] = E = E[E i,j ] = 1 i<j n E i,j 1 i<j n = (for ( ) n Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 11 / 36

12 Birthday matching Since the variances of pairwise independent variables E i,j add up, it is: V ar[d] = V ar = V ar[e i,j ] = = ( ) n ( ) 1 i<j n E i,j 1 i<j n As an example, for a class of n = 100 students, it is E[D] 14 and V ar[d] < 14( ) < 14. So by Chebyshev s inequality we have Pr{ D 14 x} 14 x 2 Letting x = 6, we conclude that with more than 50% chance the number of matching birthdays will be between 8 and 20. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 12 / 36

13 The Pairwise Independent Sampling Theorem (I) We can actually generalize and not restrict to sums of zero-one (indicator) valued variables neither to variables with the same distribution. We below state the theorem for possibly different distributions with same mean and variance (but this is done for simplicity, and the result holds for distributions with different means and/or variances as well). Theorem. Let X 1,..., X n pairwise independent variables with the same mean µ and variance σ 2. Let S n = n i=1 X i Then Pr { S n n µ } ( x 1 σ ) 2 n x Proof. Note that E[ S n n ] = nµ n = µ, V ar[ S n n ] = ( ) 1 2 n nσ 2 = σ2 n and apply Chebyshev s inequality. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 13 / 36

14 The Pairwise Independent Sampling Theorem (II) Note: This Theorem actually provides a precise general evaluation of how the average of pairwise independent random samples approaches their mean. If the number n of samples becomes large enough we can arbitrarily close approach the mean with confidence arbitrarily close to 100% (n > σ2 ) i.e. a x 2 large number of samples is needed for distributions of large variance and when we want to assure high concentration around the mean). Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 14 / 36

15 C. Reduced randomness at probability amplification Motivation: Randomized Algorithms, for a given input x, actually choose n random numbers ( witnesses ) and run a deterministic algorithm on the input, using each of these random numbers. intuitively, if the deterministic algorithm has a probability of error ϵ (e.g. 1 2 ), t independent runs reduce the error probability to ϵ t 1 (e.g. 2 ) and amplify the correctness t probability from 1 2 to t however, true randomness is quite expensive! What happens if we are constrained to use no more than a constant c random numbers? The simplest case is when c = 2 e.g. we choose just 2 random numbers (thus the name two-point sampling) Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 15 / 36

16 C. Reduced randomness at probability amplification Problem definition: If our randomized algorithm reduced the error probability to ϵ t with t random numbers, what can we expect about the error probability with t = 2 random numbers only? an obvious bound is ϵ 2 (e.g. when ϵ = 1 2 reducing the error probability from 1 2 to 1 4 ) can we do any better? it turns out that we can indeed do much better and reduce the error probability to 1 t (which is much smaller than the constant ϵ 2 ) Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 16 / 36

17 C. Reduced randomness at probability amplification High level idea: generate t ( pseudo-random ) numbers based on the chosen 2 truly random numbers and use them in lieu of t truly independent random numbers. these generated numbers are dependent on the 2 chosen numbers. Hence they are not independent, but are pairwise independent. This loss of full independence reduces the accuracy of the algorithmic process but is still quite usable in reducing the error probability. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 17 / 36

18 C. Reduced randomness at probability amplification The process (high level description): 1 Choose a large prime number p (e.g. Mersenne prime, ). 2 Define Z p as the ring of integers modulo p (e.g 0, 1, 2,..., ) 3 Choose 2 truly random numbers, a and b from Z p (e.g. a = and b = ). 4 Generate t pseudo-random numbers y i = (ai + b) mod p e.g. y 0 = y 1 = ( ) y 2 = ( ) and so on. 5 Use each of the y i s as t witnesses (in lieu of t purely independent random witnesses) Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 18 / 36

19 C. Reduced randomness at probability amplification Performance (high level discussion) As we will see: for any given error bound ϵ, the error probability is reduced from ϵ 2 to 1 t. however, instead of requiring O(log 1 ϵ ) runs on the deterministic algorithm (in the case of t independent random witnesses) we will require O( 1 ϵ ) runs in the case of 2 independent random witnesses. thus, we gain in the probability amplification but loose on some efficiency. we need significantly less true randomness. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 19 / 36

20 The class RP (I) Definition. The class RP (Random Polynomial time) consists of all languages L admitting a randomized algorithm A running in worst case polynomial time such that for any input x: Notes: x L Pr{A(x) accepts} 1 2 x / L Pr{A(x) accepts} = 0 language recognition computational decision problems the 1 2 value is arbitrary. The success probability needs just to be lower-bounded by an inverse polynomial function of the input size (a polynomial number of algorithm repetitions would boost it to constant, in polynomial time). RP actually includes Monte Carlo algorithms than can err only when x L (one-sided error) Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 20 / 36

21 The RP algorithm An RP algorithm, for given input x, actually picks a random number r from Z p and computes A(x, r) with the following properties: - x L A(x, r) = 1, for half of the possible values of r - x / L A(x, r) = 0, for all possible choices of r As said, - if we run algorithm A t times on the same input x, the error probability is 1 2 but this requires t truly random t numbers. - if we restrict ourselves to t = 2 true random numbers a, b from Z p and run A(x, a) and A(x, b), the error probability can be as high as but we can do better with t pseudo-random numbers: Let r i = a i + b (mod p), where a, b are truly random, as above, for i = 1, 2,..., t. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 21 / 36

22 Modulo rings pairwise independence (I) Let p a prime number and Z p = {0, 1, 2,..., p 1} denote the ring of the integers modulo p. Lemma 1. Given y, i Z p and choosing a, b randomly uniformly from Z p, the probability of y a i + b (mod p) is 1 p Proof. Imagine that we first choose a. Then when choosing b, it must be y a i b (mod p). Since we choose b uniformly and modulo p can take p values, the probability is clearly 1 p indeed. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 22 / 36

23 Modulo rings pairwise independence (II) Lemma 2. Given y, z, x, w Z p such that x w, and choosing a, b randomly uniformly from Z p, the probability of y a x + b (mod p) and z a w + b (mod p) is 1 p 2 Proof. It is y z a (x w) (mod p). Since x w 0, the equation holds for a unique value of a. This in turn implies a specific value for b. The probability that a, b get those two specific values is clearly 1 p 1 p = 1. p 2 Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 23 / 36

24 Modulo rings pairwise independence (III) Lemma 3. Let i, j two distinct elements of Z p,and choose a, b randomly uniformly from Z p. Then the two variables Y i = a i + b (mod p) and Y j = a j + b (mod p) are uniformly distributed on Z p and are pairwise independent. Proof. From lemma 1, it is clearly Pr{Y i = α} = 1 p, for any α Z p, so Y i, Y j indeed have uniform distribution. As for pairwise independence, note that: Pr{Y i = α Y j = β} = Pr{Y i=α Y j =β} Pr{Y j =β} = Thus, Y i, Y j are pairwise independent. 1 p 2 1 p = Pr{Y i = α} Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 24 / 36

25 Modulo rings pairwise independence (IV) Note: This is only pairwise independence. Indeed, consider the variables Y 1, Y 2 Y 3, Y 4 as defined above. Every pair of them are pairwise independent. But, if you give the value of Y 1, Y 2 then we know the values of Y 3, Y 4 immediately, since the values of Y 1 and Y 2 uniquely determine a and b, and thus we can compute all Y i variables. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 25 / 36

26 Modulo rings pairwise independence (V) Thus Y = t i=1 A(x, r i) is a sum of random variables which are pairwise independent, since the r i values are pairwise independent. Assume that x L, then E[Y ] = t 2 and V ar[y ] = t i=1 V ar[a(x, r i)] = t = t 4 The probability that all those t executions failed corresponds to the event Y = 0, and Pr{Y = 0} Pr{ Y E[Y ] E[Y ]} = Pr{ Y t 2 t 2 } V ar[y ] = t ( 2) t 2 4 = 1 ( 2) t 2 t from Chebyshev s inequality. Thus the use of pseudo-randomness (t pseudo-random numbers) allows to exploit our 2 random bits to reduce the error probability from 1 4 to 1 t. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 26 / 36

27 D. The Coupon Collector s problem There are n distinct coupons and at each trial a coupon is chosen uniformly at random, independently of previous trials. Let m the number of trials. Goal: establish relationships between the number m of trials and the probability of having chosen each one of the n coupons at least once. Note: the problem is similar to occupancy (number of balls so that no bin is empty). Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 27 / 36

28 The expected number of trials needed (I) Let X the number of trials (a random variable) needed to collect all coupons at least once each. Let C 1, C 2,..., C X the sequence of trials, where C i {1,..., n} denotes the coupon type chosen at trial i. We call the ith trial a success if coupon type chosen at C i was not drawn in any of the first i 1 trials (obviously C 1 and C X are always successes). We divide the sequence of trials into epochs, where epoch i begins with the trial following the ith success and ends with the trial at which the (i + 1)st success takes place. Let r.v. X i (0 i n 1) be the number of trials in the ith epoch. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 28 / 36

29 The expected number of trials needed (II) n 1 Clearly, X = i=0 X i Let p i the probability of success at any trial of the ith epoch. This is the probability of choosing one of the n i remaining coupon types, so: p i = n i n Clearly, X i follows a geometric distribution with parameter p i, so E[X i ] = 1 p i and V ar(x i ) = 1 p i p 2 i By linearity of expectation: E[X] = E [ n 1 ] n 1 X i = E[X i ] = i=0 i=0 n 1 i=0 n n n i = n = nh n But H n ln n + Θ(1) E[X] n ln n + Θ(n) i=1 1 i = Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 29 / 36

30 The variance of the number of needed trials Since the X i s are independent, we have: n 1 n 1 V ar(x) = V ar(x i ) = = n 2 n i=1 Since lim n i=0 1 n i 2 n 1 i i=1 n i=1 1 i 2 = π2 6 i=0 ni n (n i) 2 = i=1 n(n i) i 2 = we get V ar(x) π2 6 n2 Concentration around the expectation The Chebyshev inequality does not provide a strong result: For β > 1, Pr{X > βn ln n} = Pr{X n ln n > (β 1)n ln n} Pr{ X n ln n > (β 1)n ln n} V ar(x) (β 1) 2 n 2 ln 2 n n2 n 2 ln 2 n = 1 ln 2 n Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 30 / 36

31 Stronger concentration around the expectation Let Ei r the event: coupon type i is not collected during the first r trials. Then Pr{Ei r} = (1 1 n )r e r n For r = βn ln n we get By the union bound we { have n Pr{X > r} = Pr i=1 Pr{E r i E r i } βn ln n } e n = n β (i.e. at least one coupon is not selected), so n Pr{X > r} Pr{Ei r } n n β = n (β 1) = n ϵ, i=1 where ϵ = β 1 > 0 Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 31 / 36

32 Sharper concentration around the mean - a heuristic argument Binomial distribution (#successes in n independent trials each one with success probability p) X B(n, p) Pr{X = k} = ( ) n k p k (1 p) n k (k = 0, 1, 2,..., n) E(X) = np, V ar(x) = np(1 p) Poisson distribution) X P (λ) Pr{X = x} = e E(X) = V ar(x) = λ λ λx x! (x = 0, 1,... ) Approximation: It is B(n, p) P (λ), where λ = np. For large n, the approximation of the binomial by the Poisson is good. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 32 / 36

33 Towards the sharp concentration result Let N r i = number of times coupon i chosen during the first r trials. Then E r i is equivalent to the event {N r i = 0}. Clearly Ni r B ( r, n) 1, thus Pr{Ni r = x} = ( ( r 1 ) x ( ) x) n 1 1 r x n Let λ a positive real number. A r.v. Y is P (λ) Pr{Y = y} = e λ λy y! As said, for suitability small λ and as r approaches, P ( ) ( r n is a good approximation of B r, 1 n). Thus Pr{Ei r} = Pr{N i r = 0} e λ λ0 0! = e λ = e r n (fact 1) Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 33 / 36

34 An informal argument on independence We will now claim that the Ei r (1 i n) events are almost independent, (although it is obvious that there is some dependence between them; but we are anyway heading towards a heuristic). Claim 1. For 1 i n, and any set if indices {j 1,..., j k } not containing { i, Pr Ei r } k l=1 Er j l Pr{Ei r} { } ( Proof: Pr Ei r k Pr {E Ej r i r k )} ( ) l=1 Er jl 1 k+1 r l = { n k = ( ) Pr l=1 Er 1 k r jl} n l=1 r(k+1) e n e rk n = e r n Pr{E r i } Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 34 / 36

35 An approximation of the probability Because { of fact 1 and Claim 1, we have: n } { n } Pr = Pr (1 e m n ) n e ne m n i=1 E m i i=1 E m i For m = n(ln n + c) = n ln n + cn, for any constant c R, we then get { n } { n } Pr{X > m = n ln n + cn} = Pr Pr = 1 e e c i=1 E m i i=1 The above probability: - is close to 0, for large positive c - is close to 1, for large negative c Thus the probability of having collected all coupons, rapidly changes from nearly 0 to almost 1 in a small interval cantered around n ln n (!) Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 35 / 36 E m i

36 The rigorous result Theorem: Let X the r.v. counting the number of trials for having collected each one of the n coupons at least once. Then, for any constant c R and m = n(ln n + c) it is lim n Pr{X > m} = 1 e e c Note 1. The proof uses the Boole-Bonferroni inequalities for inclusion-exclusion in the probability of a union of events. Note 2. The power of the Poisson heuristic is that it gives a quick, approximative estimation of probabilities and offers some intuitive insight towards the accurate behaviour of the involved quantities. Sotiris Nikoletseas, Associate Professor Randomized Algorithms - Lecture 4 36 / 36

Lecture 5: Two-point Sampling

Lecture 5: Two-point Sampling Randomized Algorithms Lecture 5: Two-point Sampling Sotiris Nikoletseas Professor CEID - ETY Course 2017-2018 Sotiris Nikoletseas, Professor Randomized Algorithms - Lecture 5 1 / 26 Overview A. Pairwise

More information

Lecture 6: Coupon Collector s problem

Lecture 6: Coupon Collector s problem Radomized Algorithms Lecture 6: Coupo Collector s problem Sotiris Nikoletseas Professor CEID - ETY Course 2017-2018 Sotiris Nikoletseas, Professor Radomized Algorithms - Lecture 6 1 / 16 Variace: key features

More information

Lecture 5: The Principle of Deferred Decisions. Chernoff Bounds

Lecture 5: The Principle of Deferred Decisions. Chernoff Bounds Randomized Algorithms Lecture 5: The Principle of Deferred Decisions. Chernoff Bounds Sotiris Nikoletseas Associate Professor CEID - ETY Course 2013-2014 Sotiris Nikoletseas, Associate Professor Randomized

More information

Random Variable. Pr(X = a) = Pr(s)

Random Variable. Pr(X = a) = Pr(s) Random Variable Definition A random variable X on a sample space Ω is a real-valued function on Ω; that is, X : Ω R. A discrete random variable is a random variable that takes on only a finite or countably

More information

X = X X n, + X 2

X = X X n, + X 2 CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 22 Variance Question: At each time step, I flip a fair coin. If it comes up Heads, I walk one step to the right; if it comes up Tails, I walk

More information

6.842 Randomness and Computation Lecture 5

6.842 Randomness and Computation Lecture 5 6.842 Randomness and Computation 2012-02-22 Lecture 5 Lecturer: Ronitt Rubinfeld Scribe: Michael Forbes 1 Overview Today we will define the notion of a pairwise independent hash function, and discuss its

More information

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 20

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 20 CS 70 Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 20 Today we shall discuss a measure of how close a random variable tends to be to its expectation. But first we need to see how to compute

More information

Lecture 4: Sampling, Tail Inequalities

Lecture 4: Sampling, Tail Inequalities Lecture 4: Sampling, Tail Inequalities Variance and Covariance Moment and Deviation Concentration and Tail Inequalities Sampling and Estimation c Hung Q. Ngo (SUNY at Buffalo) CSE 694 A Fun Course 1 /

More information

Hash tables. Hash tables

Hash tables. Hash tables Basic Probability Theory Two events A, B are independent if Conditional probability: Pr[A B] = Pr[A] Pr[B] Pr[A B] = Pr[A B] Pr[B] The expectation of a (discrete) random variable X is E[X ] = k k Pr[X

More information

6.1 Occupancy Problem

6.1 Occupancy Problem 15-859(M): Randomized Algorithms Lecturer: Anupam Gupta Topic: Occupancy Problems and Hashing Date: Sep 9 Scribe: Runting Shi 6.1 Occupancy Problem Bins and Balls Throw n balls into n bins at random. 1.

More information

SUMMARY OF PROBABILITY CONCEPTS SO FAR (SUPPLEMENT FOR MA416)

SUMMARY OF PROBABILITY CONCEPTS SO FAR (SUPPLEMENT FOR MA416) SUMMARY OF PROBABILITY CONCEPTS SO FAR (SUPPLEMENT FOR MA416) D. ARAPURA This is a summary of the essential material covered so far. The final will be cumulative. I ve also included some review problems

More information

In a five-minute period, you get a certain number m of requests. Each needs to be served from one of your n servers.

In a five-minute period, you get a certain number m of requests. Each needs to be served from one of your n servers. Suppose you are a content delivery network. In a five-minute period, you get a certain number m of requests. Each needs to be served from one of your n servers. How to distribute requests to balance the

More information

The first bound is the strongest, the other two bounds are often easier to state and compute. Proof: Applying Markov's inequality, for any >0 we have

The first bound is the strongest, the other two bounds are often easier to state and compute. Proof: Applying Markov's inequality, for any >0 we have The first bound is the strongest, the other two bounds are often easier to state and compute Proof: Applying Markov's inequality, for any >0 we have Pr (1 + ) = Pr For any >0, we can set = ln 1+ (4.4.1):

More information

Midterm 2 Review. CS70 Summer Lecture 6D. David Dinh 28 July UC Berkeley

Midterm 2 Review. CS70 Summer Lecture 6D. David Dinh 28 July UC Berkeley Midterm 2 Review CS70 Summer 2016 - Lecture 6D David Dinh 28 July 2016 UC Berkeley Midterm 2: Format 8 questions, 190 points, 110 minutes (same as MT1). Two pages (one double-sided sheet) of handwritten

More information

Disjointness and Additivity

Disjointness and Additivity Midterm 2: Format Midterm 2 Review CS70 Summer 2016 - Lecture 6D David Dinh 28 July 2016 UC Berkeley 8 questions, 190 points, 110 minutes (same as MT1). Two pages (one double-sided sheet) of handwritten

More information

Tail Inequalities. The Chernoff bound works for random variables that are a sum of indicator variables with the same distribution (Bernoulli trials).

Tail Inequalities. The Chernoff bound works for random variables that are a sum of indicator variables with the same distribution (Bernoulli trials). Tail Inequalities William Hunt Lane Department of Computer Science and Electrical Engineering, West Virginia University, Morgantown, WV William.Hunt@mail.wvu.edu Introduction In this chapter, we are interested

More information

Essentials on the Analysis of Randomized Algorithms

Essentials on the Analysis of Randomized Algorithms Essentials on the Analysis of Randomized Algorithms Dimitris Diochnos Feb 0, 2009 Abstract These notes were written with Monte Carlo algorithms primarily in mind. Topics covered are basic (discrete) random

More information

Randomized Algorithms

Randomized Algorithms Randomized Algorithms Prof. Tapio Elomaa tapio.elomaa@tut.fi Course Basics A new 4 credit unit course Part of Theoretical Computer Science courses at the Department of Mathematics There will be 4 hours

More information

MARKING A BINARY TREE PROBABILISTIC ANALYSIS OF A RANDOMIZED ALGORITHM

MARKING A BINARY TREE PROBABILISTIC ANALYSIS OF A RANDOMIZED ALGORITHM MARKING A BINARY TREE PROBABILISTIC ANALYSIS OF A RANDOMIZED ALGORITHM XIANG LI Abstract. This paper centers on the analysis of a specific randomized algorithm, a basic random process that involves marking

More information

Expectation, inequalities and laws of large numbers

Expectation, inequalities and laws of large numbers Chapter 3 Expectation, inequalities and laws of large numbers 3. Expectation and Variance Indicator random variable Let us suppose that the event A partitions the sample space S, i.e. A A S. The indicator

More information

As mentioned, we will relax the conditions of our dictionary data structure. The relaxations we

As mentioned, we will relax the conditions of our dictionary data structure. The relaxations we CSE 203A: Advanced Algorithms Prof. Daniel Kane Lecture : Dictionary Data Structures and Load Balancing Lecture Date: 10/27 P Chitimireddi Recap This lecture continues the discussion of dictionary data

More information

Lecture 2: A Las Vegas Algorithm for finding the closest pair of points in the plane

Lecture 2: A Las Vegas Algorithm for finding the closest pair of points in the plane Randomized Algorithms Lecture 2: A Las Vegas Algorithm for finding the closest pair of points in the plane Sotiris Nikoletseas Professor CEID - ETY Course 2017-2018 Sotiris Nikoletseas, Professor Randomized

More information

Randomness and Computation March 13, Lecture 3

Randomness and Computation March 13, Lecture 3 0368.4163 Randomness and Computation March 13, 2009 Lecture 3 Lecturer: Ronitt Rubinfeld Scribe: Roza Pogalnikova and Yaron Orenstein Announcements Homework 1 is released, due 25/03. Lecture Plan 1. Do

More information

Lecture 4: Probability and Discrete Random Variables

Lecture 4: Probability and Discrete Random Variables Error Correcting Codes: Combinatorics, Algorithms and Applications (Fall 2007) Lecture 4: Probability and Discrete Random Variables Wednesday, January 21, 2009 Lecturer: Atri Rudra Scribe: Anonymous 1

More information

1 Randomized Computation

1 Randomized Computation CS 6743 Lecture 17 1 Fall 2007 1 Randomized Computation Why is randomness useful? Imagine you have a stack of bank notes, with very few counterfeit ones. You want to choose a genuine bank note to pay at

More information

Lecture 23: Alternation vs. Counting

Lecture 23: Alternation vs. Counting CS 710: Complexity Theory 4/13/010 Lecture 3: Alternation vs. Counting Instructor: Dieter van Melkebeek Scribe: Jeff Kinne & Mushfeq Khan We introduced counting complexity classes in the previous lecture

More information

An Introduction to Randomized algorithms

An Introduction to Randomized algorithms An Introduction to Randomized algorithms C.R. Subramanian The Institute of Mathematical Sciences, Chennai. Expository talk presented at the Research Promotion Workshop on Introduction to Geometric and

More information

Topic 3 Random variables, expectation, and variance, II

Topic 3 Random variables, expectation, and variance, II CSE 103: Probability and statistics Fall 2010 Topic 3 Random variables, expectation, and variance, II 3.1 Linearity of expectation If you double each value of X, then you also double its average; that

More information

CSE 502 Class 11 Part 2

CSE 502 Class 11 Part 2 CSE 502 Class 11 Part 2 Jeremy Buhler Steve Cole February 17 2015 Today: analysis of hashing 1 Constraints of Double Hashing How does using OA w/double hashing constrain our hash function design? Need

More information

CS 246 Review of Proof Techniques and Probability 01/14/19

CS 246 Review of Proof Techniques and Probability 01/14/19 Note: This document has been adapted from a similar review session for CS224W (Autumn 2018). It was originally compiled by Jessica Su, with minor edits by Jayadev Bhaskaran. 1 Proof techniques Here we

More information

Lecture 4: Hashing and Streaming Algorithms

Lecture 4: Hashing and Streaming Algorithms CSE 521: Design and Analysis of Algorithms I Winter 2017 Lecture 4: Hashing and Streaming Algorithms Lecturer: Shayan Oveis Gharan 01/18/2017 Scribe: Yuqing Ai Disclaimer: These notes have not been subjected

More information

Randomized algorithm

Randomized algorithm Tutorial 4 Joyce 2009-11-24 Outline Solution to Midterm Question 1 Question 2 Question 1 Question 2 Question 3 Question 4 Question 5 Solution to Midterm Solution to Midterm Solution to Midterm Question

More information

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch 6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch Today Probabilistic Turing Machines and Probabilistic Time Complexity Classes Now add a new capability to standard TMs: random

More information

Expectation of geometric distribution

Expectation of geometric distribution Expectation of geometric distribution What is the probability that X is finite? Can now compute E(X): Σ k=1f X (k) = Σ k=1(1 p) k 1 p = pσ j=0(1 p) j = p 1 1 (1 p) = 1 E(X) = Σ k=1k (1 p) k 1 p = p [ Σ

More information

Notes on Discrete Probability

Notes on Discrete Probability Columbia University Handout 3 W4231: Analysis of Algorithms September 21, 1999 Professor Luca Trevisan Notes on Discrete Probability The following notes cover, mostly without proofs, the basic notions

More information

Introduction to discrete probability. The rules Sample space (finite except for one example)

Introduction to discrete probability. The rules Sample space (finite except for one example) Algorithms lecture notes 1 Introduction to discrete probability The rules Sample space (finite except for one example) say Ω. P (Ω) = 1, P ( ) = 0. If the items in the sample space are {x 1,..., x n }

More information

CSE 190, Great ideas in algorithms: Pairwise independent hash functions

CSE 190, Great ideas in algorithms: Pairwise independent hash functions CSE 190, Great ideas in algorithms: Pairwise independent hash functions 1 Hash functions The goal of hash functions is to map elements from a large domain to a small one. Typically, to obtain the required

More information

Homework 4 Solutions

Homework 4 Solutions CS 174: Combinatorics and Discrete Probability Fall 01 Homework 4 Solutions Problem 1. (Exercise 3.4 from MU 5 points) Recall the randomized algorithm discussed in class for finding the median of a set

More information

PROBABILITY AND STATISTICS IN COMPUTING. III. Discrete Random Variables Expectation and Deviations From: [5][7][6] German Hernandez

PROBABILITY AND STATISTICS IN COMPUTING. III. Discrete Random Variables Expectation and Deviations From: [5][7][6] German Hernandez Conditional PROBABILITY AND STATISTICS IN COMPUTING III. Discrete Random Variables and Deviations From: [5][7][6] Page of 46 German Hernandez Conditional. Random variables.. Measurable function Let (Ω,

More information

YORK UNIVERSITY. Faculty of Science Department of Mathematics and Statistics MATH A Test #2 June 11, Solutions

YORK UNIVERSITY. Faculty of Science Department of Mathematics and Statistics MATH A Test #2 June 11, Solutions YORK UNIVERSITY Faculty of Science Department of Mathematics and Statistics MATH 2. A Test #2 June, 2 Solutions. (5 + 5 + 5 pts) The probability of a student in MATH 4 passing a test is.82. Suppose students

More information

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 18

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 18 EECS 7 Discrete Mathematics and Probability Theory Spring 214 Anant Sahai Note 18 A Brief Introduction to Continuous Probability Up to now we have focused exclusively on discrete probability spaces Ω,

More information

Discrete Mathematics and Probability Theory Fall 2015 Note 20. A Brief Introduction to Continuous Probability

Discrete Mathematics and Probability Theory Fall 2015 Note 20. A Brief Introduction to Continuous Probability CS 7 Discrete Mathematics and Probability Theory Fall 215 Note 2 A Brief Introduction to Continuous Probability Up to now we have focused exclusively on discrete probability spaces Ω, where the number

More information

11.1 Set Cover ILP formulation of set cover Deterministic rounding

11.1 Set Cover ILP formulation of set cover Deterministic rounding CS787: Advanced Algorithms Lecture 11: Randomized Rounding, Concentration Bounds In this lecture we will see some more examples of approximation algorithms based on LP relaxations. This time we will use

More information

CS280, Spring 2004: Final

CS280, Spring 2004: Final CS280, Spring 2004: Final 1. [4 points] Which of the following relations on {0, 1, 2, 3} is an equivalence relation. (If it is, explain why. If it isn t, explain why not.) Just saying Yes or No with no

More information

STOR Lecture 16. Properties of Expectation - I

STOR Lecture 16. Properties of Expectation - I STOR 435.001 Lecture 16 Properties of Expectation - I Jan Hannig UNC Chapel Hill 1 / 22 Motivation Recall we found joint distributions to be pretty complicated objects. Need various tools from combinatorics

More information

Solutions to Problem Set 4

Solutions to Problem Set 4 UC Berkeley, CS 174: Combinatorics and Discrete Probability (Fall 010 Solutions to Problem Set 4 1. (MU 5.4 In a lecture hall containing 100 people, you consider whether or not there are three people in

More information

This lecture will review everything you learned in Basic tools in probability

This lecture will review everything you learned in Basic tools in probability Intro This lecture will review everything you learned in 6.042. Basic tools in probability Expectations High probability events Deviations from expectation Coupon collecting. n coupon types. Get a random

More information

Topic: Sampling, Medians of Means method and DNF counting Date: October 6, 2004 Scribe: Florin Oprea

Topic: Sampling, Medians of Means method and DNF counting Date: October 6, 2004 Scribe: Florin Oprea 15-859(M): Randomized Algorithms Lecturer: Shuchi Chawla Topic: Sampling, Medians of Means method and DNF counting Date: October 6, 200 Scribe: Florin Oprea 8.1 Introduction In this lecture we will consider

More information

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 16. A Brief Introduction to Continuous Probability

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 16. A Brief Introduction to Continuous Probability CS 7 Discrete Mathematics and Probability Theory Fall 213 Vazirani Note 16 A Brief Introduction to Continuous Probability Up to now we have focused exclusively on discrete probability spaces Ω, where the

More information

Week 12-13: Discrete Probability

Week 12-13: Discrete Probability Week 12-13: Discrete Probability November 21, 2018 1 Probability Space There are many problems about chances or possibilities, called probability in mathematics. When we roll two dice there are possible

More information

Discrete Mathematics and Probability Theory Fall 2011 Rao Midterm 2 Solutions

Discrete Mathematics and Probability Theory Fall 2011 Rao Midterm 2 Solutions CS 70 Discrete Mathematics and Probability Theory Fall 20 Rao Midterm 2 Solutions True/False. [24 pts] Circle one of the provided answers please! No negative points will be assigned for incorrect answers.

More information

Aditya Bhaskara CS 5968/6968, Lecture 1: Introduction and Review 12 January 2016

Aditya Bhaskara CS 5968/6968, Lecture 1: Introduction and Review 12 January 2016 Lecture 1: Introduction and Review We begin with a short introduction to the course, and logistics. We then survey some basics about approximation algorithms and probability. We also introduce some of

More information

14.1 Finding frequent elements in stream

14.1 Finding frequent elements in stream Chapter 14 Streaming Data Model 14.1 Finding frequent elements in stream A very useful statistics for many applications is to keep track of elements that occur more frequently. It can come in many flavours

More information

Lecture 2: Probability, conditional probability, and independence

Lecture 2: Probability, conditional probability, and independence Lecture 2: Probability, conditional probability, and independence Theorem 1.2.6. Let S = {s 1,s 2,...} and F be all subsets of S. Let p 1,p 2,... be nonnegative numbers that sum to 1. The following defines

More information

Notes 6 : First and second moment methods

Notes 6 : First and second moment methods Notes 6 : First and second moment methods Math 733-734: Theory of Probability Lecturer: Sebastien Roch References: [Roc, Sections 2.1-2.3]. Recall: THM 6.1 (Markov s inequality) Let X be a non-negative

More information

Lecture 4. P r[x > ce[x]] 1/c. = ap r[x = a] + a>ce[x] P r[x = a]

Lecture 4. P r[x > ce[x]] 1/c. = ap r[x = a] + a>ce[x] P r[x = a] U.C. Berkeley CS273: Parallel and Distributed Theory Lecture 4 Professor Satish Rao September 7, 2010 Lecturer: Satish Rao Last revised September 13, 2010 Lecture 4 1 Deviation bounds. Deviation bounds

More information

1 Large Deviations. Korea Lectures June 2017 Joel Spencer Tuesday Lecture III

1 Large Deviations. Korea Lectures June 2017 Joel Spencer Tuesday Lecture III Korea Lectures June 017 Joel Spencer Tuesday Lecture III 1 Large Deviations We analyze how random variables behave asymptotically Initially we consider the sum of random variables that take values of 1

More information

CS5314 Randomized Algorithms. Lecture 5: Discrete Random Variables and Expectation (Conditional Expectation, Geometric RV)

CS5314 Randomized Algorithms. Lecture 5: Discrete Random Variables and Expectation (Conditional Expectation, Geometric RV) CS5314 Randomized Algorithms Lecture 5: Discrete Random Variables and Expectation (Conditional Expectation, Geometric RV) Objectives Introduce Geometric RV We then introduce Conditional Expectation Application:

More information

Expectation of geometric distribution. Variance and Standard Deviation. Variance: Examples

Expectation of geometric distribution. Variance and Standard Deviation. Variance: Examples Expectation of geometric distribution Variance and Standard Deviation What is the probability that X is finite? Can now compute E(X): Σ k=f X (k) = Σ k=( p) k p = pσ j=0( p) j = p ( p) = E(X) = Σ k=k (

More information

1 Maintaining a Dictionary

1 Maintaining a Dictionary 15-451/651: Design & Analysis of Algorithms February 1, 2016 Lecture #7: Hashing last changed: January 29, 2016 Hashing is a great practical tool, with an interesting and subtle theory too. In addition

More information

Lecture 5. 1 Review (Pairwise Independence and Derandomization)

Lecture 5. 1 Review (Pairwise Independence and Derandomization) 6.842 Randomness and Computation September 20, 2017 Lecture 5 Lecturer: Ronitt Rubinfeld Scribe: Tom Kolokotrones 1 Review (Pairwise Independence and Derandomization) As we discussed last time, we can

More information

THE SOLOVAY STRASSEN TEST

THE SOLOVAY STRASSEN TEST THE SOLOVAY STRASSEN TEST KEITH CONRAD 1. Introduction The Jacobi symbol satisfies many formulas that the Legendre symbol does, such as these: for a, b Z and odd m, n Z +, (1) a b mod n ( a n ) = ( b n

More information

Part IA Probability. Definitions. Based on lectures by R. Weber Notes taken by Dexter Chua. Lent 2015

Part IA Probability. Definitions. Based on lectures by R. Weber Notes taken by Dexter Chua. Lent 2015 Part IA Probability Definitions Based on lectures by R. Weber Notes taken by Dexter Chua Lent 2015 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after lectures.

More information

Overview. CSE 21 Day 5. Image/Coimage. Monotonic Lists. Functions Probabilistic analysis

Overview. CSE 21 Day 5. Image/Coimage. Monotonic Lists. Functions Probabilistic analysis Day 5 Functions/Probability Overview Functions Probabilistic analysis Neil Rhodes UC San Diego Image/Coimage The image of f is the set of values f actually takes on (a subset of the codomain) The inverse

More information

Lecture 2 Sep 5, 2017

Lecture 2 Sep 5, 2017 CS 388R: Randomized Algorithms Fall 2017 Lecture 2 Sep 5, 2017 Prof. Eric Price Scribe: V. Orestis Papadigenopoulos and Patrick Rall NOTE: THESE NOTES HAVE NOT BEEN EDITED OR CHECKED FOR CORRECTNESS 1

More information

The Fitness Level Method with Tail Bounds

The Fitness Level Method with Tail Bounds The Fitness Level Method with Tail Bounds Carsten Witt DTU Compute Technical University of Denmark 2800 Kgs. Lyngby Denmark arxiv:307.4274v [cs.ne] 6 Jul 203 July 7, 203 Abstract The fitness-level method,

More information

Probability and distributions. Francesco Corona

Probability and distributions. Francesco Corona Probability Probability and distributions Francesco Corona Department of Computer Science Federal University of Ceará, Fortaleza Probability Many kinds of studies can be characterised as (repeated) experiments

More information

CS37300 Class Notes. Jennifer Neville, Sebastian Moreno, Bruno Ribeiro

CS37300 Class Notes. Jennifer Neville, Sebastian Moreno, Bruno Ribeiro CS37300 Class Notes Jennifer Neville, Sebastian Moreno, Bruno Ribeiro 2 Background on Probability and Statistics These are basic definitions, concepts, and equations that should have been covered in your

More information

Randomized Load Balancing:The Power of 2 Choices

Randomized Load Balancing:The Power of 2 Choices Randomized Load Balancing: The Power of 2 Choices June 3, 2010 Balls and Bins Problem We have m balls that are thrown into n bins, the location of each ball chosen independently and uniformly at random

More information

Introduction to Randomized Algorithms: Quick Sort and Quick Selection

Introduction to Randomized Algorithms: Quick Sort and Quick Selection Chapter 14 Introduction to Randomized Algorithms: Quick Sort and Quick Selection CS 473: Fundamental Algorithms, Spring 2011 March 10, 2011 14.1 Introduction to Randomized Algorithms 14.2 Introduction

More information

STA205 Probability: Week 8 R. Wolpert

STA205 Probability: Week 8 R. Wolpert INFINITE COIN-TOSS AND THE LAWS OF LARGE NUMBERS The traditional interpretation of the probability of an event E is its asymptotic frequency: the limit as n of the fraction of n repeated, similar, and

More information

With high probability

With high probability With high probability So far we have been mainly concerned with expected behaviour: expected running times, expected competitive ratio s. But it would often be much more interesting if we would be able

More information

MATH2206 Prob Stat/20.Jan Weekly Review 1-2

MATH2206 Prob Stat/20.Jan Weekly Review 1-2 MATH2206 Prob Stat/20.Jan.2017 Weekly Review 1-2 This week I explained the idea behind the formula of the well-known statistic standard deviation so that it is clear now why it is a measure of dispersion

More information

1 Stat 605. Homework I. Due Feb. 1, 2011

1 Stat 605. Homework I. Due Feb. 1, 2011 The first part is homework which you need to turn in. The second part is exercises that will not be graded, but you need to turn it in together with the take-home final exam. 1 Stat 605. Homework I. Due

More information

Handout 5. α a1 a n. }, where. xi if a i = 1 1 if a i = 0.

Handout 5. α a1 a n. }, where. xi if a i = 1 1 if a i = 0. Notes on Complexity Theory Last updated: October, 2005 Jonathan Katz Handout 5 1 An Improved Upper-Bound on Circuit Size Here we show the result promised in the previous lecture regarding an upper-bound

More information

Lecture 2: Randomized Algorithms

Lecture 2: Randomized Algorithms Lecture 2: Randomized Algorithms Independence & Conditional Probability Random Variables Expectation & Conditional Expectation Law of Total Probability Law of Total Expectation Derandomization Using Conditional

More information

Integer Linear Programs

Integer Linear Programs Lecture 2: Review, Linear Programming Relaxations Today we will talk about expressing combinatorial problems as mathematical programs, specifically Integer Linear Programs (ILPs). We then see what happens

More information

Topics in Probabilistic Combinatorics and Algorithms Winter, Basic Derandomization Techniques

Topics in Probabilistic Combinatorics and Algorithms Winter, Basic Derandomization Techniques Topics in Probabilistic Combinatorics and Algorithms Winter, 016 3. Basic Derandomization Techniques Definition. DTIME(t(n)) : {L : L can be decided deterministically in time O(t(n)).} EXP = { L: L can

More information

Lectures One Way Permutations, Goldreich Levin Theorem, Commitments

Lectures One Way Permutations, Goldreich Levin Theorem, Commitments Lectures 11 12 - One Way Permutations, Goldreich Levin Theorem, Commitments Boaz Barak March 10, 2010 From time immemorial, humanity has gotten frequent, often cruel, reminders that many things are easier

More information

Discrete Random Variables

Discrete Random Variables Discrete Random Variables We have a probability space (S, Pr). A random variable is a function X : S V (X ) for some set V (X ). In this discussion, we must have V (X ) is the real numbers X induces a

More information

Problem 1: (Chernoff Bounds via Negative Dependence - from MU Ex 5.15)

Problem 1: (Chernoff Bounds via Negative Dependence - from MU Ex 5.15) Problem 1: Chernoff Bounds via Negative Dependence - from MU Ex 5.15) While deriving lower bounds on the load of the maximum loaded bin when n balls are thrown in n bins, we saw the use of negative dependence.

More information

Average Case Complexity: Levin s Theory

Average Case Complexity: Levin s Theory Chapter 15 Average Case Complexity: Levin s Theory 1 needs more work Our study of complexity - NP-completeness, #P-completeness etc. thus far only concerned worst-case complexity. However, algorithms designers

More information

Model Counting for Logical Theories

Model Counting for Logical Theories Model Counting for Logical Theories Wednesday Dmitry Chistikov Rayna Dimitrova Department of Computer Science University of Oxford, UK Max Planck Institute for Software Systems (MPI-SWS) Kaiserslautern

More information

CSE525: Randomized Algorithms and Probabilistic Analysis April 2, Lecture 1

CSE525: Randomized Algorithms and Probabilistic Analysis April 2, Lecture 1 CSE525: Randomized Algorithms and Probabilistic Analysis April 2, 2013 Lecture 1 Lecturer: Anna Karlin Scribe: Sonya Alexandrova and Eric Lei 1 Introduction The main theme of this class is randomized algorithms.

More information

Lecture 04: Balls and Bins: Birthday Paradox. Birthday Paradox

Lecture 04: Balls and Bins: Birthday Paradox. Birthday Paradox Lecture 04: Balls and Bins: Overview In today s lecture we will start our study of balls-and-bins problems We shall consider a fundamental problem known as the Recall: Inequalities I Lemma Before we begin,

More information

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 1/29/2002. Notes for Lecture 3

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 1/29/2002. Notes for Lecture 3 U.C. Bereley CS278: Computational Complexity Handout N3 Professor Luca Trevisan 1/29/2002 Notes for Lecture 3 In this lecture we will define the probabilistic complexity classes BPP, RP, ZPP and we will

More information

Lecture 13 (Part 2): Deviation from mean: Markov s inequality, variance and its properties, Chebyshev s inequality

Lecture 13 (Part 2): Deviation from mean: Markov s inequality, variance and its properties, Chebyshev s inequality Lecture 13 (Part 2): Deviation from mean: Markov s inequality, variance and its properties, Chebyshev s inequality Discrete Structures II (Summer 2018) Rutgers University Instructor: Abhishek Bhrushundi

More information

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School Basic counting techniques Periklis A. Papakonstantinou Rutgers Business School i LECTURE NOTES IN Elementary counting methods Periklis A. Papakonstantinou MSIS, Rutgers Business School ALL RIGHTS RESERVED

More information

Lecture notes on OPP algorithms [Preliminary Draft]

Lecture notes on OPP algorithms [Preliminary Draft] Lecture notes on OPP algorithms [Preliminary Draft] Jesper Nederlof June 13, 2016 These lecture notes were quickly assembled and probably contain many errors. Use at your own risk! Moreover, especially

More information

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Note 15. Random Variables: Distributions, Independence, and Expectations

Discrete Mathematics and Probability Theory Fall 2014 Anant Sahai Note 15. Random Variables: Distributions, Independence, and Expectations EECS 70 Discrete Mathematics and Probability Theory Fall 204 Anant Sahai Note 5 Random Variables: Distributions, Independence, and Expectations In the last note, we saw how useful it is to have a way of

More information

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test Introduction to Algorithms (CS 482) Cornell University Instructor: Bobby Kleinberg Lecture Notes, 25 April 2008 The Miller-Rabin Randomized Primality Test 1 Introduction Primality testing is an important

More information

Non-Interactive Zero Knowledge (II)

Non-Interactive Zero Knowledge (II) Non-Interactive Zero Knowledge (II) CS 601.442/642 Modern Cryptography Fall 2017 S 601.442/642 Modern CryptographyNon-Interactive Zero Knowledge (II) Fall 2017 1 / 18 NIZKs for NP: Roadmap Last-time: Transformation

More information

Lecture Examples of problems which have randomized algorithms

Lecture Examples of problems which have randomized algorithms 6.841 Advanced Complexity Theory March 9, 2009 Lecture 10 Lecturer: Madhu Sudan Scribe: Asilata Bapat Meeting to talk about final projects on Wednesday, 11 March 2009, from 5pm to 7pm. Location: TBA. Includes

More information

Lecture Hardness of Set Cover

Lecture Hardness of Set Cover PCPs and Inapproxiability CIS 6930 October 5, 2009 Lecture Hardness of Set Cover Lecturer: Dr. My T. Thai Scribe: Ying Xuan 1 Preliminaries 1.1 Two-Prover-One-Round Proof System A new PCP model 2P1R Think

More information

Randomized algorithms. Inge Li Gørtz

Randomized algorithms. Inge Li Gørtz Randomized algorithms Inge Li Gørtz Randomized algorithms Today What are randomized algorithms? Properties of randomized algorithms Two examples: Median/Select. Quick-sort Randomized Algorithms Randomized

More information

Hash tables. Hash tables

Hash tables. Hash tables Dictionary Definition A dictionary is a data-structure that stores a set of elements where each element has a unique key, and supports the following operations: Search(S, k) Return the element whose key

More information

Discrete Math, Fourteenth Problem Set (July 18)

Discrete Math, Fourteenth Problem Set (July 18) Discrete Math, Fourteenth Problem Set (July 18) REU 2003 Instructor: László Babai Scribe: Ivona Bezakova 0.1 Repeated Squaring For the primality test we need to compute a X 1 (mod X). There are two problems

More information

1 Randomized complexity

1 Randomized complexity 80240233: Complexity of Computation Lecture 6 ITCS, Tsinghua Univesity, Fall 2007 23 October 2007 Instructor: Elad Verbin Notes by: Zhang Zhiqiang and Yu Wei 1 Randomized complexity So far our notion of

More information

CSE 312 Final Review: Section AA

CSE 312 Final Review: Section AA CSE 312 TAs December 8, 2011 General Information General Information Comprehensive Midterm General Information Comprehensive Midterm Heavily weighted toward material after the midterm Pre-Midterm Material

More information

Lecture 2: Review of Basic Probability Theory

Lecture 2: Review of Basic Probability Theory ECE 830 Fall 2010 Statistical Signal Processing instructor: R. Nowak, scribe: R. Nowak Lecture 2: Review of Basic Probability Theory Probabilistic models will be used throughout the course to represent

More information