Any time discussions turn to randomness and such, someone will use that discussion for security related purposes at some later date. That having been said, I feel that it's my duty as an upstanding netizen to bring to light the implications of certain things. On we go...
Therefore, a random shuffle (or multiple random shuffles, depending on the desired cardinality) can be transformed algorithmically into a random number
Unless you enumerate all of the permutations of the set, I don't know how this could possibly work. Even if you are, you're reducing the size of your output number drastically.

There are n! ways to permute a set of n items. There are n**n ways to choose n items from a set of n with replacement. The limit as n tends to zero of n!/n**n is zero. What this means is that compared with the cardinality of just choosing n random numbers from 1 to n, generating a random number with from a random shuffle gets progressively worse for larger n. This would imply (well, to me anyways) that if you're looking for a random number, better to do it directly than to first shuffle and then transform that shuffle into one.

A random number need not necessarily be chosen from an infinite set
Point conceded. I mis-spoke.

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come


In reply to Re^7: How to generate different random numbers? by thor
in thread How to generate distinct random numbers? by johnnywang

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.