Description

Implementation and Analysis of the Lattice Structure Formed by Two New Combinations of Random Number Generators

All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.

Related Documents

Share

Transcript

Implementation and Analysis of the Lattice Structure Formed by Two New Combinations of Random Number GeneratorsA.Pragna, Darshika Dixit, C.Gayathri, Pallavi Agrawal, Joydip Dhar Journal of Convergence Information Technology, Volume 6, Number 1. January 2011
Implementation and Analysis of the Lattice Structure Formed by TwoNew Combinations of Random Number Generators
A.Pragna, Darshika Dixit, C.Gayathri, Pallavi Agrawal, Joydip Dhar*
Department of Information Technology, ABV-Indian Institute of Information Technology and Management,Gwalior-474010, M.P., INDIA pragna.atcha@students.iiitm.ac.in, ipg_200627@students.iiitm.ac.in,ipg_200624@students.iiitm.ac.in, a.pallavi@students.iiitm.ac.in, * jdhar@iiitm.ac.in
doi:10.4156/jcit.vol6. issue1.34
Abstract
Random number generators are used in various applications such as cryptography, games, statisticsand simulation. Based on the application, generators with required properties are chosen. Propertiesmay include the lattice structure, period length etc. Linear generators have high regular structure ascompared to non linear generators. The latter are slower and computationally more complex. In this paper, we propose new generators which are combinations of two existing linear generators.We also perform analysis on the lattice structure of the components and the combination. It is found that the combination has more random structure as compared to its components.
Keywords
:
Random Numbers, Lattice, Generators, Combined Generators
1. Introduction
RNG can be defined as any computational device or software that produces sequence of randomnumbers, i.e., they do not follow any particular pattern [4,6]. In other words, it could be said that thesucceeding terms in a sequence are unpredictable. These numbers should behave similar to realizationsof independent, identically distributed random variables.These randomly generated numbers find relevance in various computing applications enlisted below:1.
Simulation,2.
Sampling,3.
Numerical analysis,4.
AI algorithms like genetic algorithms and automated opponents,5.
Cryptography algorithms,6.
Random game content and level generation.The degree or measure of randomness of various generators varies with the kind of techniqueemployed. Depending upon the extent of randomness, these generators can be classified broadly asTrue RNGs and Pseudo RNGs (or Quasi – random number generators). This paper is based entirely onthe analysis of pseudo random number generators.
1.1. Pseudo random number generators
Pseudo RNGs or Quasi – random number generators are the generators which create the sequence of numbers through a deterministic algorithm. Linear Congruential Generators, Lagged FibonacciGenerators, Linear Feedback Shift Registers, Feedback With Carry Shift Registers and GeneralizedFeedback Shift Registers are a few PRNGs. Recent instances include Blum Blum Shub, Fortuna, andthe Mersenne twister.PRNG generates a series of numbers which are apparently random in nature. The sequence is nottruly random as it is completely determined by a relatively small set of initial values, called thePRNG's state
.
The initial state is called the seed, and selecting a good seed for a given algorithm isoften difficult. Due to the state being finite, the PRNG will repeat at some point, and the period
of a*Corresponding Author
- 289 -
Implementation and Analysis of the Lattice Structure Formed by Two New Combinations of Random Number GeneratorsA.Pragna, Darshika Dixit, C.Gayathri, Pallavi Agrawal, Joydip Dhar
PRNG is how many numbers it can generate before repeating. The maximum possible period of aPRNG using
n
bits could be 2
n
. A noticeable advantage is that with the same initial state, randomsequence can be repeated, which facilitates debugging among other things [4].
1.1.1. Linear congruential generator
One of the most popular methods for generating pseudo random numbers is the linear congruentialgenerator
.
The generator starts with a seed, and repeatedly applying a given recurrence relation to itcreates a sequence of such numbers.The recurrence relation is
mcax x
nn
mod)(
1
,wherem is the modulus 0<m,a is the multiplier 0
≤
a <m,c is the increment 0
≤
c<m,x
0
is the seed 0
≤
x
0
<m.LCG can be represented as LCG[m,a,c,x
0
].If c=0, then it is called as multiplicative linear congruential generator, which is of the form
max x
nn
mod
1
,x
n
is the sequence of random numbers generated. It is the state at step n which belongs toZ
m
={0,1,2……m-1}.The randomness depends on the values of m, a, c and x
0 .
In order to obtain asequence of random number in the interval [0,1),
we can define the output at step n as
m xU
nn
/
.For integer t
≥
1,T
t
is the set of all overlapping t-tuples of successive values of U
n
, from all possible initial seeds. It isequal to the intersection of a lattice L
t
with the t-dimensional unit cube [0, 1)
t
. This implies in particular that all the points of T
t
lie on a relatively small number of equidistant parallel hyper planes [1,7].
2. Analysis
The randomness of a particular random number generator could be determined by analyzing itsstructural properties. Structural properties refer to the characteristics of the pattern formed by plottingthe numbers. When these points are plotted in space, the formation obtained is called the lattice.
2.1. Implementation of combined generators
The generator created is the manipulated version of combined LCG. Here we have taken twodifferent LCGs, such that the period of one LCG is the multiple of the other. The resultant generator can be broadly seen as a combination of the following steps..
Ⅰ
Partitioning:The output generated by the LCG with longer period is partitioned into blocks of size equal to the period of the other generator. The period is taken as a multiple so that the blocks of equal length could be created. It is easier to combine the elements in each block with the corresponding elements of theother generator..
Ⅱ
Combining by Arithmetic operation:
},0|),......({
01
mt nnnt
Z xnU U U T
- 290 -
Implementation and Analysis of the Lattice Structure Formed by Two New Combinations of Random Number GeneratorsA.Pragna, Darshika Dixit, C.Gayathri, Pallavi Agrawal, Joydip Dhar Journal of Convergence Information Technology, Volume 6, Number 1. January 2011
The elements of each block are added with the corresponding elements in the other generator. This process is repeated for each and every block until the entire stream is consumed..
Ⅲ
Normalizing the output:Here normalization is used as the method for manipulating the output so that it is in the desiredrange [0,1).Formula of normalization, commonly used in database management, iswherev = normalized value,v = srcinal value,min and max = minimum and maximum value of the srcinal output respectively,new
min
and new
max
= minimum and maximum value of the normalized output respectively over thedesired range[8].The output values obtained after normalization are plotted and further studied for any pattern.
Example 1
Let us implement the above mentioned procedure by considering generators X and Y mentioned below [4,5]:Generator X : LCG [256,137,187,1] and Generator Y : LCG[2
16
,47485,0,1].The number of blocks in which the output stream of the generator with larger period is divided is 2
16
/ 2
8
=256 blocks. The arithmetic operation used for combining X and Y is addition.From the lattice structures of the generators, it can be observed that the degree of randomness of thecombined generator is more than that of its component generators. The graphs of the individualgenerators show a regular pattern which is undesirable for few applications. This regularity is not foundin the resultant generator, which has a less symmetrical structure.
Example 2
The two component generators used earlier are again manipulated to give a new generator. Let theoutput of generator X be u[i] where i=0,1,….255 and that of Y be t[s] where s=0,1,…2
14
-1.
First t[s] stream is divided into 2
6
blocks of length 256. The i
th
element of every block is raised tothe power u[i], where i varies from 0 to 255.Unlike the previous combined generator, the resultantoutput stream in this case is obtained by using the expression,
,]256[
][
iu
jit
where j varies from 0 to 2
6
-1.
0.2 0.4 0.6 0.8 10.20.40.60.81
Figure 1.
2-D lattice structure of generator X having period length 2
8
,}minmaxmin){(
minminmax
newnewnewvv
- 291 -
Implementation and Analysis of the Lattice Structure Formed by Two New Combinations of Random Number GeneratorsA.Pragna, Darshika Dixit, C.Gayathri, Pallavi Agrawal, Joydip Dhar
0.2 0.4 0.6 0.8 10.20.40.60.81
Figure 2.
2-D lattice structure of generator Y having period 214
0.2 0.4 0.6 0.8 10.20.40.60.81
Figure 3.
2-D lattice structure of combined generator
0.2 0.4 0.6 0.8 10.20.40.60.81
Figure 4.
2-D lattice structure of combined generator
3. Conclusion
- 292 -
Implementation and Analysis of the Lattice Structure Formed by Two New Combinations of Random Number GeneratorsA.Pragna, Darshika Dixit, C.Gayathri, Pallavi Agrawal, Joydip Dhar Journal of Convergence Information Technology, Volume 6, Number 1. January 2011
In this paper, we considered two LCGs and their combinations. The first combination is obtainedusing addition and the second by exponent operation. The generators are analyzed by comparing their lattices. The lattice of the components, depicted in
Figure 1
and
Figure 2
, follow a pattern. Thecombined generator obtained by addition as shown in
Figure 3
has a lattice structure with points moreconcentrated towards the center. The lattice in
Figure 4
of the other combined generator is moreconcentrated at the top right corner.The results showed that combined generators have irregular and asymmetric structure unlike their components. This makes them more apt and effective as a random number generator. Depending uponthe requirements of the application, generators suitable for it could be chosen.Real world applications need generators with larger period which are not considered in this paper due to hardware limitations. Although more operations could be used for combining generators, onlylimited operations are employed here.In addition to observing the lattices to determine the effectiveness of RNGs, other tests could also be applied such as serial tests, spatial tests, spectral tests [2,3,7].
4. References
[1]
P. L’Ecuyer, “Tables of linear congruential generators of different sizes and good latticestructure”, Mathematics of Computation, American Mathematical Society, vol. 68, no. 225, pp. 249-260, 1999.[2]
P. L’Ecuyer, R. Simard, S. Wegenkittl, “Sparse serial tests of uniformity for randomnumber generators”, SIAM Journal on Scientific Computing, Society for Industrial andApplied Mathematics, vol. 24, no. 2, pp. 652-668, 2002.[3]
P. L’Ecuyer, J.-F. Cordeau, R. Simard, “Close-point spatial tests and their application torandom number generators”, Operations Research, INFORMS, vol. 48, no. 2, pp. 308-317,2000.[4]
D. E. Knuth, The Art of Computer Programming Volume 2: Seminumerical Algorithms,Addison-Wesley, USA, 1997.[5]
http://random.mat.sbg.ac.at/~charly/server/node3.html#SECTION00030000000000000000.[6]
P. L’Ecuyer, J. G. Piché, “Combined generators with components from different families”,Mathematics and Computers in Simulation, Elsevier Science Publishers, vol. 62, no. 3-6, pp. 395-404, 2003.[7]
C.–J. Kung, H.-C. Tang, “Criterion of Spectral Test for Linear Congruential Random Number Generators”, Tamkang Journal of Science and Engineering, vol. 12, no. 3, pp.365-369, 2009.[8]
J. Han, M. Kamber, Data Mining: Concepts and Techniques, Morgan Kaufmarm Publishers,USA, 2006.
- 293 -

Search

Similar documents

Tags

Related Search

Design and Analysis of Aerospace Structures /Design and Analysis of Microstrip FiltersEvaluation and Analysis of TextbooksDesign and Analysis of AlgorithmsDesign and Analysis of ExperimentsTheory and Analysis of Western Art MusicModeling, synthesis, and analysis of hybrid sDesign and Analysis of Custom Made ArtificialModeling and Analysis of Gene Expression MechCmetery studies and analysis of mortuary cont

We Need Your Support

Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks

SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...Sign Now!

We are very appreciated for your Prompt Action!

x