1 \documentclass[a4paper,notitlepage,11pt]{article}
3 %\usepackage[latin1]{inputenc}
4 \usepackage[utf8]{inputenc}
5 \usepackage[T1]{fontenc}
6 \usepackage[english]{babel}
8 \usepackage{amsmath,amssymb,amsthm,amstext,latexsym,eufrak,euscript}
9 \usepackage{subfigure,pstricks,pst-node,pst-coil}
14 \usepackage{algorithm2e}
15 %\usepackage[font=footnotesize]{subfig}
34 \newcommand{\JFC}[1]{\begin{color}{green}\textit{}\end{color}}
35 \newcommand{\CG}[1]{\begin{color}{blue}\textit{}\end{color}}
36 \newcommand{\tv}[1] {\lVert #1 \rVert_{\rm TV}}
40 \newtheorem*{xpl}{Running example}
41 \newtheorem{theorem}{Theorem}
45 \newcommand{\vectornorm}[1]{\ensuremath{\left|\left|#1\right|\right|_2}}
46 \newcommand{\ie}{\textit{i.e.}}
47 \newcommand{\Nats}[0]{\ensuremath{\mathbb{N}}}
48 \newcommand{\Reels}[0]{\ensuremath{\mathbb{R}}}
49 \newcommand{\Bool}[0]{\ensuremath{\mathds{B}}}
50 \newcommand{\rel}[0]{\ensuremath{{\mathcal{R}}}}
51 \newcommand{\Gall}[0]{\ensuremath{\mathcal{G}}}
54 %\usepackage[frenchb]{babel} % UNCOMMENT IF YOU ARE WRITING IN FRENCH
55 \usepackage[lmargin=2.5cm, rmargin=2.5cm,bottom=2.5cm,top=2.5cm]{geometry}
58 \author{J.-F. Couchot, P.-C. Heam, C. Guyeux, Q. Wang, and J. M. Bahi\\
59 FEMTO-ST Institute, University of Franche-Comt\'{e}, France\\
60 College of Automation, Guangdong University of Technology, China\\
61 \{jean-francois.couchot,pierre-cyrille.heam,christophe.guyeux,\\jacques.bahi\}@univ-fcomte.fr,
62 \\wangqianxue@gdut.edu.cn
67 \title {Traversing a $n$-cube without Balanced Hamiltonian Cycle \\
68 to Generate Pseudorandom Numbers}
73 \setlength{\parindent}{0pt}
74 \setlength{\parskip}{1ex plus 0.5ex minus 0.2ex}
78 \thispagestyle{empty} % Necessary in order for pagestyle{empty} to work
82 %\keywords{Pseudorandom Number Generator, Theory of Chaos, Markov Matrices, Hamiltonian Paths, Mixing Time, Gray Codes, Statistical Tests}
86 This article presents a new class
87 of Pseudorandom Number Generators.
88 The generators are based on traversing a $n$-cube where
89 a Balanced Hamiltonian Cycle has been removed. The construction of such generators is automatic for small number of bits, but remains an open problem when this
90 number becomes large. A running example is used throughout the paper. Finally, first statistical experiments of these generators are presented, they show how efficient and promising the proposed approach seems.
98 \section{{Introduction}}
99 Many fields of research or applications like numerical simulations,
100 stochastic optimization, or information security are highly dependent on
101 the use of fast and unbiased random number generators. Depending on the
102 targeted application, reproducibility must be either required, leading
103 to deterministic algorithms that produce numbers as close as possible
104 to random sequences, or refused, which implies to use an external
105 physical noise. The former are called pseudorandom number generators
106 (PRNGs) while the latter are designed by truly random number generators (TRNGs).
107 TRNGs are used for instance in cypher keys generation, or in hardware based
108 simulations or security devices. Such TRNGs are often based on a chaotic
109 physical signal, may be quantized depending on the application.
110 This quantization however raises the problem of the degradation of chaotic
113 The use of PRNGs, for its part, is a necessity in a large variety
114 of numerical simulations, in which
115 responses of devices under study must be compared using the same ``random''
116 stream. This reproducibility is required too for symmetric encryption like
117 one-time pad, as sender and receiver must share the same pad. However, in
118 that situation, security of the pseudorandom stream must be mathematically
119 proven: an attacker must not be able to computationally distinguish a
120 pseudorandom sequence generated by the considered PRNG with a really random
121 one. Such cryptographically secure pseudorandom number generators are
122 however only useful in cryptographic contexts, due to their slowness
123 resulting from their security.
126 Other kind of properties are desired for PRNGs used in numerical simulations
127 or in programs that embed a Monte-Carlo algorithm. In these situations,
128 required properties are speed and random-like profiles of the generated
129 sequences. The fact that a given PRNG is unbiased and behaves as a white
130 noise is thus verified using batteries of statistical tests on a large amount
131 of pseudorandom numbers. Reputed and up-to-date batteries are
132 currently the NIST suite~\cite{Nist10}, and DieHARD~\cite{Marsaglia1996}.
133 Finally, chaotic properties can be desired when
134 simulating a chaotic physical phenomenon or in hardware security, in
135 which cryptographical proofs are not realizable.
136 In both truly and pseudorandom number generation, there is thus a need
137 to mathematically guarantee the presence of chaos, and to show that
138 a post-treatment on a given secure and/or unbiased generator can be realized,
139 which adds chaos without deflating these desired properties.
142 This work takes place in this domain with the desire of automatically
143 generating a large class of PRNGs with chaos and statistical properties.
144 In a sense, it is close to~\cite{BCGR11} where the authors shown that
145 some Boolean maps may be embedded into an algorithm to provide a PRNG that has both
146 the theoretical Devaney's chaos property and the practical
147 property of succeeding NIST statistical battery of tests.
148 To achieve this, it has been proven in
149 this article that it is sufficient
150 for the iteration graph to be strongly connected,
151 and it is necessary and sufficient for its Markov probability matrix to be doubly stochastic.
152 However, they do not purpose conditions
153 to provide such Boolean maps.
154 Admittedly, sufficient conditions
155 to retrieve Boolean maps whose graphs are
156 strongly connected are given, but it remains to further filter those whose
157 Markov matrix is doubly stochastic.
158 This approach suffers from delaying the second requirement to a final step
159 whereas this is a necessary condition.
160 In this position article, we provide a completely new approach
161 to generate Boolean functions, whose Markov matrix is doubly stochastic and whose
162 graph of iterations is strongly connected.
163 Furthermore the rate of convergence is always taken into consideration to provide
164 PRNG with good statistical properties.
166 This research work is organized as follows.
167 It firstly recall some preliminaries that make the document self-contained (Section~\ref{sec:preliminaries}),
168 The next section (Section~\ref{sec:DSSC}) shows how the
169 problem of finding some kind of matrices is moved into the graph theory.
170 Section~\ref{sec:hamiltonian} is the strongest contribution of this work.
171 It presents the main algorithm to generate Boolean maps with all the required properties and
172 proves that such a construction is correct.
173 Statistical evaluations are then summarized in Section~\ref{sec:exp}.
174 Conclusive remarks, open problems, and perspectives are
179 \section{{Preliminaries}}\label{sec:preliminaries}
181 In what follows, we consider the Boolean algebra on the set
182 $\Bool=\{0,1\}$ with the classical operators of conjunction '.',
183 of disjunction '+', of negation '$\overline{~}$', and of
184 disjunctive union $\oplus$.
185 Let $n$ be a positive integer. A {\emph{Boolean map} $f$ is
186 a function from the Boolean domain
189 $x=(x_1,\dots,x_n)$ maps to $f(x)=(f_1(x),\dots,f_n(x))$.
190 Functions are iterated as follows.
191 At the $t^{th}$ iteration, only the $s_{t}-$th component is
192 ``iterated'', where $s = \left(s_t\right)_{t \in \mathds{N}}$ is a sequence of indices taken in $\llbracket 1;n \rrbracket$ called ``strategy''. Formally,
193 let $F_f: \llbracket1;n\rrbracket\times \Bool^{n}$ to $\Bool^n$ be defined by
195 F_f(i,x)=(x_1,\dots,x_{i-1},f_i(x),x_{i+1},\dots,x_n).
197 Then, let $x^0\in\Bool^n$ be an initial configuration
199 \llbracket1;n\rrbracket^\Nats$ be a strategy,
200 the dynamics are described by the recurrence
201 \begin{equation}\label{eq:asyn}
202 x^{t+1}=F_f(s_t,x^t).
206 Let be given a Boolean map $f$. Its associated
207 {\emph{iteration graph}} $\Gamma(f)$ is the
208 directed graph such that the set of vertices is
209 $\Bool^n$, and for all $x\in\Bool^n$ and $i\in \llbracket1;n\rrbracket$,
210 the graph $\Gamma(f)$ contains an arc from $x$ to $F_f(i,x)$.
213 It is easy to associate a Markov Matrix $M$ to such a graph $G(f)$
215 $M_{ij} = \frac{1}{n}$ if there is an edge from $i$ to $j$ in $\Gamma(f)$ and $i \neq j$; $M_{ii} = 1 - \sum\limits_{j=1, j\neq i}^n M_{ij}$; and $M_{ij} = 0$ otherwise.
218 Let us consider for instance $n=3$. Let
219 $f^*: \Bool^3 \rightarrow \Bool^3$ be defined by
220 $f^*(x_1,x_2,x_3)=(x_2 \oplus x_3, x_1 \oplus \overline{x_3},\overline{x_3})$.
221 The iteration graph $\Gamma(f^*)$ of this function is given in
222 Figure~\ref{fig:iteration:f*} and its Markov matrix is given
223 in Figure~\ref{fig:markov:f*}.
228 \subfigure[Iteration Graph $\Gamma(f^*)$ of the function $f^*$\label{fig:iteration:f*}]{
229 \begin{minipage}{0.3\textwidth}
230 \includegraphics[scale=0.5]{iter_f0b.eps}%
234 \subfigure[Markov matrix associated to the function $f^*$\label{fig:markov:f*}]{%
235 \begin{minipage}{0.3\textwidth}
239 \begin{array}{llllllll}
240 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 \\
241 1 & 1 & 0 & 0 & 0 & 1 & 0 & 0 \\
242 0 & 0 & 1 & 1 & 0 & 0 & 1 & 0 \\
243 0 & 1 & 1 & 1 & 0 & 0 & 0 & 0 \\
244 1 & 0 & 0 & 0 & 1 & 1 & 0 & 0 \\
245 0 & 0 & 0 & 0 & 1 & 1 & 0 & 1 \\
246 0 & 0 & 0 & 0 & 1 & 0 & 1 & 1 \\
247 0 & 0 & 0 & 1 & 0 & 0 & 1 & 1
254 \caption{Representations of $f^*(x_1,x_2,x_3)=(x_2 \oplus x_3, x_1 \oplus \overline{x_3},\overline{x_3})$.}\label{fig1}
259 The \emph{mixing time}~\cite{LevinPeresWilmer2006} is one of the usual metrics
260 that gives how far the rows of a Markov matrix
261 converge to a specific distribution.
262 It defines the smallest iteration number
263 that is sufficient to obtain a deviation lesser than a given $\varepsilon$
264 for each rows of such kind of matrices.
266 Let us finally present the pseudorandom number generator $\chi_{\textit{14Secrypt}}$
267 which is based on random walks in $\Gamma(f)$.
268 More precisely, let be given a Boolean map $f:\Bool^n \rightarrow \Bool^n$,
269 a PRNG \textit{Random},
270 an integer $b$ that corresponds to an awaited mixing time, and
271 an initial configuration $x^0$.
272 Starting from $x^0$, the algorithm repeats $b$ times
273 a random choice of which edge to follow and traverses this edge.
274 The final configuration is thus outputted.
275 This PRNG is formalized in Algorithm~\ref{CI Algorithm} further denoted
276 as $\chi_{\textit{14Secrypt}}$.
281 \begin{algorithm}[ht]
283 %\JFC{Mettre ceci dans une boite flottante}
284 \KwIn{a function $f$, an iteration number $b$, an initial configuration $x^0$ ($n$ bits)}
285 \KwOut{a configuration $x$ ($n$ bits)}
287 \For{$i=0,\dots,b-1$}
289 $s\leftarrow{\textit{Random}(n)}$\;
290 $x\leftarrow{F_f(s,x)}$\;
294 \caption{Pseudo Code of the $\chi_{\textit{14Secrypt}}$ PRNG}
299 % This PRNG is a particularized version of Algorithm given in~\cite{BCGR11}.
300 % Compared to this latter, the length of the random
301 % walk of our algorithm is always constant (and is equal to $b$) whereas it
302 % was given by a second PRNG in this latter.
303 % However, all the theoretical results that are given in~\cite{BCGR11} remain
304 % true since the proofs do not rely on this fact.
305 % Let us recall the following theorem.
309 Let $f: \Bool^{n} \rightarrow \Bool^{n}$.
310 It has been shown~\cite[Th. 4, p. 135]{BCGR11}} that
311 if its iteration graph is strongly connected, then
312 the output of $\chi_{\textit{14Secrypt}}$ follows
313 a law that tends to the uniform distribution
314 if and only if its Markov matrix is a doubly stochastic matrix.
317 The next section presents an efficient method to
318 generate Boolean functions
319 with Doubly Stochastic matrix and Strongly Connected iteration graph,
320 further (abusively) denoted as DSSC matrix.
324 \section{{Generation of DSSC Matrices}}\label{sec:DSSC}
325 Finding DSSC matrices can be theoretically handled by
326 Constraint Logic Programming on Finite Domains (CLPFD):
327 all the variables range into finite integer domains with sum and
329 However, this approach suffers from not being efficient enough for
330 large $n$ due to a \emph{generate and test} pattern.
332 Intuitivelly, considering the $n$-cube and
333 removing one outgoing edge and
334 one ongoing edge for each node should be a practical answer
335 to the DSSC matrix finding problem.
336 Moreover, the previous wish of exaclty removing exactly one outgoing
337 and one ongoing edge for each node is solved by removing a
338 Hamiltonian cycle in the $n$-cube. The next section details this step.
342 The iteration graph of $f^*$
343 (given in Figure~\ref{fig:iteration:f*})
344 is the $3$-cube in which the Hamiltonian cycle
345 $000,100,101,001,011,111,110,010,000$
350 \section{{Removing Hamiltonian Cycles}}\label{sec:hamiltonian}
351 The first theoretical section (Section~\ref{sub:removing:theory})
352 shows that this approach produces DSSC matrix,
354 The motivation to focus on balanced Gray code is then given in Sec.~\ref{sub:gray}.
355 We end this section by giving some discussion about practical aspeccts
357 algorithm that aims at computing such codes (Section~\ref{sub:algo:gray}).
359 \subsection{Theoretical Aspects of Removing Hamiltonian Cycles}
360 \label{sub:removing:theory}
361 We first have the following result on stochastic matrix and $n$-cube without
366 The Markov Matrix $M$ resulting from the $n$-cube in
368 cycle is removed, is doubly stochastic.
374 % An Hamiltonian cycle visits each vertex exactly once.
375 % For each vertex $v$ in the $n$-cube,
376 % one ongoing edge $(o,v)$ and one outgoing edge $(v,e)$
379 % Let us consider the Markov matrix $M$ of the $n$-cube.
380 % It is obviously doubly stochastic.
381 % Since we exactly remove one outgoing edge, the value of $M_{ve}$ decreases
382 % from $\frac{1}{n}$ to 0 and
383 % $M_{vv}$ is $\frac{1}{n}$. The $M$ matrix is stochastic again.
384 % Similarly for ongoing edge, since one ongoing edge is dropped for each
385 % vertex, the value of $M_{ov}$ decreases
386 % from $\frac{1}{n}$ to $0$. Moreover, since $M_{vv}$ is $\frac{1}{n}$,
387 % the sum of values in column $v$ is $1$, and $M$ is doubly stochastic.
390 The proof is left as an exercise for the reader.
391 The following result states that the $n$-cube without one
393 has the awaited property with regard to the connectivity.
396 The iteration graph issued from the $n$-cube where an Hamiltonian
397 cycle is removed is strongly connected.
402 % We consider the reverse cycle $r$ of the Hamiltonian cycle $c$.
403 % There is no edge that belongs to both $r$ and $c$: otherwise $c$
404 % would contain one vertex twice. Thus, no edges of $r$ has been removed.
405 % The cycle $r$ is obviously an Hamiltonian cycle and contains all the nodes.
406 % Any node of the $n$-cube where $c$ has been removed can thus reach any node.
407 % The iteration graph is thus strongly connected.
409 Again, the proof is left as an exercise for the reader.
410 Removing an Hamiltonian cycle in the $n$-cube solves thus the DSSC constraint.
411 We are then left to focus on the generation of Hamiltonian cycles in the
412 $n$-cube. Such a problem is equivalent to find cyclic Gray codes, \textit{i.e.},
413 to find a sequence of $2^n$ codewords ($n$-bits strings)
414 where two successive elements differ in only one bit position and
415 and where the last codeword
416 differs in only one bit position from the first one.
417 The next section is dedicated to these codes.
419 \subsection{Linking to Cyclic (Totally) Balanced Gray Codes}\label{sub:gray}
420 % Many research works~\cite{journals/combinatorics/BhatS96,VanSup04,journals/combinatorics/FlahiveB07}
421 % have addressed the subject of finding Gray codes.
423 Let $n$ be a given integer. As far as we know,
424 the exact number of Gray codes in $\Bool^n$ is not known but
425 a lower bound, $\left(\frac{n*\log2}{e \log \log n}*(1 - o(1))\right)^{2^n}$
426 has been given in~\cite{Feder:2009:NTB:1496397.1496515}.
427 For example, when $n$ is $6$, such a number is larger than $10^{13}$.
428 To avoid this combinatorial explosion, we want to
429 restrict the generation to any Gray code
430 such that the induced graph of iteration $\Gamma(f)$ is
431 ``uniform''. In other words, if we count in $\Gamma(f)$
432 the number of edges that modify the bit $i$, for $1 \le i \le n$,
433 all these values have to be close to each other.
434 Such an approach is equivalent to restrict the search of cyclic Gray codes
435 which are uniform too.
437 This notion can be formalized as follows. Let $L = w_1, w_2, \dots, w_{2^n}$ be the sequence
438 of a $n$-bits cyclic Gray code. Let $S = s_1, s_2, \dots, s_{2^n}$ be the
439 transition sequence where $s_i$, $1 \le i \le 2^n$ indicates which bit position changes between
440 codewords at index $i$ and $i+1$ modulo $2^n$.
441 Let $\textit{TC}_n : \{1,\dots, n\} \rightarrow \{0, \ldots, 2^n\}$ the \emph{transition count} function
442 that counts the number of times $i$ occurs in $S$, \textit{i.e.}, the number of times
443 the bit $i$ has been switched in $L$.
444 The Gray code is \emph{totally balanced} if $\textit{TC}_n$ is constant (and equal to $\frac{2^n}{n}$).
445 It is \emph{balanced} if for any two bit indices $i$ and $j$,
446 $|\textit{TC}_n(i) - \textit{TC}_n(j)| \le 2$.
449 Let $L^*=000,100,101,001,011,111,110,010$ be the Gray code that corresponds to
450 the Hamiltonian cycle that has been removed in $f^*$.
451 Its transition sequence is $S=3,1,3,2,3,1,3,2$ and its transition count function is
452 $\textit{TC}_3(1)= \textit{TC}_3(2)=2$ and $\textit{TC}_3(3)=4$. Such a Gray code is balanced.
455 $L^4=0000, 0010, 0110, 1110, 1111, 0111, 0011, 0001, 0101,$
456 $0100, 1100, 1101, 1001, 1011, 1010, 1000$
457 be a cyclic Gray code. Since $S=2,3,4,1,4,3,2,3,1,4,1,3,2,1,2,4$,
458 its transition count $\textit{TC}_4$ is equal to 4 everywhere and this code
459 is thus totally balanced.
460 % On the contrary, for the standard $4$-bits Gray code
461 % $L^{\textit{st}}=0000,0001,0011,0010,0110,0111,0101,0100,1100,$
462 % $1101,1111,1110,1010,1011,1001,1000$,
463 % we have $\textit{TC}_4(1)=8$ $\textit{TC}_4(2)=4$ $\textit{TC}_4(3)=\textit{TC}_4(4)=2$ and
464 % the code is neither balanced nor totally balanced.
467 \subsection{Induction-Based Generation of Balanced Gray Codes}\label{sub:algo:gray}
469 The article~\cite{VanSup04} proposed the ``Construction B'' algorithm to produce Balanced Gray Codes. This method inductively constructs $n$-bits Gray code given a $n-2$-bit Gray code. The authors have proven that
470 $S_{n}$ is transition sequence of a cyclic $n$-bits Gray code
471 if $S_{n-2}$ is. It starts with the transition sequence $S_{n-2}$ of such code
472 and the following first step:
475 Let $l$ be an even positive integer. Find
476 $u_1, u_2, \dots , u_{l-2}, v$ (maybe empty) subsequences of $S_{n-2}$
477 such that $S_{n-2}$ is the concatenation of
479 s_{i_1}, u_0, s_{i_2}, u_1, s_{i_3}, u_2, . . . , s_{i_l-1}, u_{l-2}, s_{i_l}, v
481 where $i_1 = 1$, $i_2 = 2$, and $u_0 = \emptyset$ (the empty sequence).
485 However, this first step is not constructive:
486 it does not precises how to select the subsequences which ensures that
487 yielded Gray code is balanced.
489 Let us now evaluate the number of subsequences $u$
490 than can be produced. Since $s_{i_1}$ and $s_{i_2}$ are well
491 defined, we have to chose the $l-2$ elements of $s_3,s_4,\dots,s_{2^{n-2}}$
492 that become $s_{i_3},\dots, s_{i_l}$. Let $l = 2l'$.
495 \#_n = \sum_{l'=1}^{2^{n-3}} {2^{n-2}-2 \choose 2l'-2}
497 distinct subsequences $u$.
498 Numerical values of $\#_n$ are given in table~\ref{table:combinations}.
499 Even for small values of $n$, it is not reasonable to hope to evaluate the whole
503 \begin{tabular}{|l|l|l|l|l|l|l|l|l|l|}
505 $n$ & 4& 5 & 6 & 7 & 8 \\
508 1& 31 & 8191 & 5.3e8 & 2.3e18 \\
511 1 & 15 & 3003 & 1.4e8 & 4.5e17 \\
515 \caption{Number of distinct $u$ subsequences.}\label{table:combinations}
518 However, it is shown in the article that $\textit{TC}_n(n-1)$ and $\textit{TC}_n(n)$ are
519 equal to $l$. Since this step aims at generating (totally) balanced Gray codes,
520 we have set $l$ to be the largest even integer less or equal than $\frac{2^n}{n}$.
521 This improvement allows to reduce the number of subsequences to study.
522 Examples of such cardinalities are given in Table~\ref{table:combinations} and are referred as
525 Finally, the table~\ref{table:nbFunc} gives the number of non-equivalent functions issued from
526 (totally) balanced Gray codes that can be generated
527 with the approach presented in this article with respect to the number of bits. In other words, it corresponds to the size of the class of generators that can be produced. Notice that when $n$ is 7 and 8, we only give lower bounds for
528 2.5E5 distinct choices for the $u$ subsequence.
532 \begin{tabular}{|l|c|c|c|c|c|}
534 $n$ & 4 & 5 & 6 & 7 & 8 \\
536 nb. of functions & 1 & 2 & 1332 & > 2300 & > 4500 \\
540 \caption{Number of Generators w.r.t. the number of bits.}
545 \section{{Experiments}}\label{sec:exp}
546 We have directly implemented the algorithm given in Figure~\ref{CI Algorithm}.
547 For function $f$ and our experiments $b$ is set
548 with the value given in the fourth column of Table~\ref{table:nc}.
549 % \begin{algorithm}[ht]
550 % %\begin{scriptsize}
551 % \KwIn{a function $f$, an iteration number $b$, an initial configuration $x^0$ ($n$ bits)}
552 % \KwOut{a configuration $x$ ($n$ bits)}
553 % $x\leftarrow x^0$\;
554 % \For{$i=0,\dots,b-1$}
556 % $s\leftarrow{\textit{Random}~mod~n}$\;
557 % $x\leftarrow{(x-(x\&(1<<s))+f(x)\&(1<<s))}$\;
561 % \caption{Pseudo Code of the $\chi_{\textit{14Secrypt}}$ PRNG}
568 \begin{tabular}{|c|l|l|c|}
570 Function $f$ & $f(x)$, for $x$ in $(0,1,2,\hdots,2^n-1)$ & $n$ & $b$ \\
573 $\textcircled{a}$&[13,10,9,14,3,11,1,12,15,4,7,5,2,6,0,8]&4&32\\
576 $\textcircled{b}$& [29, 22, 21, 30, 19, 27, 24, 28, 7, 20, 5, 4, 23, 26, 25, 17, 31, 12, 15, 8, 10, 14, 13, 9, 3, 2, 1, 6, 11, 18, 0, 16] & 5 & 41 \\
579 &[55, 60, 45, 56, 43, 62, 61, 40, 53, 50, 52, 36, 59, 34, 57, 49, 15, 14, 47, 46, 11, 58, 33, 44, 7, 54, 39, 37, 51, 2, 32, 48,
582 63, 26, 25, 30, 19, 27, 17, 28, 31, 20, 23, 21, 18, 22, 16, 24, 13, 12, 29, 8, 10, 42, 41, 0, 5, 38, 4, 6, 35, 3, 9, 1]
586 &[111,94,93,116,122,114,125,88,87,126,119,84,123,98,81,120,109,78,105,110,99,107,104,108,101,
588 & 70,117,96,103,102,113,64,79,30,95,124,83,91,121,24,85,118,69,20,115,90,17,112,77,76,73,12,74, &&\\
589 $\textcircled{d}$&106,72,8,7,6,71,100,75,82,97,0,127,54,57,62,51,59,56,48,53,38,37,60,55,58,33,49,63,44,47,40,42,&7 & 63\\
590 &46,45,41,35,34,39,52,43,50,32,36,29,28,61,92,26,18,89,25,19,86,23,4,27,2,16,80,31,10,15,14,3,11,&&\\
591 &13,9,5,22,21,68,67,66,65,1]
595 &[223,250,249,254,187,234,241,252,183,230,229,180,227,178,240,248,237,236,253,172,251,238,201,&&\\
598 163,242,161,225,215,220,205,216,218,222,221,208,213,210,135,196,199,132,
601 194,130,129,200,159,186,185,190,59,170,177,188,191,246,245,52,243,50,176,184,173,46,189,174,
604 235,42,233,232,231,38,37,228,35,226,33,168,151,156,141,152,
605 154,158,157,144,149,146,148,150,
608 155,147,153,145,175,14,143,204,11,202,169,8,7,198,197,4,195,2,1,192,255,124,109,120,107,126,
611 125,112,103,114,116,100,123,98,121,113,79,106,111,110,75,122,97,108,71,118,117,68,115,66,96,
614 104,127,90,89,94,83,91,81,92,95,84,87,85,82,86,80,88,77,76,93,72,74,78,105,64,69,102,101,70,99,
617 67,73,65,55,60,45,56,51,62,61,48,119,182,181,53,179,54,57,49,15,44,47,40,171,58,9,32,167,6,5,
620 164,3,162,41,160,63,26,25,30,19,27,17,28,31,20,23,21,18,22,16,24,13,10,29,140,43,138,137,12,39,
623 134,133,36,131,34,0,128]&&\\
629 \caption{Functions with DSCC Matrix and smallest MT\label{table:nc}}
633 For each number $n=4,5,6,7,8$ of bits, we have generated
634 the functions according the method
635 given in Section~\ref{sub:algo:gray} .
636 For each $n$, we have then restricted this evaluation to the function
637 whose Markov Matrix has the smallest mixing time. Such functions are
638 given in Table~\ref{table:nc}.
639 In this table, let us consider for instance
640 the function $\textcircled{a}$ from $\Bool^4$ to $\Bool^4$
641 defined by the following images :
642 $[13, 10, 9, 14, 3, 11, 1, 12, 15, 4, 7, 5, 2, 6, 0, 8]$.
643 In other words, the image of $3~(0011)$ by $\textcircled{a}$ is $14~(1110)$: it is obtained as the binary value of the fourth element in the second list
646 Experiments have shown that all the generators pass the NIST and the DieHARD batteries of tests.
650 % \subsection{TestU01}
651 % \label{Subsec:TestU01}
653 % TestU01~\cite{Simard07testu01:a} is a software library that
654 % provides general implementations of the classical statistical tests for
655 % random number generators, as well as several others proposed in the
656 % literature, and some original ones. This library is currently the
657 % most reputed and stringent one for testing the randomness
658 % profile of a given sequence. TestU01 encompasses the NIST and DieHARD
659 % tests suites with 2 batteries specific to hardware based generators
660 % (namely, Rabbit and Alphabit). Its three core batteries of tests are
661 % however SmallCrush, Crush, and BigCrush, classified according to
664 % To date, we can claim after experiments that $\textcircled{a}$
665 % generator is able to pass the 15 tests embedded into the
666 % SmallCrush battery and it succedded too to pass the 144 tests of
667 % the Crush one. BigCrush results on $\textcircled{a}$ are
668 % expected soon, while TestU01 has been launched too on generators
669 % having the other iteration functions detailed in this article.
672 \section{{Conclusion}}\label{sec:conclusion}
673 This article has presented a method to compute a large class of truly chaotic PRNGs.
674 First experiments through the batteries of NIST, and DieHard
675 have shown that the statistical properties are almost established for $n=4,5,6,7,8$.
676 The iterated map inside the generator is built by removing
677 from a $n$-cube an Hamiltonian path that corresponds to a (totally) balanced Gray code.
678 The number of balanced gray code is large and each of them can be
679 considered as a key of the PRNG.
680 However, many problems still remain open, most important ones being listed
683 The first one involves the function to iterate. Producing a DSSC matrix is indeed necessary and sufficient
684 but is not linked with the convergence rate to the uniform distribution.
685 To solve this problem, we have proposed to remove from the $n$-cube an Hamiltonian path that
686 is a (totally) balanced Gray code. We do not have proven that this
687 proposal is the one that minimizes the mixing time. This optimization task is an open problem we plan to study.
689 Secondly, the approach depends on finding (totally) balanced Gray
690 codes. Even if such codes exist for all even numbers, there is no constructive method to built them
691 when $n$ is large, as far as we know. These two open problems will
692 be investigated in a future work.
694 \bibliographystyle{plain}
696 \bibliography{markov}}