Let's understand the principle of operation of a random number generator.


Note that ideally the random number distribution density curve would look as shown in Fig. 22.3. That is, ideally, each interval contains the same number of points: N i = N/k , Where N total number of points, k number of intervals, i= 1, , k .

Rice. 22.3. Frequency diagram of random numbers,
generated theoretically by an ideal generator

It should be remembered that generating an arbitrary random number consists of two stages:

  • generating a normalized random number (that is, uniformly distributed from 0 to 1);
  • normalized random number conversion r i to random numbers x i, which are distributed according to the (arbitrary) distribution law required by the user or in the required interval.

Random number generators according to the method of obtaining numbers are divided into:

  • physical;
  • tabular;
  • algorithmic.

Physical RNG

An example of a physical RNG can be: a coin (“heads” 1, “tails” 0); dice; a drum with an arrow divided into sectors with numbers; hardware noise generator (HS), which uses a noisy thermal device, for example, a transistor (Fig. 22.422.5).

Rice. 22.4. Scheme of a hardware method for generating random numbers
Rice. 22.5. Diagram of obtaining random numbers using the hardware method
Task “Generating random numbers using a coin”

Generate a random three-digit number, uniformly distributed in the range from 0 to 1, using a coin. Accuracy three decimal places.

The first way to solve the problem
Toss a coin 9 times, and if the coin lands on heads, then write down “0”; if it lands on heads, then write down “1”. So, let’s say that as a result of the experiment we received the random sequence 100110100.

Draw an interval from 0 to 1. Reading the numbers in sequence from left to right, split the interval in half and each time choose one of the parts of the next interval (if you get a 0, then the left one, if you get a 1, then the right one). Thus, you can get to any point in the interval, as accurately as you like.

So, 1 : the interval is divided in half and , the right half is selected, the interval is narrowed: . Next number 0 : the interval is divided in half and , the left half is selected, the interval is narrowed: . Next number 0 : the interval is divided in half and , the left half is selected, the interval is narrowed: . Next number 1 : the interval is divided in half and , the right half is selected, the interval is narrowed: .

According to the accuracy condition of the problem, a solution has been found: it is any number from the interval, for example, 0.625.

In principle, if we take a strict approach, then the division of intervals must be continued until the left and right boundaries of the found interval COINCIDE with an accuracy of the third decimal place. That is, from the point of view of accuracy, the generated number will no longer be distinguishable from any number from the interval in which it is located.

The second way to solve the problem
Let's split the resulting binary sequence 100110100 into triads: 100, 110, 100. After converting these binary numbers into decimal numbers, we get: 4, 6, 4. Substituting “0.” in front, we get: 0.464. This method can only produce numbers from 0.000 to 0.777 (since the maximum that can be “squeezed out” from three binary digits is 111 2 = 7 8) that is, in fact, these numbers are represented in the octal number system. For translate octal numbers in decimal let's perform the representation:
0.464 8 = 4 8 1 + 6 8 2 + 4 8 3 = 0.6015625 10 = 0.602 10.
So, the required number is: 0.602.

Tabular RNG

Tabular RNGs use specially compiled tables containing verified uncorrelated, that is, in no way dependent on each other, numbers as a source of random numbers. In table Figure 22.1 shows a small fragment of such a table. By traversing the table from left to right from top to bottom, you can obtain random numbers evenly distributed from 0 to 1 with the required number of decimal places (in our example, we use three decimal places for each number). Since the numbers in the table do not depend on each other, the table can be traversed in different ways, for example, from top to bottom, or from right to left, or, say, you can select numbers that are in even positions.

Table 22.1.
Random numbers. Evenly
random numbers distributed from 0 to 1
Random numbers Evenly distributed
0 to 1 random numbers
9 2 9 2 0 4 2 6 0.929
9 5 7 3 4 9 0 3 0.204
5 9 1 6 6 5 7 6 0.269
… …

The advantage of this method is that it produces truly random numbers, since the table contains verified uncorrelated numbers. Disadvantages of the method: storing a large number of digits requires a lot of memory; There are great difficulties in generating and checking this kind of tables; repetitions when using a table no longer guarantee the randomness of the numerical sequence, and therefore the reliability of the result.

