Re: Real-Life Random-Number Generator

From: Nora Baron (norabaron_at_hotmail.com)
Date: 06/12/04


Date: 12 Jun 2004 15:31:05 -0700

qqquet@mindspring.com (Leroy Quet) wrote in message news:<b4be2fdf.0406121046.7887721a@posting.google.com>...
> This is a 2-part question, really.
>
> The first part (which is why I posted this to rec.puzzles) is to come
> up with a clever and original means, using real life, of generating a
> 'random' sequence of, say, 0's and 1's.
> (Extra points if you have actually used this method before.)
>
> The second part (which is why I posted this to sci.math) is to come up
> with an effective algorithm which takes the possibly
> not-uniformly-distributed inputted sequence from part-1 and outputs
> another basically random sequence with uniform distribution of the
> sequence's possible values (say, 50% 0's, 50 % 1's).
> (I bet that there are many well-known algorithms for inputting a
> sequence with unknown distribution and outputting a basically random
> sequence with uniform distribution of possible values.)
>
> For example,
>
> We might be at a busy street intersection, and we take note of all
> vehicles travelling past a stop-sign.
>
> If a SUV or truck passes by, we get the next term of sequence A is a
> 0.
> If any other kind of vehicle passes by, we get the next term of A is
> 1.
>
> Now, we do not know how many SUVs/trucks are in our town versus
> smaller vehicles. So we need a method of getting closer to 50% 0's,
> 50% 1's in our random sequence.
>
> A simple but imperfect method might be to let the first term of
> sequence B equal the first term of A. For each additional term,
> sequence B's k_th term equals its {k-1}th term if sequence A's k_th
> term is 0.
> If sequence A's k_th term is 1,
> then sequence B's k_th term is 1 minus its {k-1}th term.
>

  This rule doesn't behave very well at all if the probability that
A = 0 is small. I generated 10,000 random observations with
prob(A = 0) = .01, and found mean(B) = .4496 (in one instance),
but there is a lot of variability. Also clearly if A has a high
probability of equalling 1, there will be long strings of B's in
which 0's and 1's alternate.

> I would bet a better method would be to have a predetermined
> pseudo-random sequence C (with uniform distribution of its values). If
> A's k-th term is 0 we let B's k-th term be, say, C(2k). If A's k_th
> term is 1, we let B(k) = C(2k-1).
>

  I have not tried that one, but I find the general problem interesting.
Suppose I have a large text document, e.g., a chapter of a book, and
I count the number of e's in it. Clearly not random; e is the most
common letter in typical English text. But it may well be that the
last 2 or 3 digits of the e-count is random. E.g., I used an editor
to count the e's in a collection of book reviews I downloaded from
Amazon.com, with a total of 23896 characters. The number of e's was
2107. Thus my random number, depending on whether I take the last 2
or three digits, is either 07 or 107. It seems safer in this case to
take 07. To generate 0's and 1's, assign A = 0 if the last digit
is even, 1 if odd. Not very efficient, and you don't want to use
the same text over again.

  I have heard that one random number generating scheme used for
encryption is based on having someone type a string of text, e.g.,
'The quick brown fox jumps over the lazy dog' and measuring how long
it takes to do this in microseconds. Then presumably again take the
last 2-3 digits. This is easily programmed using a language which
accesses the computer's clock.

  'Random', in my view, is actually not definable except in subjective
terms: a sequence of items with n possible values is uniformly random (to
you)if your probability of predicting the next term is 1/n. What is
random for you me may not be random for you: you may see a pattern that
I do not. Thus aliens in outer space, wishing to avoid detection by
other hostile aliens, would do best in sending encoded messages to
imitate background thermal noise. SETI would never know the difference.
This may be the best evidence yet of alien intelligence.

  Nora B.

> But I bet there are still better methods.
>
> thanks,
> Leroy Quet



Relevant Pages

  • Re: Cantorian pseudomathematics
    ... >> And there's no particular question about what countable additivity ... >> sequence of pairwise disjoint events, ... The fact that each P_n is a uniform distribution is not relevant to ... assertion to another in the background, unnoticed, and uncared for? ...
    (sci.math)
  • Re: Real-Life Random-Number Generator
    ... > another basically random sequence with uniform distribution of the ... > sequence with unknown distribution and outputting a basically random ... Truck/SUV was second, ...
    (sci.math)
  • Re: Pitman numerology
    ... residue in the sequence. ... If the targets were uniformly distributed and scarce, ... We don't observe evolution when the targets are scarce, ... Run conventional statistical tests for uniform distribution on them.) ...
    (talk.origins)
  • Re: Pitman numerology
    ... It would require an inserition or substitution of a large sequence. ... Given a repeating DNA pattern, a frame shift mutation can indeed ... Run conventional statistical tests for uniform distribution on them.) ...
    (talk.origins)
  • Re: user defined function that converts string to float
    ... > I need user defined function that converts string to float in c. ... initial, possibly empty, sequence of white-space characters (as ... point character, then an optional exponent part as defined in ... then a nonempty sequence of hexadecimal digits ...
    (comp.lang.c)

Quantcast