Re: The randomfunction

From: Espen Amundsen (espen.amundsen_at_broadpark.no)
Date: 11/29/03


Date: Sat, 29 Nov 2003 03:55:02 +0100

Thank you for good answeres. Found some more info about randomness at
http://en2.wikipedia.org/wiki/Hardware_random_number_generator .

"Darrell Grainger" <darrell@NOMORESPAMcs.utoronto.ca.com> wrote in message
news:Pine.GSO.4.58.0311282034310.2614@drj.pf...
> On Fri, 28 Nov 2003, Espen Amundsen wrote:
>
> > Hi
> >
> > Ive ofte used the randomfunction in different languages but Ive never
> > understood how it works. As I see it, truly randomness should be
impossible;
> > so I just have to know how the randomfx works. Does anyone have the
> > sourcecode(any language) or can tell me how thats done?
>
> You are correct that truly random number generators would be impossible in
> a programming language. Most languages will use a mathematical formula to
> generate a sequence of numbers. Most will use a linear congruent method.
> For example:
>
> x' = (a*x + c) % m
>
> where x is the previous number in the sequence, x' is the next number in
> the sequence, a, c and m are set values. The idea is that if you choose a
> and c wisely, the sequence will be the maximum length before repeating.
> For example, if x is an 8 bit char then the sequence will repeat after all
> 256 numbers are use.
>
> --
> Send e-mail to: darrell at cs dot toronto dot edu
> Don't send e-mail to vice.president@whitehouse.gov



Relevant Pages

  • Re: is (La)TeX and open format?
    ... >I think official specifications for languages like C and C++ have many more ... So that argument doesn't hold IMO. ... urging further delay to produce a better standard. ... volume on randomness, where he describes a random number generator ...
    (comp.text.tex)
  • =?iso-8859-1?q?Re:_Kolmorgorov_Complexity_and_Kim_=D8yhus?=
    ... >>Sure a protein string could be generated from by organic Turing machine ... >>For example, a proteins sequence, like a lactase sequence, could indeed ... > proper compression. ... >>The notion of randomness is dependent upon chaos. ...
    (talk.origins)
  • Re: Random numbers something insatiable ?
    ... A sequence of machine codes is executed - the same way any other formula is ... the big question to start with is - which and what is the "true" rand ... Anyway, randomness is a property which is an implicit property of, e.g., ... This behavior is called correlation, ...
    (comp.lang.cpp)
  • Re: Good enough for crypto?
    ... to a few other hardware randomness generators that are ... > assess the quality of any sequence of bits. ... This type of analysis can only succeed if the generator ... > The autocorrelation function of a non-deterministic sequence will ...
    (sci.crypt)
  • Re: The randomfunction
    ... > Ive ofte used the randomfunction in different languages but Ive never ... Most languages will use a mathematical formula to ... generate a sequence of numbers. ...
    (comp.programming)