There is a table containing 500 absolutely random verified numbers (taken from the book by I. G. Venetsky, V. I. Venetskaya “Basic mathematical and statistical concepts and formulas in economic analysis”).

Algorithmic RNG

The numbers generated by these RNGs are always pseudo-random (or quasi-random), that is, each subsequent number generated depends on the previous one:

r i + 1 = f(r i) .

Sequences made up of such numbers form loops, that is, there is necessarily a cycle that repeats an infinite number of times. Repeating cycles are called periods.

The advantage of these RNGs is their speed; generators require virtually no memory resources and are compact. Disadvantages: the numbers cannot be fully called random, since there is a dependence between them, as well as the presence of periods in the sequence of quasi-random numbers.

Let's consider several algorithmic methods for obtaining RNG:

  • method of median squares;
  • method of middle products;
  • stirring method;
  • linear congruent method.

Midsquare method

There is some four-digit number R 0 . This number is squared and entered into R 1 . Next from R 1 takes the middle (four middle digits) new random number and writes it into R 0 . Then the procedure is repeated (see Fig. 22.6). Note that in fact, as a random number you need to take not ghij, A 0.ghij with a zero and a decimal point added to the left. This fact is reflected as in Fig. 22.6, and in subsequent similar figures.

Rice. 22.6. Scheme of the mean squares method

Disadvantages of the method: 1) if at some iteration the number R 0 becomes equal to zero, then the generator degenerates, so the correct choice of the initial value is important R 0 ; 2) the generator will repeat the sequence through M n steps (at best), where n number digit R 0 , M base of the number system.

For example in Fig. 22.6: if the number R 0 will be represented in the binary number system, then the sequence of pseudo-random numbers will be repeated in 2 4 = 16 steps. Note that the repetition of the sequence can occur earlier if the starting number is chosen poorly.

The method described above was proposed by John von Neumann and dates back to 1946. Since this method turned out to be unreliable, it was quickly abandoned.

Midproduct method

Number R 0 multiplied by R 1, from the result obtained R 2 the middle is extracted R 2 * (this is another random number) and multiplied by R 1 . All subsequent random numbers are calculated using this scheme (see Fig. 22.7).

Rice. 22.7. Scheme of the method of median products

Stirring method

The shuffle method uses operations to cyclically shift the contents of a cell left and right. The idea of ​​the method is as follows. Let the cell store the initial number R 0 . Cyclically shifting the contents of the cell to the left by 1/4 of the cell length, we obtain a new number R 0 * . In the same way, cycling the contents of the cell R 0 to the right by 1/4 of the cell length, we get the second number R 0**. Sum of numbers R 0* and R 0** gives a new random number R 1 . Further R 1 is entered in R 0, and the entire sequence of operations is repeated (see Fig. 22.8).


Rice. 22.8. Mixing method diagram

Please note that the number resulting from the summation R 0* and R 0 ** , may not fit completely in the cell R 1 . In this case, the extra digits must be discarded from the resulting number. Let us explain this in Fig. 22.8, where all cells are represented by eight binary digits. Let R 0 * = 10010001 2 = 145 10 , R 0 ** = 10100001 2 = 161 10 , Then R 0 * + R 0 ** = 100110010 2 = 306 10 . As you can see, the number 306 occupies 9 digits (in the binary number system), and the cell R 1 (same as R 0) can contain a maximum of 8 bits. Therefore, before entering the value into R 1, it is necessary to remove one “extra”, leftmost bit from the number 306, resulting in R 1 will no longer go to 306, but to 00110010 2 = 50 10 . Also note that in languages ​​such as Pascal, “trimming” of extra bits when a cell overflows is performed automatically in accordance with the specified type of the variable.

Linear congruent method

The linear congruent method is one of the simplest and most commonly used procedures currently simulating random numbers. This method uses the mod( x, y) , which returns the remainder when the first argument is divided by the second. Each subsequent random number is calculated based on the previous random number using the following formula:

r i+ 1 = mod( k · r i + b, M) .

