algorithm - Fast generation of random numbers that appear random -


I am searching in an efficient way to generate numbers that a human will experience in random form. Actually, I think about avoiding the long sequences of 0 or 1 bit. I hope that humans want to see a bit of pattern, and a very low CPU should be able to calculate these close to one thousand per second.

There are two different concepts which I can think of doing this, but I am losing searching to find an efficient way of accomplishing them.

  1. Generate a random number with a certain number. For 32-bit random numbers, it requires 31 random numbers using the Nood Selection algorithm. Is bits a more efficient way to generate a random number with some numbers of sets? Unfortunately, 0000FFFF does not look very random.

  2. Some parts feel "part-wise" density as it looks better - but I can not come together, the obvious way of doing this - I think of going through every segment, And calculate how far it is from the ideal density, and try to increase the bit density of the next part. It seems complicated.

Hopefully there is another algorithm about which I have not thought about it. Thanks in advance for your help.

[edit] Should be clear with what I should ask -
(A) Is there an effective way to generate random numbers without the "long" run of a single bit, where " Tall "is a tunable parameter?
(B) Whatever will be less, random?

Probably what you want is what you want.

Edit light in one of the updated questions: You should see one, though I'm not sure how fast it can run. See also.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -