Have you ever wondered how true random number generators work?

In summary: If you are using them to hand out money (lotteries) or do crypto that you care about then you might need real (hardware) random numbers.
  • #1
Winzer
598
0
Take for instance when you ask Mathematica 7 to generate a random number. This number can't be really random. It has to adhere to some process for picking that specific number. Does anyone know anything about the algorithm/process to this?
 
Technology news on Phys.org
  • #2
There are a variety of well-studied techniques for this. Google "pseudorandom number generation" or "pseudorandom number generator".

I believe that modern Intel chips have an instruction or somesuch that actually produces true random numbers (it uses two interfering oscillators plugged into a voltage meter, or something) but I do not know whether any programming libraries actually tap into this.
 
  • #3
Why would they? Pseudorandom number generation is good enough for 99% of applications.
 
  • #4
csprof2000 said:
Why would they? Pseudorandom number generation is good enough for 99% of applications.

Pseudorandom is used in 995 of applications, whether they are good enough or not depends.
If you are using them to hand out money (lotteries) or do crypto that you care about then you might need real (hardware) random numbers.
The via C3 (used in a lot of low power notebooks) has homework random number feature so do a bunch of specialist IBM and Intel chips, but AFAIK Intel's regular desktop chips don't. HW random number generators aren't guaranteed to produce perfectly random numbers either - you still have to be careful in the actual implementation.

Pseudorandom is still very useful for things like monte-carlo simulations, you don't care if the same stream of numbers is used everytime (in fact that is vital for testing) but you need a set of numbers with a certain known distribution.
 
  • #5
You can buy a true random number generator based on a pure quantum mechanical system, based states of single photons.

http://www.idquantique.com/products/quantis.htm

(This is not spam, I have no affiliation with that company).

They also make a true quantum key-distribution system, which let's you set up a quantum channel (an optical fiber which carries single photons) and carry out what is, theoretically, a perfectly secure communication. They use this in the Swiss federal elections.
 

What is a random number generator?

A random number generator is a computer program or device that produces a sequence of numbers that cannot be predicted beforehand. These numbers are generated in a seemingly random manner and are used for various purposes, such as creating security codes or simulating random events.

How does a random number generator work?

There are different types of random number generators, but they all use mathematical algorithms to generate a series of numbers. These algorithms take a seed value, which can be based on factors like time or user input, and use it to produce a sequence of numbers that appear random.

Are random number generators truly random?

No, random number generators are not truly random as they rely on algorithms and seed values. However, they can produce sequences of numbers that are indistinguishable from true randomness and are considered sufficiently random for most purposes.

What is the difference between a true random number generator and a pseudorandom number generator?

A true random number generator uses physical processes, such as atmospheric noise or radioactive decay, to generate truly random numbers. A pseudorandom number generator, on the other hand, uses mathematical algorithms and seed values to produce numbers that appear random but are actually deterministic.

How are random number generators used in science?

Random number generators are used in various scientific fields, such as statistics, simulation, and cryptography. They are also used in experiments and studies to ensure that the results are not biased by any predetermined patterns or sequences.

Similar threads

Replies
25
Views
3K
  • Programming and Computer Science
Replies
1
Views
172
  • Programming and Computer Science
Replies
14
Views
1K
  • Programming and Computer Science
Replies
6
Views
2K
  • Programming and Computer Science
Replies
19
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
11
Views
392
  • Programming and Computer Science
Replies
6
Views
2K
  • Programming and Computer Science
Replies
11
Views
778
  • Quantum Physics
Replies
23
Views
966
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top