The sequence of random numbers obtained using this formula is called linear congruent sequence. Many authors call a linear congruent sequence when b = 0 multiplicative congruent method, and when b ≠ 0 — mixed congruent method.

For a high-quality generator, it is necessary to select suitable coefficients. It is necessary that the number M was quite large, since the period cannot have more M elements. On the other hand, the division used in this method is a rather slow operation, so for a binary computer the logical choice would be M = 2 N, since in this case, finding the remainder of division is reduced inside the computer to the binary logical operation “AND”. Choosing the largest prime number is also common M, less than 2 N: in the specialized literature it is proven that in this case the low-order digits of the resulting random number r i+ 1 behave just as randomly as the older ones, which has a positive effect on the entire sequence of random numbers as a whole. As an example, one of the Mersenne numbers, equal to 2 31 1, and thus, M= 2 31 1 .

One of the requirements for linear congruent sequences is that the period length be as long as possible. The length of the period depends on the values M , k And b. The theorem we present below allows us to determine whether it is possible to achieve a period of maximum length for specific values M , k And b .

Theorem. Linear congruent sequence defined by numbers M , k , b And r 0, has a period of length M if and only if:

  • numbers b And M relatively simple;
  • k 1 times p for every prime p, which is a divisor M ;
  • k 1 is a multiple of 4, if M multiple of 4.

Finally, let's conclude with a couple of examples of using the linear congruent method to generate random numbers.

It was determined that a series of pseudo-random numbers generated based on the data from example 1 would be repeated every M/4 numbers. Number q is set arbitrarily before the start of calculations, however, it should be borne in mind that the series gives the impression of being random at large k(and therefore q). The result can be improved somewhat if b odd and k= 1 + 4 · q in this case the row will be repeated every M numbers. After a long search k the researchers settled on values ​​of 69069 and 71365.

A random number generator using the data from Example 2 will produce random, non-repeating numbers with a period of 7 million.

The multiplicative method for generating pseudorandom numbers was proposed by D. H. Lehmer in 1949.

Checking the quality of the generator

The quality of the entire system and the accuracy of the results depend on the quality of the RNG. Therefore, the random sequence generated by the RNG must satisfy a number of criteria.

The checks carried out are of two types:

  • checks for uniformity of distribution;
  • tests for statistical independence.

Checks for uniformity of distribution

1) The RNG should produce close to the following values ​​of statistical parameters characteristic of a uniform random law:

2) Frequency test

A frequency test allows you to find out how many numbers fall within an interval (m r – σ r ; m r + σ r) , that is (0.5 0.2887; 0.5 + 0.2887) or, ultimately, (0.2113; 0.7887). Since 0.7887 0.2113 = 0.5774, we conclude that in a good RNG, about 57.7% of all random numbers drawn should fall into this interval (see Fig. 22.9).

Rice. 22.9. Frequency diagram of an ideal RNG
in case of checking it for frequency test

It is also necessary to take into account that the number of numbers falling into the interval (0; 0.5) should be approximately equal to the number of numbers falling into the interval (0.5; 1).

3) Chi-square test

The chi-square test (χ 2 test) is one of the most well-known statistical tests; it is the main method used in combination with other criteria. The chi-square test was proposed in 1900 by Karl Pearson. His remarkable work is considered as the foundation of modern mathematical statistics.

For our case, testing using the chi-square criterion will allow us to find out how much the real The RNG is close to the RNG benchmark, that is, whether it satisfies the uniform distribution requirement or not.

Frequency diagram reference The RNG is shown in Fig. 22.10. Since the distribution law of the reference RNG is uniform, then the (theoretical) probability p i getting numbers into i th interval (all these intervals k) is equal to p i = 1/k . And thus, in each of k intervals will hit smooth By p i · N numbers ( N total number of numbers generated).

Rice. 22.10. Frequency diagram of the reference RNG

A real RNG will produce numbers distributed (and not necessarily evenly!) across k intervals and each interval will contain n i numbers (in total n 1 + n 2 + + n k = N ). How can we determine how good the RNG being tested is and how close it is to the reference one? It is quite logical to consider the squared differences between the resulting number of numbers n i and "reference" p i · N . Let's add them up and the result is:

