MEMBERS
TOOLS
COMPUTER CODE

How to Use the Hybrid Random Number Generator (HRNG)

The objective of this note is to provide guidance on how to use the HRNG correctly. Its theoretical basis can be found in the following article:
Skliar O., Monge R. E., Medina V., Gapper S. and Oviedo G. (2011) A Hybrid Random Number Generator (HRNG), Revista de Matemática: Teoría y Aplicaciones, Vol. 18 (2), pp. 265-297. Users interested in this information may also download this paper from here.

Every time the HRNG is used, it generates seven (7) random numbers. Each number is composed of 10 digits. Each of these ten digits can be one of the following: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. The numbers generated appear in the left-hand column "Random numbers", and a column of "Random bits" appears on the right with the part (that is, the subsequence) of the binary string – mentioned below – used to generate the set of numbers in the left-hand column.

The "raw material" from which the random numbers are obtained is a binary string composed of 18,939,889,249 digits. Each digit can be a zero (0) or a one (1). From a computing perspective, each digit of this binary string corresponds to one bit. Each bit of the binary string is numbered. The first bit of the string is assigned the number 1, the next is assigned the number 2, and so on, such that the last bit of the binary string is assigned the number 18,939,889,249.

Suppose that the user begins a session with the purpose of generating random numbers. If that user does not specify a bit number other than 1 as the first bit of those utilized in the process of generating random numbers, then that first bit will automatically be assigned the number 1. Once the 7 random numbers mentioned above are generated, the number corresponding to the last of the bits used in the process will appear as the "Last bit". If in the same session the user activates the HRNG again, then the "First bit" (the first of the bits used in the new process of generating random numbers) will be the next number after the number corresponding to the "Last bit" of the previous random number generation process, and so on.

If, on the other hand, the user decides to utilize the HRNG in another session to obtain random numbers which will be applied to the same task as those generated in the previous session (such as the simulation of a system displaying probabilistic-type behavior), that user should specify the next number after the "Last bit" of the previous session as the "First bit" of the new session. Thus, for example, if upon finishing a given session using the HRNG, the "Last bit" was 377, in the next session the user would indicate 378 as the "First bit". This prevents undesirable repetitions in the sequences of random numbers.

To specify the number corresponding to "First bit", the user should type only the following digits: 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Thus, for example, to specify the number "one thousand thirty", the user should write "1030", not "1,030". If the user writes symbols that do not correspond to those digits (such as a comma or a period), the HRNG will not generate random numbers, but the space where the "First bit" should be specified will turn pink, as a sign of error. To eliminate the pink color and enable the HRNG, the user should specify the number corresponding to "First bit" as indicated above and click "Generate".

Based on the results obtained, users may produce as many numbers as necessary according to their specific objectives. Suppose, for instance, that a user requires 19 six-digit random numbers. One way to proceed in this case is as follows: The HRNG will be used three times. Therefore, 21 ten-digit random numbers will be generated. Only the first 19 of those random numbers will be taken into consideration. In addition, only the first 6 digits of each of those 19 random numbers will be taken into account. With this procedure, the user will obtain the required set of random numbers.

How does the HRNG work if the bit corresponding to 18,939,889,249 has already been used, and more bits are required to generate still more random numbers? This HRNG was programmed to consider bit 1 as the next bit after 18,939,889,249. It is thus obvious that if for any given task the entire binary string (the "raw material" for the HRNG) has been used, this generator is no longer suitable for the task. In the future, the binary string will be lengthened considerably and the corresponding HRNG will be available for users interested in taking advantage of this facility.

Source: HRNG
First bit:
Last bit:
 
Back to publications