Rzucanie piłkami do pojemników, oszacuj niższe prawdopodobieństwo


14

To nie jest praca domowa, choć na to wygląda. Wszelkie odniesienia są mile widziane. :-)

Scenariusz: Istnieje n różnych piłek i n różnych pojemników (oznaczonych od 1 do n , od lewej do prawej). Każda piłka jest rzucana niezależnie i równomiernie do koszy. Niech f(i) będzie liczbą kulek w i -tym pojemniku. Niech Ei oznaczają następujące zdarzenie.

Dla każdego ji , kjf(k)j1

Oznacza to, że pierwsze pojemniki j (najbardziej lewe pojemniki j ) zawierają mniej niż kulki j , dla każdego ji .

Pytanie: Oszacowanie i<nPr(Ei) w kategoriach n ? Kiedy n idzie w nieskończoność. Preferowane jest ograniczenie dolne. Nie sądzę, by istniała łatwo obliczalna formuła.

Przykład: limnPr(E1)=limn(n1n)n=1e . UwagaPr(En)=0.

Zgaduję: Myślę, że i<nPr(Ei)=lnn , gdy n idzie w nieskończoność. Uważałem pierwsze lnn elementów w sumowaniu.


1
Wygląda jak podtekst problemu urodzinowego.
Gopi

@Gopi Nie mogę się przekonać, że moje pytanie jest ograniczonym problemem urodzinowym. Czy możesz to wyraźnie wyjaśnić? Dziękuję Ci bardzo. Uwaga: Ograniczenie dotyczy sumy piłek w pierwszych pojemnikach , a nie liczby pojemników w określonym pojemniku. j
Peng Zhang,

Rzeczywiście, mój zły, po ponownym przeczytaniu artykułu na Wikipedii o problemie urodzinowym zdałem sobie sprawę, że rozważam inny problem, który został dostosowany do problemu urodzinowego.
Gopi

2
Niektóre niepoprawne pomysły ... Zastanów się, jak zakodować stan: Przeczytaj pojemniki od lewej do prawej. Jeśli pierwszy pojemnik ma kulki i, wypisz sekwencję i-tych, a następnie 0. Zrób to dla wszystkich pojemników od lewej do prawej. Wygląda na to, że jesteś zainteresowany największym i takim, że ten ciąg binarny (który ma n zer i n) po raz pierwszy zawiera więcej zer niż zer. Teraz, pozwala wykonać skok z losem i wygenerować 0 i 1 z równym prawdopodobieństwem . (To może być kompletny nonsens). Ten problem dotyczy liczb katalońskich i słów Dyck. I...??? 1/2
Sariel Har-Peled

4
Nie rozumiem w twojej definicji, dlaczego ważne jest, że kule są różne. Również interpretacja ciągów uwzględnia fakt, że pojemniki są różne.
Sariel Har-Peled

Odpowiedzi:


11

EDYCJA: (2014-08-08) Jak zauważa Douglas Zare w komentarzach, poniższy argument, a konkretnie „pomost” między dwoma prawdopodobieństwami, jest nieprawidłowy. Nie widzę prostego sposobu, aby to naprawić. Zostawię odpowiedź tutaj jako wierzę, że nadal zapewnia pewną intuicję, ale wiem, że jest nie tak w ogóle.

Pr(Em)l=1mPr(Fl)

To nie będzie pełna odpowiedź, ale mam nadzieję, że będzie zawierała wystarczającą ilość treści, którą Ty lub ktoś bardziej kompetentny ode mnie skończę.

Rozważ prawdopodobieństwo, że dokładnie kulek wpadnie do pierwszych l (z n ) pojemników:kln

(nk)(ln)k(nln)nk

Wywołaj prawdopodobieństwo, że mniej niż kulek wpadnie do pierwszych l pojemników F l :llFl

Pr(Fl)=k=0l1(nk)(ln)k(nln)nk

