But that's not 8-bits.

By that assessment, then neither is MT19973 a "32-bit PRNG", so basing probabilities relating to its use upon 2^32-bits are wrong also.

As I've shown with my 8 bit toy rand, you can get more than 8-bits of entropy out of a "headline" 8-bit RCPRNG.

Equally, the win32 built-in which is described as a 2^15 bit generator, cannot be assessed entirely by formulae using 2^15 either, because it has a period of close to 2^31.

There are 2^32 seeds. Each of them starts a different sequence.

Are you sure about that?

Sure it isn't a single, 4e6001 value non-repeating sequence, and all the seeding does it start you at a different place within it.

Ie. think of the sequence folding back on itself in a circle. The seeding picks a starting point on that circle and then the generator runs around the circle until it finally reaches back to it starting point when it then repeats.

Of course, there is no way to prove that for the MT.

I read this as "the more he generates, the more it takes for a duplication to happen". That seems quite counter intuitive to me, and I'm not sure if that's what you mean.

Come on. The OP needs 25 rands for each string. If he only picks one set of 25 from each seeded starting position, and there are 2^32 such positions, then he can pick at most 2^32.

But, we know there are 6.45e44 possible strings. So he'd only have obtained 0.00000000000000000000000000000000066% of the possibilities. However, if he grabs 50 values from each start position and builds 2 strings with them, he now has twice as many strings.

And if he builds 10 strings from each starting point, he has ten times as many strings, but that's still a vanishingly small proportion of the total possibilities: 0.0000000000000000000000000000000066%.

So no, I didn't mean what you said. I am saying that you are only limited to 2**32 strings if you only generate 1 string from each seed position.

But that you can generate 10 (or 100 or 1000) strings from each starting position, thereby producing 10 (or 100 or 1000) * 2^32 strings, and the odds of having produced a duplicate are still "vanishingly small". Slightly higher than if you only pick 1 at each position, but even 10 (or 100 or 1000) times the infinitesimal, is still infinitesimal.

Minute; way less than micro nano pico femto atto zepto yoctoscopic.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?


In reply to Re^10: How likely is rand() to repeat? by BrowserUk
in thread How likely is rand() to repeat? by desertrat

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.