1. Introduction
The multiplication inside a computer does not follow the associative property, that is, for the three different numbers
a,
b, and
c,
. This fact is produced because of using fixed-point arithmetic; the multiplication of two numbers,
, with
i bits in the integer part and
f bits in the factional part, produces a number
. This resulted number must be returned to the same used representation, then the result is shifted
f bits to the right. Moreover, to avoid the increasing size of the bits in the integer part, the number of bits in this part is chosen large enough to keep all the results of the multiplications within
i bits. Fixed-point arithmetic is mostly used in the hardware implementation of chaotic circuits because of its simplicity [
1,
2,
3].
The dynamics of a chaotic system are highly sensitive to small changes in its initial conditions. In this work, a map without fixed points to generate pseudorandom numbers by changing the order in the multiplications is studied, which also produces small changes that are increased by the chaos. In [
4], the authors study the sensitivity of a chaotic system more as a problem. In this work, the sensitivity of a chaotic map is taken as an advantage to generate more maps by changing the order in the multiplications of the map terms.
Random numbers are very important in simulations [
5], video games, in Monte Carlo methods, in cryptography [
6], and in evolutionary algorithms [
7] as the genetic algorithms, because these kind of algorithms can be considered a guided (intelligent) random search.
In the next
Section 2, the chaotic map used and the generation of random sequences are described. In
Section 3, the process to generate new sequences by changing the order of the multiplication is described. In this section, it is also shown that generated sequences are uncorrelated and random. Finally, in
Section 4, the conclusion of this work is given.
2. Chaotic Map
The map nfp1 in [
8] is used in this work. This map is defined as
with parameters values
and
. These parameters values are the suggested in [
8].
The domain of attraction for Equation (
1) is shown in
Figure 1. The gray zone in
Figure 1 represents where the initial values take the shown values on the
x and
y axes, and the maps converge to the behavior shown as the black points. The white zone in
Figure 1 represents where, with the shown initial values, the map’s dynamic behavior is destroyed. Thus, from this figure, it is possible to choose the initial values for
and
within the interval
. Moreover, from
Figure 1, it possible to see that the range of values for
is the interval
and
for
, then 2 bits in the integer part are necessary for the calculations. For the fractional part, we decided to use 61 bits, plus the sign bit, then numbers of 64 bits are used. Then, the initial values can be expressed as the interval
, where
, and
with the used representation. Thus, the possible values for the initial values are
. These values can also be seen as the different possible values for the seed of the pseudorandom number generator (PRNG). A PRNG gives the same output sequence if the same seed is used. A PRNG is a deterministic process that generates a sequence of binary numbers that looks random.
An output binary sequence of 16 bits can be generated by concatenating two iterations of
that is, the last 8 bits of the value of
x variable are consider random. The value of the
y variable cannot be used because it can be obtained easily from the previous values. In Equation (
2) brackets are used due the sequences now being discrete binary values. This same technique was applied in [
9] using a 2D map.
3. Analysis of the Map
The Equation (
1), for the calculation of the
term can be expressed as
where the first term in the right part can be also expressed as the calculation of three terms:
or as
. Each one of these two triplets of terms can be multiplied in three forms as
,
, or
; therefore, with the map in Equation (
1),
different forms of multiplying the terms to obtain
in Equation (
3) are possible. This can be seen as, if three more bits are added to the possible initial values, then now
different initial values could be possible.
As a test of this idea, eight sequences are generated, four sequences with the values shown in
Table 1, and another four sequences with the codes 10, 10, 11, and 12 named as sequences
,
,
, and
. The first number in the code selects between the terms
or
. The second number in the code selects among the three possible forms of multiplying the three previous terms: 0 for
, 1 for
, and 2 for
.
The correlations between the pair of sequences
,
, and
are show in the graph of
Figure 2a; the correlations between the sequences
,
, and
are show in the graph of
Figure 2b. The correlation is calculated with the overlapped pairs of five samples of the sequences. The values of the each of the four nibbles ranging from the most significant to the least significant at the output of the PRNG are used as the samples values.
From
Figure 2, it is possible to see that sequences are uncorrelated if the initial values are change in a single bit (as sequences
and
are generated) or by changing the order of the multiplication around the nibble 10, or 40 bits, except for the correlation of sequences
. This last case, in which the sequence
is calculated with the code 12, is when the term
is calculated as
. If the value of the constant
a in Equation (
1) is changed from 1.78 to 1.7777777, or as
0x38e38e38e38e38e3 in hexadecimal, the correlations change, as shown in
Figure 3.
From
Figure 3, the first 40 bits of each sequence must be discharged to consider them as uncorrelated sequences when the order in the multiplications in the map is changed.
To demonstrate that the generated sequences are random, three tests of TestU01 suite, Rabbit, Alphabit, and BlockAlphabit are applied on 100 sequences of
bits. These tests were designed for bits stored in a file (or a physical device). Rabbit and Alphabit apply 40 and 17 different statistical tests, respectively. BlockAlphabit applies the Alphabit battery of tests repeatedly to a binary file after reordering the bits by blocks of different sizes (with sizes of 2, 4, 8, 16, and 32 bits) [
10]. Applying the TestU01 to the eight generated sequences from
to
gives the results shown in
Table 2. All the sequences passed the tests, except the sequence
. This sequence is generated as the multiplication of the terms
. It looks as though multiplication by the constant
a does not give enough variability to generate a random sequence by obtaining the last 8 bits of each iteration on the map calculation.
As a configuration does not give random sequences, the number of possible initial values is .
Discussing the number of bits used in the number representation, the number of bits in the integer part is clear: they are necessary to perform the calculations of Equation (
1). The number of bits for the fractional part is not so clear: they must be necessary to maintain the map behavior shown in
Figure 1 and to keep a random behavior in the eight less significant bits. The used representation of 64 bits is more precise than real numbers (doubles in C programming language) that have around 52 bits of precision. Lesser bits in the fractional part could keep the map behavior but, at the same time, stop the random behavior of the less significant bits.