Prawdopodobieństwo wystąpienia zdarzenia, powyżej występuje jest mniejszy niż, jeśli rozważyć każdy z F l zdarzeń występujących samodzielnie i w jednej porcji. To daje nam pomost między nimi:ElFl

Pr(Em)l=1mPr(Fl)=l=1m(k=1l1(nk)(lnk)(nln)nk)=l=1mF(l1;n,ln)

Gdzie jestfunkcją rozkładu skumulowanego dla rozkładu dwumianowegoprzyp=lF(l1;n,ln) . Wystarczy przeczytać kilka wierszy w dół na stronie Wikipedii i zauważyć, że(l-1pn)możemy użyćnierówności Chernoffa,aby uzyskać:p=ln(l1pn)

Pr(Em)l=1mexp[12l]=exp[12l=1m1l]=exp[12Hm]exp[12(12m+ln(m)+γ)]

Where Hm is the m'th Harmonic Number, γ is the Euler-Mascheroni constant and the inequality for the Hm is taken from Wolfram's MathWorld linked page.

Not worrying about the e1/4m factor, this finally gives us:

Pr(Em)eγ/2m

Below is a log-log plot of an average of 100,000 instances for n=2048 as a function of m with the function eγ/2m also plotted for reference:

enter image description here

While the constants are off, the form of the function appears to be correct.

Below is a log-log plot for varying n with each point being the average of 100,000 instances as a function of m:

enter image description here

Finally, getting to the original question you wanted answered, since we know that Pr(Em)1m we have:

i<nPr(Ei)n

And as numerical verification, below is a log-log plot of the sum, S, versus instance size, n. Each point represents the average of the sum of 100,000 instances. The function x1/2 has been plotted for reference:

enter image description here

While I see no direct connection between the two, the tricks and final form of this problem have a lot of commonalities with the Birthday Problem as initially guessed at in the comments.


4
How do you get Pr(E2)Pr(F1)×Pr(F2)? For example, for n=100, I calculate that Pr(E2)=0.267946>0.14761=Pr(F1)Pr(F2). If you are told that the first bin is empty, does this make it more or less likely that the first two bins hold at most 1 ball? It's more likely, so Pr(F1)Pr(F2) is an underestimate.
Douglas Zare

@DouglasZare, I've verified your calculations, you're correct. Serves me right for not being more rigorous.
user834

15

The answer is Θ(n).

First, let's compute En1.

Let's suppose we throw n balls into n bins, and look at the probability that a bin has exactly k balls in it. This probability comes from the Poisson distribution, and as n goes to the probability that there are exactly k balls in a given bin is 1e1k!.

Now, let's look at a different way of distributing balls into bins. We throw a number of balls into each bin chosen from the Poisson distribution, and condition on the event that there are n balls total. I claim that this gives exactly the same distribution as throwing n balls into n bins. Why? It is easy to see that the probability of having kj balls in the jth bin is proportional to j=1n1kj! in both distributions.

So let's consider a random walk where at each step, you go from t to t+1k with probability 1e1k!. I claim that if you condition on the event that this random walk returns to 0 after n steps, the probability that this random always stays above 0 is the probability that the OP wants to calculate. Why? This height of this random walk after s steps is s minus the number of balls in the first s bins.

If we had chosen a random walk with a probability of 12 of going up or down 1 on each step, this would be the classical ballot problem, for which the answer is 12(n1). This is a variant of the ballot problem which has been studied (see this paper), and the answer is still Θ(1n). I don't know whether there is an easy way to compute the constant for the Θ(1n) for this case.

The same paper shows that when the random walk is conditioned to end at height k, the probability of always staying positive is Θ(k/n) as long as k=O(n). This fact will let us estimate Es for any s.

I'm going to be a little handwavy for the rest of my answer, but standard probability techniques can be used to make this rigorous.

We know that as n goes to , this random walk converges to a Brownian bridge, i.e., Brownian motion conditioned to start and end at 0. From general probability theorems, for ϵn<s<(1ϵ)n, the random walk is roughly Θ(n) away from the x-axis. In the case it has height t>0, the probability that it has stayed above 0 for the entire time before s is Θ(t/s). Since t is likely to be Θ(n) when s=Θ(n), we have EsΘ(1/n).