χ 2 exp. = ( n 1 p 1 · N) 2 + (n 2 p 2 · N) 2 + + ( n k – p k · N) 2 .

From this formula it follows that the smaller the difference in each of the terms (and therefore the smaller the value of χ 2 exp.), the stronger the law of distribution of random numbers generated by a real RNG tends to be uniform.

In the previous expression, each of the terms is assigned the same weight (equal to 1), which in fact may not be true; therefore, for chi-square statistics, it is necessary to normalize each i th term, dividing it by p i · N :

Finally, let’s write the resulting expression more compactly and simplify it:

We obtained the chi-square test value for experimental data.

In table 22.2 are given theoretical chi-square values ​​(χ 2 theoretical), where ν = N 1 is the number of degrees of freedom, p this is a user-specified confidence level that indicates how much the RNG should satisfy the requirements of a uniform distribution, or p — is the probability that the experimental value of χ 2 exp. will be less than the tabulated (theoretical) χ 2 theoretical. or equal to it.

Table 22.2.
Some percentage points of the χ 2 distribution
p = 1% p = 5% p = 25% p = 50% p = 75% p = 95% p = 99%
ν = 1 0.00016 0.00393 0.1015 0.4549 1.323 3.841 6.635
ν = 2 0.02010 0.1026 0.5754 1.386 2.773 5.991 9.210
ν = 3 0.1148 0.3518 1.213 2.366 4.108 7.815 11.34
ν = 4 0.2971 0.7107 1.923 3.357 5.385 9.488 13.28
ν = 5 0.5543 1.1455 2.675 4.351 6.626 11.07 15.09
ν = 6 0.8721 1.635 3.455 5.348 7.841 12.59 16.81
ν = 7 1.239 2.167 4.255 6.346 9.037 14.07 18.48
ν = 8 1.646 2.733 5.071 7.344 10.22 15.51 20.09
ν = 9 2.088 3.325 5.899 8.343 11.39 16.92 21.67
ν = 10 2.558 3.940 6.737 9.342 12.55 18.31 23.21
ν = 11 3.053 4.575 7.584 10.34 13.70 19.68 24.72
ν = 12 3.571 5.226 8.438 11.34 14.85 21.03 26.22
ν = 15 5.229 7.261 11.04 14.34 18.25 25.00 30.58
ν = 20 8.260 10.85 15.45 19.34 23.83 31.41 37.57
ν = 30 14.95 18.49 24.48 29.34 34.80 43.77 50.89
ν = 50 29.71 34.76 42.94 49.33 56.33 67.50 76.15
ν > 30 ν + sqrt(2 ν ) · x p+ 2/3 · x 2 p 2/3 + O(1/sqrt( ν ))
x p = 2.33 1.64 0.674 0.00 0.674 1.64 2.33

Considered acceptable p from 10% to 90%.

If χ 2 exp. much more than χ 2 theory. (that is p is large), then the generator does not satisfy the requirement of uniform distribution, since the observed values n i go too far from theoretical p i · N and cannot be considered random. In other words, such a large confidence interval is established that the restrictions on the numbers become very loose, the requirements on the numbers become weak. In this case, a very large absolute error will be observed.

Even D. Knuth in his book “The Art of Programming” noted that having χ 2 exp. for small ones, in general, it’s also not good, although this seems, at first glance, to be wonderful from the point of view of uniformity. Indeed, take a series of numbers 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, they are ideal from the point of view of uniformity, and χ 2 exp. will be practically zero, but you are unlikely to recognize them as random.

If χ 2 exp. much less than χ 2 theory. (that is p small), then the generator does not satisfy the requirement of a random uniform distribution, since the observed values n i too close to theoretical p i · N and cannot be considered random.

But if χ 2 exp. lies in a certain range between two values ​​of χ 2 theor. , which correspond, for example, p= 25% and p= 50%, then we can assume that the random number values ​​generated by the sensor are completely random.

In addition, it should be borne in mind that all values p i · N must be large enough, for example more than 5 (found empirically). Only then (with a sufficiently large statistical sample) can the experimental conditions be considered satisfactory.

