Arithmetic random number generator

from Wikipedia, the free encyclopedia

Arithmetic random number generators are random number generators for generating random numbers that are based on arithmetic . They are based on Weyl's theorem , use

as a generator, where the definitions in Weyl's Theorem apply, i.e. in particular an irrational number . Here stands for the modulo operation. denotes the largest integer that is less than or equal to .

Arithmetic random number generators are used in practice instead of physical random number generators . Since no irrational numbers can be represented on pocket calculators or computers , one often limits oneself to recursive arithmetic random number generators .

Recursive arithmetic random number generators

These are random number generators that are based on arithmetic random number generators , but with which one is satisfied with certain rational numbers as random numbers , since irrational numbers from which arithmetic random number generators are based cannot be displayed on computers. So they are pseudo random number generators .

To initialize the generator, start values called seeds are used. You can e.g. B. fixed if the generated number sequence should be repeatable, or you initialize it in a random way. The computer clock is often used as a data source for this, so the current time determines the initial values ​​of the .

An arithmetic function

now successively generates the values

, where .

The random numbers in the interval are then e.g. B .:

.

For the random numbers, you are satisfied with values ​​from the set , where is a sufficiently large natural number .

Probably the most important recursive arithmetic random number generators are congruence generators .

advantages

With a suitable function   , random numbers can be generated quickly . These are completely reproducible when specifying the seed.

disadvantage

The consequence is deterministic . No real random numbers are generated, only pseudo- random numbers . So it is a pseudo random number generator . The determinacy also means that there is no independence and equal distribution of the sequence. In particular, a loop will be created at some point. So there is with all . The smallest is called the period .

Whether these disadvantages play a role depends on the application: For example, it is not a disadvantage for simulations that the generated numbers are predictable as long as the period length is sufficiently large. On the contrary: the reproducibility of the numbers makes analysis and troubleshooting easier.

literature