English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

*This is in regards to JavaScript. And I would really appreciate your help. Thank you.

2007-11-20 17:14:21 · 3 answers · asked by :Phil 5 in Computers & Internet Programming & Design

3 answers

Pseudo-random means something is predictable based on a mathematical formula.

True random means something is absolutely unpredictable.

http://www.random.org/
http://pressesc.com/01184778212_qrbgs

2007-11-20 17:27:45 · answer #1 · answered by Anonymous · 0 0

Random number generation is tied to measurement of physical events known to be randomly distributed. For instance the decay events of radioactive materials are randomly distributed; by detecting and reporting those events, truly random values can be produced.

The generation of pseudo-random relies on a set, mathematical algorithm (there are many). The "randomness" is artificial, and the goodness of the simulation is generally assessed by the degree to which statistical and other mathematical analyses can detect non-random aspects of the values.

I believe, but haven't found the specification, that JavaScript's Math.random() uses a linear, congruential pseudo-random number generator of the form:

r(n) = [m*r(n-1) + a] mod M

That is, the nth term of the simulation is generated from the (n-1)th term by a simple, linear transformation under a modular aritmetic.

m is the multiplier
a is the additive component
M is the modulus for the computation of the remainder

These are easy to implement, and relatively fast (faster still, if you reduce it to a multiplicative, LC generator by setting a=0).

As long as you're using the simulants for relatively trivial purposes, the LC generators are okay. Don't use them for serious purposes like secure encryption.

2007-11-21 10:39:37 · answer #2 · answered by richarduie 6 · 0 0

Servers can get access to a true random number generator. Check out the "Integrity" link at the bottom of www.pokerstars.com.

They describe that they have a "true hardware random number generator developed by Intel [3], which uses thermal noise as an entropy source"

2007-11-21 02:32:45 · answer #3 · answered by strantheman 2 · 0 0

fedest.com, questions and answers