So, the verification procedure is as follows.

Tests for statistical independence

1) Checking for the frequency of occurrence of numbers in the sequence

Let's look at an example. The random number 0.2463389991 consists of the digits 2463389991, and the number 0.5467766618 consists of the digits 5467766618. Connecting the sequences of digits, we have: 24633899915467766618.

It is clear that the theoretical probability p i loss i The th digit (from 0 to 9) is equal to 0.1.

2) Checking the appearance of series of identical numbers

Let us denote by n L number of series of identical digits in a row of length L. Everything needs to be checked L from 1 to m, Where m this is a user-specified number: the maximum occurring number of identical digits in a series.

In the example “24633899915467766618” 2 series of length 2 (33 and 77) were found, that is n 2 = 2 and 2 series of length 3 (999 and 666), that is n 3 = 2 .

The probability of occurrence of a series of length L is equal to: p L= 9 10 L (theoretical). That is, the probability of occurrence of a series one character long is equal to: p 1 = 0.9 (theoretical). The probability of a series of two characters appearing is: p 2 = 0.09 (theoretical). The probability of a series of three characters appearing is: p 3 = 0.009 (theoretical).

For example, the probability of occurrence of a series one character long is p L= 0.9, since there can be only one symbol out of 10, and there are 9 symbols in total (zero does not count). And the probability that two identical symbols “XX” will appear in a row is 0.1 · 0.1 · 9, that is, the probability of 0.1 that the symbol “X” will appear in the first position is multiplied by the probability of 0.1 that the same symbol will appear in the second position “X” and multiplied by the number of such combinations 9.

The frequency of occurrence of series is calculated using the chi-square formula we previously discussed using the values p L .

Note: The generator can be tested multiple times, but the tests are not complete and do not guarantee that the generator produces random numbers. For example, a generator that produces the sequence 12345678912345 will be considered ideal during tests, which is obviously not entirely true.

In conclusion, we note that the third chapter of Donald E. Knuth's book The Art of Programming (Volume 2) is entirely devoted to the study of random numbers. It examines various methods for generating random numbers, statistical tests of randomness, and the conversion of uniformly distributed random numbers to other types of random variables. More than two hundred pages are devoted to the presentation of this material.

Every person, regardless of the degree of gambling and adventurism, has, one way or another, encountered such a concept as a lottery. And only a few asked themselves how the random distribution of winning combinations of numbers occurs. How does this or that number come out? What makes the scale tip towards the winner? Let's look at this in detail.

We have all encountered such a phenomenon as a lottery at least once in our lives. But few people thought or imagined exactly how this system works, what a number generator for a lottery is and what its operating principle is.

The concept of a number generator

A random number generator for a lottery is a certain device or a given program that produces numbers located in a designated interval in a random (more correctly, pseudo-random) order. For a certain type of lottery, for example, "Sportloto", numbers are generated that are in the range from 1 to 49.

There are hardware and software number generators for the lottery. Any programming language has the RAND() function; it is responsible for producing pseudo-random numbers in a given range.

Why is it stated that the results given are pseudo-random and that the lottery number generator works exactly on this principle?

RAND function: concept and method of use

The RAND() function is a program or, for example, a device with a deterministic algorithm that, under the same specified conditions, will constantly show the same results. But in order for the conditions of a true random sequence to be met, there must be no dependence on the initial conditions or parameters. Therefore, to avoid such cases, a special RANDOMIZE procedure is additionally used, which removes the predictability of the initial conditions, making them random.

In addition to the generation principle already known to us, another type of lottery generator is used. Let's look at it below.

Number generator 6 out of 45

Number generator for lottery 6 out of 45 - a program that is used for the purpose of obtaining lucky numbers. At the same time, it is possible to set additional parameters to obtain a better result.

You can specify selection criteria, for example:

  • The number of winning numbers to be obtained in the final result.
  • Indicate the range of numbers in which the selection will be carried out.
  • Numbers can be sorted in either ascending or descending order.
  • Select the type and method of separation.
  • Eliminate duplicates or leave the selection unsorted.
  • Copy the link to the result obtained and post it on a page on social networks in order to publish the result.

