lkml.org 
[lkml]   [1999]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: How can Emacs get a unique ID per Linux reboot?
Date
From
>>>Tim Smith said:
> On Tue, 1 Jun 1999, G. Allen Morris III wrote:
> > How about generating a 32bit random number at boot time. There
> > is a 1 in 2**32 of getting the same number after a reboot, but
> > that should not be a large problem.
>
> That 1 in 2**32 is the chance of duplicating any specific number in the
> sequence. The chances of *some* member of the sequence being a duplicate
> is much higher. This is called the "birthday paradox" because if you
> pick ~30 people at random, it is highly likely that two of them will
> have the same birthday.

There is no `birthday paradox' in this case. There would be a birthday
paradox if the question was what is the chance of having two random numbers
that are the same after picking _n_ random numbers. In this case instead
of have a n/2**32 chance of a collision there would be an
(n(n-1)/2)/2**32 chance of a collision. But in this case we have
a single random number, and we want to know if it is the same as a
single previous random number, so the odds of a collision are 1/2**32.

Allen


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.043 / U:1.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site