From: Raphael Couturier Date: Thu, 19 Apr 2012 16:14:27 +0000 (+0200) Subject: suite X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/turing4complexity.git/commitdiff_plain/04294db1691e857013d56ff5de268ee122ea7cc6?ds=inline suite --- diff --git a/turing4complexity.tex b/turing4complexity.tex index 2146039..c3898bb 100644 --- a/turing4complexity.tex +++ b/turing4complexity.tex @@ -16,7 +16,7 @@ blabalbabla \section{Algorithmic complexity for short strings} -In their paper, they introduced a method to compute the complexity of D(n). +In their paper, they introduced a method to compute the complexity of $D(n)$. With D(4), 5 970 768 960 machines halt. There are 1832 different strings. \section{Property: a PRNG must preserve the distribution of short strings} @@ -32,11 +32,77 @@ the same probabilities. Nevertheless, the distance between the theoretical probabibilities and the obtained probabilities with a PRNG is a good indication of the quality of the PRNG. -In the following we report our experiments. Let $S_i$ be the string number $i$ -obtained by the busy beaver, $S(n)$ is the set of strings of $D(n)$. With $D(4)$ -there are 1832 strings, so $|S(4)|=1832$. $P_t(S_i)$ is the theoretical -probability of the string $S_i$ and $P_{PRNG}(S_i)$ is the probability of the -string $S_i$ obtained with the execution of a given PRNG. Let For $D(n)$, the -number of strings is +In the following we report our experiments. Let $S(n)_i$ be the string number +$i$ obtained by the busy beaver $D(n)$, $S(n)$ is the set of strings of +$D(n)$. With $D(4)$ there are 1832 strings, so $|S(4)|=1832$. $N_{bb}(S(n)_i)$ is +the number of occurrences of the string $S(n)_i$ obtained by the Busy Beaver and $N_{PRNG}(S(n)_i)$ is the +number of occurrences of the string $S(n)_i$ obtained with the execution of a given +PRNG. In order to measure the distance between the theoretical result and the +pratical one, we use this measure: +\begin{equation} +Dist(PRNG,BB)=\sum_{i=1}^{|S(n)|} \frac{|N_{bb}S(n)_i-N_{PRNG}S(n)_i|}{N_{bb}S(n)_i} +\end{equation} + +Here are the result for some PRNGS: bbs, lcg, xor128, rand, xorshift, devrandom, +newprng, isaac. These results are reported for experiments with different +numbers of random number generation. + + +\begin{table} +\begin{tabular}{|l|l|} +\hline + & Number of experiments\\ +\hline +Name of PRNG & 500000000\\ +\hline +BBS & 358.38\\ +\hline +lcg & 491.78\\ +\hline +xor128 & 380.69\\ +\hline +rand & 382.04\\ +\hline +xorshift & 372.68\\ +\hline +dev random & 376.78\\ +\hline +new prng & 367.42\\ +\hline +isaac & 366.91\\ +\hline +\end{tabular} +\caption{Distance for some PRNG with different number generations} +\end{table} + + +In the following table, we report the same experiment with small occurence strings (i.e. less than 50). +\begin{table} +\begin{tabular}{|l|l|} +\hline + & Number of experiments\\ +\hline +Name of PRNG & 500000000\\ +\hline +BBS & 322.88\\ +\hline +lcg & 435.89\\ +\hline +xor128 & 347.61\\ +\hline +rand & 348.02\\ +\hline +xorshift & 338.33\\ +\hline +dev random & 341.16\\ +\hline +new prng & 335.00\\ +\hline +isaac & 333.39\\ +\hline +\end{tabular} +\caption{Distance for some PRNG with different number generations for small occurrence strings} +\end{table} + \end{document}