Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

In short, yes. It's incumbent on the "user" to either know that if there are 20 items being distributed, a fair distribution can only occur at ( $n % 20 ) == 0 or to be Ok with modulo bias. And Likewise, in the case of an infinite stream, the user should either draw multiples of the size of the input lists, or be ok with the fact that as $n approaches infinity modulo bias fades into irrelevancy.

I'm also assuming that the input lists are finite in size, so the frequency can be known.


Dave


In reply to Re^2: Bag uniform distribution algorithms by davido
in thread Bag uniform distribution algorithms by davido

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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    LanX 1 ..2 ..3 ..4 .. is erix missing ;-)
    LanX is Discipulus reciting "Springtime for Hitler" ?
    [choroba]: erix could tell you how to do it in Postgres
    [LanX]: NOOOOOOOOOOOOOOO not again
    [chacham]: wow, mysql really is as bad as i thougt
    [choroba]: completion?
    [LanX]: That's what he usually does when MySQL is mentioned ;-)
    [chacham]: the same thing could be achieved with a trigger
    [LanX]: choroba yes
    chacham shudders at the thought of using a trigger...so evil

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (11)
    As of 2017-03-30 15:10 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      Should Pluto Get Its Planethood Back?



      Results (360 votes). Check out past polls.