1 \documentclass{article}
3 \title{Using complexity of short strings to define new statistical tests for PRNGs}
15 \section{Introduction}
17 \section{Algorithmic complexity for short strings}
19 In their paper, they introduced a method to compute the complexity of $D(n)$.
20 With D(4), 5 970 768 960 machines halt. There are 1832 different strings.
22 \section{Property: a PRNG must preserve the distribution of short strings}
24 In this section, we propose to measure the quality of a PRNG by considering that
25 a good PRNG must preserve the distribution of short strings. More precisely, the
26 pseudo-random numbers obtained by a PRNG can form the states of the Rado's
27 original Busy Beaver. Then, machines obtained by such a construction can be
28 executed and if the PRNG is good, machines should generate the same strings with
29 the same distribution than the theoretical Busy Beaver (with all the enumeration
30 of states). In practice, PRNGs will not generate all the strings with exactly
31 the same probabilities. Nevertheless, the distance between the theoretical
32 probabibilities and the obtained probabilities with a PRNG is a good indication
33 of the quality of the PRNG.
35 In the following we report our experiments. Let $S(n)_i$ be the string number
36 $i$ obtained by the busy beaver $D(n)$, $S(n)$ is the set of strings of
37 $D(n)$. With $D(4)$ there are 1832 strings, so $|S(4)|=1832$. $N_{bb}(S(n)_i)$ is
38 the number of occurrences of the string $S(n)_i$ obtained by the Busy Beaver and $N_{PRNG}(S(n)_i)$ is the
39 number of occurrences of the string $S(n)_i$ obtained with the execution of a given
40 PRNG. In order to measure the distance between the theoretical result and the
41 pratical one, we use this measure:
43 Dist(PRNG,BB)=\sum_{i=1}^{|S(n)|} \frac{|N_{bb}S(n)_i-N_{PRNG}S(n)_i|}{N_{bb}S(n)_i}
46 Here are the result for some PRNGS: bbs, lcg, xor128, rand, xorshift, devrandom,
47 newprng, isaac. These results are reported for experiments with different
48 numbers of random number generation.
52 \begin{tabular}{|l|l|}
54 & Number of experiments\\
56 Name of PRNG & 500,000,000\\
76 \caption{Distance for some PRNG with different number generations in decreasing ordering}
82 \begin{tabular}{|l|l|}
84 & Number of experiments\\
86 Name of PRNG & 500,000,000\\
94 dev random & 1477.99\\
106 \caption{Chi squared for some PRNG with different number generations in decreasing ordering}
111 \begin{tabular}{|l|l|}
113 & Number of experiments\\
115 Name of PRNG & 50,000,000\\
125 dev random & 1190.33\\
135 \caption{Distance for some PRNG with different number generations in decreasing ordering}
140 \begin{tabular}{|l|l|}
142 & Number of experiments\\
144 Name of PRNG & 50,000,000\\
148 xorshift & 14904.91\\
150 new prng & 14711.53\\
152 dev random & 14189.61\\
164 \caption{Chi squared for some PRNG with different number generations in decreasing ordering}