cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can change your system assigned username to something more personal in your community settings. X

program help

peace12-disable
1-Newbie

program help

trying to write a simple program to generate arbitrary numbers.
8 REPLIES 8

Have you looked in the help files for random number generator?

Fred Kohlhepp
fkohlhepp@sikorsky.com

yes, but when i try to program for the program to give me random numbers nothing comes up. need the numbers to run a program so i need to have them generated in a random fashion. Thank you.

peace

On 3/18/2009 2:50:52 PM, peace12 wrote:
>yes, but when i try to program
>for the program to give me
>random numbers nothing comes
>up.

Could you post the worksheet. Then we can tell you why.

Richard

On 3/18/2009 2:04:43 PM, peace12 wrote:
>trying to write a simple
>program to generate arbitrary
>numbers.
__________________

Random numbers: Vector ? array ?
What are they doing in program ?

jmG



Sounds easy but probably isn't. I'll start by giving you the answer I think you are after. Look up the uniform, normal and other distributions and you will see that each distribution has a random number generator functions of those distributions.

But what's wrong with your question is you don't specify how random you need your random numbers to be.

What is random? Randomness is very rarely (if ever) actually found. This was one of the most perplexing parts of statistics for me � that almost nothing is random. Randomness is normally defined as each item in a random set has no relation, either correlation or formulaic, with any other value generated.

Almost all statistical tests that require randomness get buy with pseudo-random number generators, like Mathcad.

Pseudo-random because a computer can't guess/invent anything. It has to measure things. So normally it measures the time and/or time since CPU was turned on and applies some type of hashing algorithm. Therefore - not actually random. I like this quote:

�Computers are typically very bad at being random because they are designed to be able to reliably calculate the same answer, if given the same data to work with. When computers don't behave this way they are considered broken and in need of repair or replacement. Keys generated by a pure software process on your typically predictable computer will always, at some level, be predictable.�

But sometimes (rarely) you need more randomness. Cryptography is where I came across this. True randomness only occurs at the sub-atomic level. Luckily we don't need to measure that low because sub-atomic randomness "bubbles up" to affect molecules and their interactions (butterfly effect). We call anything governed by randomness �chaotic�. There aren�t too many things that are truly chaotic.

What I mean is: when one atom bounces off another the bounce angle is not directly proportional to the mass of both objects and their collision angle. That is � they are not rubber balls that follow a known path and will bounce off each other in a predictable manner. Instead the configuration, location, shape and speed of electrons and other sub-atomic particles add a degree of "unknown" - true randomness. In fact, if you measured these location, shape (orbital shape), and speed of all sub-atomic particles, you would actually change them. Therefore, you can never predict their activity because that requires measuremnt which affects the object making the prediction invalid.

The �butterfly effect� of atom collisions leading to randomness is easily seen with Lava lamps. The patterns they form are not unique, but the size, speed, direction and even the point at which wax globules join are all random.

A lave lamp is not only easy to look at, it�s also easy to monitor and use the image to generate random numbers.

This site has all the details:

http://www.lavarnd.org/faq/true_random_src.html

It has facilities for you to generate numbers. I've used this site/method again and again...

Philip
___________________
Nobody can hear you scream in Euclidean space.

Hey all I finally got the program to work after working on it for several hours. Thank all of you for your input.

peace

Intel has implemented a hardware random number generator in some of its chipsets. IIRC it is based on measuring thermal noise.

While some cryptography applications require true randomness (unpredictability in principle), most applications of random numbers are statistical and all that is actually required is the absence of correlations.
__________________
� � � � Tom Gutman

Ha - that's fantastic. Everything old is new again. The Commodore 64 had a sound chip that provided the same feature - it could measure white-noise. Some in the crypto world actually networked to a Comadore 64 as a true random number generator source.

Very interesting - thanks for the info.

Philip
___________________
Nobody can hear you scream in Euclidean space.
Top Tags