Two Improved Pseudo-Random Number Generation Algorithms Based on the Logistic Map

: In this study, we improve the pseudo-random number generation algorithm of Java based on the logistic map. We replace the seed of the random generation algorithm with a sequence of numbers which is generated by the original logistic map and the improved logistic map. And then we describe the two improved algorithms in detail including the essence of two algorithms and the processes. Also we display a series of experiments to prove the improved algorithms have a good randomness and they are efficient. Eventually we conclude our study and list our future study. The two improved pseudo-random number generation algorithms take advantage of the chaotic characteristics of the logistic map which makes it become much more efficient


INTRODUCTION
Nowadays, random numbers are widely used in many fields, like in the cryptography field.Random numbers are generated by the random numbers generator.A random numbers generator is a computational or physical device designed to generate a sequence of numbers or symbols that lack any pattern, i.e., appear random (Wagenaar, 1972;Kanter et al., 2010).The generation process of random bits is becoming increasingly important.Since the use of a truly random generator is very difficult as they are generally slow and may consist of special hardware, the importance of designing efficient pseudo-random generators arise (Zarei et al., 2010).In the following parts, random numbers mean pseudo-random numbers.There are 2 kinds of generation methods, physical methods and computational methods.Physical random number generators always use hardware or some special devices to generate random numbers like dice, coin flipping, roulette wheels.While pseudo-random number generators with computational methods are algorithms that can automatically create long runs of numbers with good random properties but eventually the sequence repeats.The string of values generated by such algorithms is generally determined by a fixed number called a seed (Heam and Nicaud, 2011).In this study we only concern computational pseudo-random number generation algorithms.
In many computer languages, there are pseudorandom number generation algorithms, like the random () in Java and rand () in C++; Even though the randomness of these methods is good, there still a problem.That is efficiency.In other words, the process of generating a pseudo-random number is relatively slow.In this study, we study the random method of Java language.And we figures out how it generates random numbers.Then we improved this pseudorandom number generation algorithm of Java language by using the logistic map.Here the logistic map includes the original logistic map and the improved logistic map.In this study, we firstly improve the pseudo-random number generation algorithm and describe the 2 algorithms in detail.Then we list some experiments to show the randomness and the efficiency of these 2 algorithms.At last, we conclude our study.Step 2: Process this old seed with arithmetic operations and a bitwise operation into a new seed.
Step 3: Next Int method uses the new seed to generate a random number according to some specific operations including bitwise operations.
Take the method of generating an integer number as an example.The process of RMOJ is shown in Fig. 1.
In the process, through step 1 and 2, RMOJ gets a new seed and by using the seed, it can generate a random number.In this 2 steps, an old seed would do a multiply operation, a plus operation and a bitwise and operation.These 2 steps cost much time because of the getting old seed according to the current time and arithmetic operations.There is no doubt that this is the bottleneck of the efficiency problem of RMOJ.If we can find some other faster method to generate a new seed, it would cost less time.
Improved random method of Java by using the logistic map-LRMOJ and ILRMOJ: We call the improved random method of Java by using the original logistic map the LRMOJ and the improved random method of Java by using the improved logistic map the ILRMOJ.
We improve this RMOJ and try to make it more efficient.The core of our idea is to make the sequence of numbers which is generated by the logistic map to be the seeds of generating random numbers.
Chaos is a random movement in definite system.Chaotic system has following characteristics: definite, boundary, sensitivity to initial condition, topology transmission and so on.Chaos structure is complex and difficult to analyze or forecast (Xiao-Jun et al., 2006).The logistic map is a polynomial mapping of degree 2, often used in the study of chaos systems.Through the process of RMOJ, we conclude that generating a seed is the most important phase of the method.And in the 1 st 2 steps of RMOJ is to get a new seed by changing a long type old seed into a new long type seed.Especially in step 2, the old seed must do bitwise and operation and some arithmetic operations which actually would cost much time.If we want to make it much more efficient, we have to find a way to solve this time consuming problem of 1 st 2 steps.Meanwhile we must make the method as random as RMOJ.Based on the chaotic characteristics of the logistic map, we decide to use the logistic map sequence as seeds.
The logistic map can mathematically be described as Eq.(1): This equation is a recursive equation.Where X n or X n+1 are decimal ranges between 0 and 1, r is a coefficient which is between 0 and 4. When the r is beyond 3.57, most values appear chaotic behaviors (Persohn and Povinelli, 2012).Here we let X 0 = 0.75, r = 3.935.We replace the new seeds with the sequence of numbers that this logistic map generates.That is to say, we substitute the step 1 and 2 of RMOJ with one single step.In this new step, we use the sequence of the logistic map as new seeds.Obviously the numbers that this logistic map generates are decimals between 0 and 1; we process these decimals into long type integer by amplifying the decimals.And the step 3 and the following processes are the same with RMOJ.And we can get the steps of LRMOJ: Step 1: Get a decimal from the logistic map sequence numbers and amplify the decimal into a long type number as a new seed.
Step 2: Next Int method uses the new seed to generate a random number according to some specific operations including bitwise operations.
In step 2, Next Int method is the method to adapt the new seed to a proper range like integral number which ranges from 0 to 10.In this method, the new seed would be processed by shifts operations.This is a same method RMOJ, LRMOJ and ILRMOJ would use.
Comparing with the 2 steps of RMOJ, the new step of LRMOJ only access one random number in the sequence of the logistic map rather than do a series of operations.The sequence is generated when the method is used first time and the same time the method initiates.And what is important to efficiency, the sequence only is generated once and it would be stored in the memory.When the method needs a new seed, it would access the sequence to get a decimal.
There are many operations to guarantee the chaotic characteristics of the sequence:  First, after studying the logistic map, we find that at the first phase of the recursive process, X n doesn't have a good chaotic characteristic.That is to say when the equation starts, the 1 st amount values of X n are not so random.In order to guarantee the randomness, we cut the 1 st part of sequence, in the experiments; we generated a sequence of 100000 random numbers and started from the 2000 th number. Second, in the method, we defined a variable to be the index of the sequence.From above we can find that when the method initiates, the index points the 2000 th number of the random numbers sequence.And when we access the sequence and get a random number of the sequence, the index would point to the next number of the sequence.When it comes to the end of the sequence, the index would start from the head.Clearly we used the modulo operation to implement this  Third, we use the current time of the system as an initial variable of X n in the equation.After we get the current time, we adapt this long type number into a decimal ranges from 0 to 1 as the X n .and because the X n s are different, the sequences of random numbers which is generated by the logistic map are different.Here we defined a time-out time.
Consequently, when the method is not used, after the time-out time period the method would get an X n based on the current time of the system and generate a brand new sequence of random numbers of the logistic map.This new sequence would substitute the old one.This can be described as the sequence is timely updated.By using these 3 operations, the randomness of the sequence is guaranteed.
Fig. 2: Process of LRMOJ Time cost of the LRMOJ mainly focuses on the generation of the sequence of random numbers; the access process and the sequence update process.From the detailed description we can find the generation of the sequence is done when the method initiates and it is before the random number generation process.Also it is done just once rather than every time.When it comes to the access process, the method would access the sequence in the memory.It is faster comparing with the arithmetic operations and bitwise and operations.The sequence update process is almost the same with the generation of the sequence and it would be used less if the user doesn't want to generate too many numbers.Comparing with the RMOJ, we deduce that LRMOJ is faster and much more efficient.The process of LRMOJ is described in Fig. 2.
The logistic map we mentioned is the original logistic map.Even though it is widely used but the original logistic map also has many drawbacks.It mainly has 2 obvious drawbacks.The 1 st is the islands of stability problem.In the logistic map, when r is greater than 3.57, there are still certain isolated ranges of r that show non-chaotic behaviors; these are sometimes called islands of stability.Obviously if the numbers are generated in the islands of stability, these numbers are not chaotic or not random.This drawback sometimes can affect the chaotic features of the logistic map.The 2 nd problem is the values of generated X n+1 is no uniform statistics th no uniform than others many kind one.It is E is another according t X n+1 = (k Throu this impro islands of and unifo Eq. ( 2), mo to 1, actua map.
We ca ILRMOJ, improved l as followed Step 1: Ge seq a lo Step 2: Ne ran ope In the comparison Fig. 3 And we can tell from Fig. 4, the LRMOJ is around 900000 ns around 358 th experiment and it is around 600000 ns around 610 th experiment.That means this method is not stable in some experiments.Sometimes the time is way too much longer than the average value.While the ILRMOJ and RMOJ don't have this situations.That means these 2 methods are much more stable than the LRMOJ.

Experiments summary:
We improved the random method of Java with using the logistic map.Briefly, we change the seed of the random method of Java to the sequence numbers which are generated by the logistic map.Here the logistic map includes the original logistic map and the improved logistic map.In this way, we simplify the process of generating new seed and substitute the arithmetic operations and bitwise operations with access the sequence of numbers which are generated by the logistic map.
Obviously we concluded that the efficiency of the LRMOJ and ILRMOJ is way much better than the RMOJ.And the efficiency of ILRMOJ is better than LRMOJ's.
In conclusion, the LRMOJ, RMOJ and ILRMOJ almost have the same randomness.But the efficiency of the LRMOJ and ILRMOJ is much better.And ILRMOJ is the best.

CONCLUSION
Through the experiments, we concluded that the RMOJ, LRMOJ and the ILRMOJ almost have the same randomness.But the efficiency of the LRMOJ and ILRMOJ is much better; the efficiency of the ILRMOJ is the best.According to the results of experiments, these two improved random methods are of good quality and good efficiency.As for generating random numbers by algorithm, these 2 improved methods have many advantages.Because there are more and more researches and experiments which need to use random method to generate random numbers like in cryptography field, image processing and so on, we are sure that they can be widely used and make contributions.
On one hand, after generating the sequence of numbers with the logistic map, we store the sequence of numbers to the memory, which takes relatively much memory.In the future, we are about to find a better solution.And no matter which method of these three methods, after generating the new seed, a same method Next Int would be used.And we are about to study this shifts operations method deeply and find whether we can find a better method to replace it in order to make this method much more efficient.
On the other hand, we only improved the random method of Java.Because of the chaotic properties of the logistic map, we may apply the logistic map to other more random number generation algorithms.Even though through the frequency test, we concluded that the 3 algorithms had almost the same randomness, we need a series of deliberate tests to make the conclusion much more persuasive.