4

[Edit 2014-08-13: Thanks to a comment by Peter Shor, I have changed my estimate of the asymptotic growth rate of this series.]

My belief is that limni<nPr(Ei) grows as n. I do not have a proof but I think I have a convincing argument.

Let Bi=f(i) be a random variable that gives the number of balls in bin i. Let Bi,j=k=ijBk be a random variable that gives the total number of balls in bins i through j inclusive.

You can now write Pr(Ei)=b<jPr(EjB1,j=b)Pr(EiEjB1,j=b) for any j<i. To that end, let's introduce the functions π and gi.

π(j,k,b)=Pr(Bj=kB1,j1=b)=(nbk)(1nj+1)k(njnj+1)nbk

gi(j,k,b)=Pr(EiBj,ikEj1B1,j1=b)={0k<01k>=0j>il=0jb1π(j,l,b)gi(j+1,kl,b+l)otherwise

We can write Pr(Ei) in terms of gi:

Pr(Ei)=gi(1,i1,0)

Now, it's clear from the definition of gi that

Pr(Ei)=(ni)ni+1nnhi(n)

where hi(n) is a polynomial in n of degree i1. This makes some intuitive sense too; at least ni+1 balls will have to be put in one of the (i+1)th through nth bins (of which there are ni).

Since we're only talking about Pr(Ei) when n, only the lead coefficient of hi(n) is relevant; let's call this coefficient ai. Then

limnPr(Ei)=aiei

How do we compute ai? Well, this is where I'll do a little handwaving. If you work out the first few Ei, you'll see that a pattern emerges in the computation of this coefficient. You can write it as

ai=μi(1,i1,0)
where
μi(j,k,b)={0k<01k>=0i>jl=0jb11l!μi(j+1,kl,b+l)otherwise

Now, I wasn't able to derive a closed-form equivalent directly, but I computed the first 20 values of Pr(Ei):

N       a_i/e^i
1       0.367879
2       0.270671
3       0.224042
4       0.195367
5       0.175467
6       0.160623
7       0.149003
8       0.139587
9       0.131756
10      0.12511
11      0.119378
12      0.114368
13      0.10994
14      0.105989
15      0.102436
16      0.0992175
17      0.0962846
18      0.0935973
19      0.0911231
20      0.0888353

Now, it turns out that

Pr(Ei)=iii!ei=Pois(i;i)

where Pois(i;λ) is the probability that a random variable X has value i when it's drawn from a Poisson distribution with mean λ. Thus we can write our sum as

limni=1nPr(Ei)=x=1xxx!ex

Wolfram Alpha tells me this series diverges. Peter Shor points out in a comment that Stirling's approximation allows us to estimate Pr(Ei):

limnPr(Ex)=xxx!ex12πx

Let

ϕ(x)=12πx

Since

  • limxϕ(x)ϕ(x+1)=1
  • ϕ(x) is decreasing
  • 1nϕ(x)dx as n

our series grows as 1nϕ(x)dx (See e.g. Theorem 2). That is,

i=1nPr(Ei)=Θ(n)

1
Wolfram Alpha is wrong. Use Stirling's formula. It says that, xx/(x!ex)1/2πx.
Peter Shor

@PeterShor Thanks! Zaktualizowałem wniosek dzięki twojemu wglądowi i teraz zgadzam się z pozostałymi dwiema odpowiedziami. Interesujące jest dla mnie 3 całkiem różne podejścia do tego problemu.
ruds

4

Exhaustively checking the first few terms (by examining all n^n cases) and a bit of lookup shows that the answer is https://oeis.org/A036276 / nn. This implies that the answer is n12π2.

More exactly, the answer is:

n!2nnk=0n2nkk!
and there is no closed-form answer.

Oeis is pretty awesome
Thomas Ahle
Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.