Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I want another real-life example similar to the issue or question above than solving the example with the same steps as the issue above ((
I want another real-life example similar to the issue or question above than solving the example with the same steps as the issue above
(( the course is about algorthim ))
5.4.2 Balls and bins Consider a process in which we randomly toss identical balls into b bins, numbered 1,2,,b. The tosses are independent, and on each toss the ball is equally likely to end up in any bin. The probability that a tossed ball lands in any given bin is 1/b. Thus, the ball-tossing process is a sequence of Bernoulli trials (see Appendix C.4) with a probability 1/b of success, where success means that the ball falls in the given bin. This model is particularly useful for analyzing hashing (see Chapter 11), and we can answer a variety of interesting questions about the ball-tossing process. (Problem C-1 asks additional questions about balls and bins.) How many balls fall in a given bin? The number of balls that fall in a given bin follows the binomial distribution b(k:n,1/b). If we toss n balls, equation (C.37) tells us that the expected number of balls that fall in the given bin is n/b. How many balls must we toss, on the average, until a given bin contains a ball? The number of tosses until the given bin receives a ball follows the geometric distribution with probability 1/b and, by equation (C.32), the expected number of tosses until success is 1/(1/b)=b. How many balls must we toss until every bin contains at least one ball? Let us call a toss in which a ball falls into an empty bin a "hit." We want to know the expected number n of tosses required to get b hits. Using the hits, we can partition the n tosses into stages. The i th stage consists of the tosses after the (i1) st hit until the i th hit. The first stage consists of the first toss, since we are guaranteed to have a hit when all bins are empty. For each toss during the i th stage, i1 bins contain balls and bi+1 bins are empty. Thus, for each toss in the i th stage, the probability of obtaining a hit is (bi+1)/b. Let ni denote the number of tosses in the i th stage. Thus, the number of tosses required to get b hits is n=i=1bni. Each random variable ni has a geometric distribution with probability of success (bi+1)/b and thus, by equation (C.32), we have E[ni]=bi+1b By linearity of expectation, we have E[n]=E[i=1bni]=i=1bE[ni]=i=1bbi+1b=bi=1bi1=b(lnb+O(1))(byequation(A.7)) It therefore takes approximately blnb tosses before we can expect that every bin has a ball. This problem is also known as the coupon collector's problem, which says that a person trying to collect each of b different coupons expects to acquire approximately blnb randomly obtained coupons in order to succeedStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started