Sheesh! What kind of hardware do you have? It's taking me longer to execute it than it took you to write it!

:-)

Okay, after 14 minutes (!), I saw similar results. The problem, as I see it, is not the distribution around the median, but the predictability of successive elements.

Any given number may have an equal chance of being at any location in the result array. However, there seems to be a very large probability (certainly greater than random) that for a given element, the element which starts next to this one will end up very close to wherever this element ends up.
At least in the case of pre-sorted input (which we all used), close neighbors tend to not only stay near each other, but to stay in the same order. Given that Perl uses a quicksort-based implementation, this will likely be true of all input data.

Obviously, neither of the two solutions (the original post and this one) is suitable for strong cryptography (no solution which only uses a pseudo-random number generator will be).

Russ


In reply to Analyzing Randomization Results by Russ
in thread Randomize List of items by johannz

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.