Article View: news.software.nntp
Article #19121Re: Most efficient directory structure for news?
From: Paul Martin
Date: Thu, 10 Jul 1997 00:00
Date: Thu, 10 Jul 1997 00:00
48 lines
2033 bytes
2033 bytes
In article <000033C29F8E.NO_UCE@mauve.demon.co.uk>, Ian Stirling <000033C29F8E.NO_UCE@mauve.demon.co.uk> writes: > It's not 1 in 2400, it's a dead cert, due to birthday paradox. > > Basically, in any group of size sqrt(x) selected from x possible > states, you have a probability of .5 that there will be two x's of > the same value. In classic form, it's more likely than not you will > get 2 people with the same birthday in a group of 20 or over. It's not exactly sqrt(x), but slightly larger. You have n letters, with an alphabet of size a The number of possible letter combinations is a^n. The number of permutations of with no common letters is a!/(a-n)!. The probability of there being no common letters in a selection of letters is a! -------- n a (a-n)! The probability of there being at least two letters the same is one minus the last formula. For the Birthday paradox (a=365), the probabilities are: People Percentage 20 41.1% 21 44.4% 22 47.6% 23 50.7% In bc, the formula is 1-f(a)/(f(a-n)*a^n) using the factorial definition in the bc man pages. That said, the factorials of large powers of 2 are fiddly to work with. I'm sure that someone's going to tell me that the limit as the alphabet tends to infinity is sqrt(a) anyway. :) -- Paul Martin <pm@zetnet.net>
Technical Details
Message-ID:
<5q3crb$a94$1@roch.zetnet.co.uk>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<5pn3ck$137s$1@node17.cwnet.frontiernet.net> <5pq0fa$rpv@stealth.eng.pyramid.com> <5pt6cs$l6l$1@news1.epix.net> <000033C29F8E.NO_UCE@mauve.demon.co.uk>Show Full Headers
Complete Article Headers
Message-ID: <5q3crb$a94$1@roch.zetnet.co.uk> Subject: Re: Most efficient directory structure for news? Date: Thu, 10 Jul 1997 00:00:00 +0000 From: pm@zetnet.co.uk (Paul Martin) References: <5pn3ck$137s$1@node17.cwnet.frontiernet.net> <5pq0fa$rpv@stealth.eng.pyramid.com> <5pt6cs$l6l$1@news1.epix.net> <000033C29F8E.NO_UCE@mauve.demon.co.uk> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 256015528 Newsgroups: news.software.nntp