Number generator: instructions for use

  • The default output is five numbers. By changing the settings, you can get up to 250 random winning combinations.
  • We set the range, the standard is from 0 to 36, but you can specify a maximum of up to 9,999,999,999.
  • We select the sorting required for our type of lottery: ascending, descending, or placing the numbers in random order.
  • The next step is to indicate how the numbers will be separated from each other - comma, period, space, semicolon.
  • We get rid of random repetitions that arose during the sampling process.

In this way, we get high-quality selected numbers that can be the luckiest and winning ones.

Many lottery participants do not want to spend time selecting a winning combination and filling out a lottery ticket.

To help them, most specialized lottery sites offer a very convenient “Automatic Dial” feature. Today we will tell you what it is and how it works.

"Automatic Dialing"

This function is a classic random number generator, invented since the founding of the first lottery sites and virtual casinos. More than 70% of buyers of virtual tickets for foreign lotteries choose this absolutely free option.

In addition, you can automatically select not just one winning combination, but several (up to 50). This is very convenient for players who buy a large number of lottery tickets with different rates.

Winning statistics

If you are still in doubt whether to use the “Automatic Dial” function or bother filling out tickets yourself, read on. Reviews of the Euromillions lottery from its winners clearly state that the difference in the methods of filling out the ticket does not in any way affect the participant’s chances. Lottery statistics tell us this, according to which, of the total number of players who used this option on Internet sites, about 70% win. In order not to be unfounded, we will give examples of lucky winners in 2012 who made bets using a computer.

In March 2012, a US couple won a huge jackpot of $218 million in the New York lottery. They did not develop a lottery strategy (read the Gaming Strategies section), but simply used the “Automatic Dial” function.

Winners of the US National Lottery's record-breaking PowerBall drawing, splitting $586 million equally, filled out their tickets using a random number generator.

An elderly lady, who did not want to think about the winning combination, entrusted the selection of numbers to a computer and won 336 million US dollars.

Pros of a random number generator

The first indisputable advantage of using this function is significant time savings. With one click you can place several bets at once for one draw of any foreign lottery.

The second advantage is that it eases the player's mental efforts to create a winning combination. If you are not a numerology fanatic and do not believe in the magic of numbers, believe me, you cannot come up with a better combination of numbers than a computer.

The third fact in favor of “Automatic Dial” is absolutely equal chances of winning the jackpot and other big prizes with lottery tickets filled in with your own hands.

Macroscopic random processes using simple objects such as a die, roulette wheel or coin can be based random number generators. Chaos theory and the theory of unstable dynamical systems can explain the presence of unpredictability in data, and even macroscopic systems completely defined by Newton's equations often have unpredictable output in practice, since it depends on microscopic details of the initial conditions.

By the way, on our website you can generate a random number using the online Random Number Generator.

What is a random number generator and how does it use random physical processes?

Speed ​​of obtaining random numbers, sufficient for applied problems, cannot be provided by devices that are based on macroscopic random processes. The source of noise from which the random bits are extracted is therefore at the heart of modern AGNGs. There are two types of noise sources: those that are of a quantum nature and those that do not use quantum phenomena.

Some natural phenomena, such as the radioactive decay of atoms, are absolutely random and, in principle, cannot be predicted (the Davisson-Germer experiment can be considered one of the first experiments that prove the probabilistic nature of some phenomena), this fact is a consequence of the laws of quantum physics. And from statistical mechanics it follows that each system in its parameters has random fluctuations, if the temperature is not equal to absolute zero.

Complex random number generator.

For AGS, the "gold standard" is some of the quantum mechanical processes, since they are completely random. Using in random number generators phenomena include:

  • Shot noise is the noise that is caused in electrical circuits by the discreteness of electric charge carriers and this term also refers to the noise caused in optical instruments by the discreteness of the light carrier.
  • Spontaneous parametric scattering can also be used in random number generators.
  • Radioactive decay - has the randomness of each of the individual decay events, so it is used as a source of noise. A different number of particles at different time intervals, as a result, hits the receiver (this can be a Geiger counter or a scintillation counter).

