tag:blogger.com,1999:blog-7240062999532420004.post8263835138841277832..comments2023-09-17T06:33:01.504-04:00Comments on Distractions: Attempting to create an Unbiased random number generator (with defined upper bound runtime) from a Biased random number generatorDave Lahrhttp://www.blogger.com/profile/09699052376229863747noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-7240062999532420004.post-17013743671126404502013-01-16T15:01:07.882-05:002013-01-16T15:01:07.882-05:00http://stackoverflow.com/questions/8157340/unbiase...<a href="http://stackoverflow.com/questions/8157340/unbiased-random-number-generator" rel="nofollow">http://stackoverflow.com/questions/8157340/unbiased-random-number-generator</a>Dave Lahrhttps://www.blogger.com/profile/09699052376229863747noreply@blogger.comtag:blogger.com,1999:blog-7240062999532420004.post-50554861226609895592013-01-16T14:59:40.829-05:002013-01-16T14:59:40.829-05:00I did find this:
http://stackoverflow.com/question...I did find this:<br />http://stackoverflow.com/questions/8157340/unbiased-random-number-generator<br /><br />Which makes think that instead of the integer version of the ratio above (which is probably a source of problems - standard deviation and bias) I should calculate a double fraction which represents the fraction of times the biased towards value is generated by BIASED. Then, I call BIASED to get enough bits to generate a float/double (and these results are stored in the buffer). I then compare this generated float/double to the fraction, if it is greater than the fraction, return the biased-towards value, otherwise return the biased-against value. Dave Lahrhttps://www.blogger.com/profile/09699052376229863747noreply@blogger.comtag:blogger.com,1999:blog-7240062999532420004.post-51062261701984845052013-01-16T14:42:30.959-05:002013-01-16T14:42:30.959-05:00ps. What is the classical method? My google skil...ps. What is the classical method? My google skills are failing me.Dave Lahrhttps://www.blogger.com/profile/09699052376229863747noreply@blogger.comtag:blogger.com,1999:blog-7240062999532420004.post-33526636116809337642013-01-16T14:39:06.181-05:002013-01-16T14:39:06.181-05:00no! I started googling it after I saw your commen...no! I started googling it after I saw your comment. We've been working through introduction to algorithms in journal club and so in general I'm not trying to look up the answer, I'm attempting to solve it myself first. Although this one clearly got away from me.Dave Lahrhttps://www.blogger.com/profile/09699052376229863747noreply@blogger.comtag:blogger.com,1999:blog-7240062999532420004.post-40654341111678366352013-01-16T14:22:34.236-05:002013-01-16T14:22:34.236-05:00Do you know the classical method of unbiasing an R...Do you know the classical method of unbiasing an RNG?thouishttps://www.blogger.com/profile/08805809527656089305noreply@blogger.com