Question:
why is it so difficult to create random numbers?
vociferouschicanery
2005-12-30 15:53:15 UTC
why is it so difficult to create random numbers?
Nine answers:
Space Cowboy
2005-12-30 19:42:39 UTC
What you really want is samples of numbers from a set with a known distribution. Usually, you want a uniform distribution between zero and one (i.e. the probability of any number that you can represent with a computer is equal to the probability of any other number). Since the most common use of random (or pseudo-random) numbers is computer simulation, you also want to do it fast enough to compute thousands of scenarios quickly.



There are a number of methods to do this, but they often have hidden periodicity that makes them not look like uniform random numbers, and thus not produce the results you want. It seems silly, but I have actually run simulations using the Excel random number generator, where I knew the correct answer and the simulation did not produce it. When I changed to a different random number generator, I got the answer I was expecting.



"Numerical Recipes" gives a much better explanation than I did for this problem, and it also gives a few very good random number generators. The firsr source I listed is the table of contents of the book. Chapter 7 deals with random numbers. The next two links give you your answer. If you want, later parts of the chapter give some good algorithms for creating pseudo-random and quasi-random numbers.
etotheipi
2005-12-31 16:07:38 UTC
It is very hard because humans are not random, and computers are not random



Humans can never be used to create perfect random number. For example: when you ask someone to pick a number from 1 to 4, over 90% percent of the people pick 3. Because of the way people think, some numbers are more likely to appear when they try to come up with random number. Even when they try to type numbers randomly, it usually shows some pattern. I'll use up4greg's random number as example.

834927034703

1-5 are typed by left hand, 6-0 are typed by right hand. If we label the numbers by the hand that typed, we get this:

834927034703

rllrlrlllrll

We can see that left hand was used more frequently and right hand was never used twice in a row. up4greg's number also does not have doubled, or tripled digits. Note that the probability for this to happen is about 31%. This number also does not have 1,5,6. The probability is almost 1%.



The computer is not random in some other way. Computer strictly follows what we order it to do, and can never do anything by itself. We can't just tell it to 'make random numbers'. We have to give a method to do that. This means that the algorithm already decides the numbers that come out. It would give the same numbers every time. To solve this problem, we use physical randomness, such as time, temperature, and radioactive decay.



Generating random numbers is a very important matter in cryptography. That is why mathematicians still come up with new algorithms to generate random numbers.
Michael
2005-12-30 16:58:54 UTC
The classic approach is to start with a seed and apply some formula to generate a number that is at least zero but less than one (which could be scaled to, say, 1 to 6 for a roll of a single fair die). The problem is that once you know the seed, you can predict the values that will be generated. So, the numbers are not truly random, but pseudo-random.



With newer computers, a seed could be generated using the clock, temperature of the CPU, and perhaps other similar information not easily altered by a user. That would make the generator more random.
cblrdy
2005-12-30 17:04:22 UTC
Whats random to one isn't random to another. You're trying to make up random numbers so really it's not random. Write down a different number on a bunch of pieces of paper and throw it up in the air, when it lands put them in the order it landed, and some physics professor or mathematician will come up with a way of telling you that isn't random too.
LookingForAnswers
2005-12-30 16:25:24 UTC
You need to start with some sort of seed to create the random number. The seed usually is not something that is particularly random, like the time on your computer.
Henry
2005-12-30 20:03:48 UTC
It is difficult for me to do it but not a computer. Just go to one of those "random number" sites. You could also try Lottery wheeling sites.
Darius II
2005-12-30 16:00:19 UTC
because in the function of random... all the base are on fixed info...
up4greg
2005-12-30 15:53:53 UTC
its not that hard ..... 834927034703 .... <--- random number
2005-12-30 15:59:19 UTC
I'm not sure what exactly you mean by this question.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...