Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Obtaining random bit sequences from throwing a die
Replies: 3   Last Post: Jan 31, 2013 3:47 PM

 Messages: [ Previous | Next ]
 Herman Rubin Posts: 399 Registered: 2/4/10
Re: Obtaining random bit sequences from throwing a die
Posted: Jan 31, 2013 3:47 PM

On 2013-01-31, Mok-Kong Shen <mok-kong.shen@t-online.de> wrote:
> I have a further question. Is there anything against the following?

> 1 -> 00
> 2 -> 01
> 3 -> 10
> 4 -> 11
> 5 -> 0
> 6 -> 1

> M. K. Shen

This will have the desired property, but you are only getting
5/3 bits per roll. If two rolls at a time were considered, the
expected number would be 7/3 per roll.

If one has a random integer uniformly distributed from 0 to n-1,
a most efficient manner of getting random bits from it is to
compare the binary expansion of it with that of n. There is a
first point of difference, and all subsequent bits can be used
as binary random bits. If one uses that method for n=6, and
reduce the number observed by 1, the posted result will be what
is obtained. Less than 2 bits on the average are lost this way.

--
This address is for information only. I do not claim that these views
are those of the Statistics Department or of Purdue University.
Herman Rubin, Department of Statistics, Purdue University
hrubin@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558

Date Subject Author
1/31/13 Mok-Kong Shen
1/31/13 divergent.tseries@gmail.com
1/31/13 Mok-Kong Shen
1/31/13 Herman Rubin