It is much easier to detect non-quantum phenomena, but based on them random number generators, then will have a strong dependence on temperature (for example, the amount of thermal noise will be proportional to the ambient temperature). The following processes can be noted among those used in AGNG:

  • Thermal noise in a resistor, which after amplification produces random voltage generator. In particular, the number generator in the Ferranti Mark 1 computer was based on this phenomenon.
  • Atmospheric noise, which is measured by a radio receiver, can also include the reception of particles arriving from space to Earth, registered by the receiver, and their number will be random, at different time intervals.
  • The difference in the speed of clocks is a phenomenon that means that the rates of different clocks will not coincide at all.

To obtain from a physical random process sequence of random bits, then there are several approaches for this. One of them is that the received signal-to-noise is amplified, then filtered and fed to the input of a high-speed voltage comparator to obtain a logical signal. The duration of the comparator states will be random and this allows you to create sequence of random numbers, taking measurements of these states.

The second approach is that a random signal is applied to the input of an analog-to-digital converter (both special devices and the audio input of a computer can be used), representing a sequence of random numbers, which will result in a digitized signal and at the same time it can be processed in software .

What is a random number generator and what other phenomena does it use?

Using physical random processes random number generators, make it possible to obtain good random numbers, but their production is expensive and relatively difficult (especially for those ANGNs that are based on radioactive decay), but there are other more accessible sources of randomness:

Simple random number generation.

The work of digital video cameras that use the recording of macroscopic phenomena should be classified as the most unusual generators. For example, to generate random numbers, a team from Silicon Graphics used video footage of a lava lamp because the wax chaotically changes its shape in the lamp. Streams from a fan in the air stream or bubbles in an aquarium can also be used as a subject for photography.

Every day, more and more people are interested in online casinos. For some, these games are simply entertainment, while others consider them a means of earning money. Probably each of the players will be interested in how the random number generator works, which produces lucky combinations.

Slot machine device

Modern slot machines http://igrat-avtomati-wulcan.com are distinguished by a rather complex algorithm that produces winning combinations. It can be divided into parts: Sensors in the form of generators, a counter that accepts payment and gives out winnings, a cumulative system for large prizes in the form of a jackpot, an algorithm in the form of a kernel for issuing winnings. These Algorithms are formed into a mechanical structure in the form of slots or roulette.

Sensor of random combinations and numbers. (RNG)

Now we can describe the operation of the RNG itself. Such sensors were developed with the intention of making the game as unpredictable as possible. This scheme works due to an equally probable factor, for example, it stops the ball in different holes on the roulette wheel. With slots, the system works exactly the same, only it stops the symbols.

In a modern gaming slot, the developer can install more than one RNG. If we take the example of the game three sevens, there may be several sensors for individual combinations, as well as a separate type of sensor for stopping the numbers of a digital wheel or reel.

In Games like Polka Miracles, sensors are installed to stop the numbers in the game, as well as sensors that calculate the time interval of each game and record the transition to other playing fields. The use of more than one sensor is intended to reduce the number of random wins. Also, for large prizes in the form of Jackpots, separate sensors are usually installed, which produce a winning combination by chance, which cannot be calculated.

If we consider a random number generator from a mathematical point of view, it is impossible to calculate its operation using various formulas. However, if you take into account an already winning situation, and carry out calculations from the beginning of one game to the end, then you can still write the formula. It is sad that after the jackpot is issued, the generation of numbers will continue according to a new formula, which will be known only by the outcome of the game.

There is also an opinion that the owner of the machine can configure the sensor settings in such a way that each winning slot will appear, conditionally, every 300 or 500 games, however, the owner himself cannot know exactly how many derived algorithms will result in an exact win. But the fact that the sensors are adjustable is a fact. In order to avoid a conflict of interest, they install not one sensor, but several, otherwise the owner of the gambling house would always remain in the black, and otherwise the sensor could be figured out by any skilled person and clear the casino cash register in an almost legal way.

The principle of operation of the random number generator is known for its unpredictability, however, it is at least somewhat amenable to analysis, but coupled with a couple more sensors, everything becomes much more confusing, which makes the casino a gambling success, which is why it is extremely popular all over the world.