1: \documentclass[12pt]{article}
2: \usepackage{graphicx}
3: \usepackage{makeidx,amsfonts,graphicx,amsthm,amsmath}
4: \newtheorem{theorem}{Theorem}{\bfseries}{\rmfamily}
5: \newtheorem{lemma}[theorem]{Lemma}{\bfseries}{\rmfamily}
6: \newtheorem{proposition}[theorem]{Proposition}{\bfseries}{\rmfamily}
7: \newtheorem{corollary}[theorem]{Corollary}{\bfseries}{\rmfamily}
8:
9: \theoremstyle{definition}
10: \newtheorem*{definition}{{Definition}}{\bfseries}{\rmfamily}
11: \newtheorem{conjecture}[theorem]{Conjecture}
12: \newtheorem{algorithm}[theorem]{Algorithm}{\bfseries}{\rmfamily}
13: \newtheorem{algorithm*}{Algorithm}{\bfseries}{\rmfamily}
14:
15: \theoremstyle{remark}
16: \newtheorem*{remark}{{Remark}}{\bfseries}{\rmfamily}
17: \newtheorem*{example}{{Example}}{\bfseries}{\rmfamily}
18:
19: \addtolength{\topmargin}{- 7 mm}
20: \addtolength{\textheight}{ 7 mm}
21:
22: \newcommand{\bt}{\begin{tabular}}
23: \newcommand{\et}{\end{tabular}}
24: \newcommand{\ba}{\begin{array}}
25: \newcommand{\ea}{\end{array}}
26: \newcommand{\bq}{\begin{eqnarray}}
27: \newcommand{\eq}{\end{eqnarray}}
28: \newcommand{\bqa}{\begin{eqnarray*}}
29: \newcommand{\eqa}{\end{eqnarray*}}
30: \newcommand{\ds}{\displaystyle}
31:
32: \def\zz{{\mathbb Z}}
33: \def\nn{{\mathbb N}}
34: \def\ff{{\mathbb F}}
35: \def\fqo{\ff_q^\infty}
36: \def\fqw{\left(\ff_q^M\right)^\infty}
37: \newcommand{\bthm}{\begin{theorem}}
38: \newcommand{\ethm}{\end{theorem}}
39: \newcommand{\bpro}{\begin{proposition}}
40: \newcommand{\epro}{\end{proposition}}
41: \newcommand{\blem}{\begin{lemma}}
42: \newcommand{\elem}{\end{lemma}}
43: \newcommand{\bp}{\begin{proof}}
44: \newcommand{\ep}{\end{proof}}
45: \newcommand{\bcon}{\begin{conjecture}}
46: \newcommand{\econ}{\end{conjecture}}
47: \newcommand{\bcor}{\begin{corollary}}
48: \newcommand{\ecor}{\end{corollary}}
49: \newcommand{\bde}{\begin{definition}}
50: \newcommand{\ede}{\end{definition}}
51: \newcommand{\bexa}{\begin{example}}
52: \newcommand{\eexa}{\end{example}}
53:
54: %\frenchspacing
55:
56: \begin{document}
57:
58: \pagestyle{plain}
59: {\Large
60: {\bf \noindent
61: Towards a General Theory of\\
62: Simultaneous Diophantine Approximation of\\
63: Formal Power Series:\\
64: Linear Complexity of Multisequences\\
65: }
66:
67: \noindent
68: Michael Vielhaber\footnote{
69: Supported by Project FONDECYT 2004, No. 1040975 of CONICYT, Chile}
70: and
71: M\'onica del Pilar Canales Chac\'on\footnotemark[\value{footnote}]\\
72: }
73:
74: \noindent
75: Instituto de Matem\'aticas, Universidad Austral de Chile,\\
76: Casilla 567, Valdivia, Chile\ \
77: {{\rm\{}\tt vielhaber,monicadelpilar{\rm\}}@gmail.com}
78:
79:
80: \begin{abstract}
81:
82: We model the development of the linear complexity of multisequences by
83: a stochastic infinite state machine, the Battery--Discharge--Model,
84: BDM. The states $s\in S$ of the BDM have asymptotic
85: probabilities or mass
86: $\mu_\infty(s)={\cal P}(q,M)^{-1}\cdot q^{-K(s)}$,
87: where $K(s)\in\nn_0$ is
88: the {\it class} of the state $s$, and
89: ${\cal P}(q,M)=\sum_{K\in\nn_0}P_M(K)q^{-K}=\prod_{i=1}^M q^i/(q^i-1)$
90: is the generating function of the number of partitions into at most
91: $M$ parts. We have (for each timestep modulo $M+1$)
92: just $P_M(K)$ states of class $K$.
93:
94: We obtain a closed formula for the asymptotic probability for the
95: {\it linear complexity deviation} $d(n) := L(n)-\lceil n\cdot
96: M/(M+1)\rceil$ with
97: \[\gamma(d)=\Theta\left(q^{-|d|(M+1)}\right),\forall M\in \nn, \forall
98: d\in\zz.\]
99: The precise formula is given in the text.
100: It has been verified numerically for $M=1,\dots,8$, and is
101: conjectured to hold for all $M\in \nn$.
102:
103: From the asymptotic growth (proven for all $M\in\nn$),
104: we infer the Law of the Logarithm for
105: the linear complexity deviation,
106: \[
107: -\liminf_{n\to\infty}\frac{d_a(n)}{\log n}
108: = \frac{1}{(M+1)\log q}
109: =\limsup_{n\to\infty}\frac{d_a(n)}{\log n},
110: \]
111: which immediately yields
112: $\ds\frac{L_a(n)}{n}\to\frac{M}{M+1}$ with measure one,
113: $\forall M\in\nolinebreak\nn,$
114: a result recently shown already by Niederreiter and Wang.
115:
116:
117: {\bf Keywords:} Linear complexity, linear complexity deviation,
118: multi\-sequen\-ce, Battery Discharge Model, isometry.
119:
120: \end{abstract}
121:
122: \newpage
123: \subsection*{1. Linear Complexity of Multisequences}
124:
125: The {\it linear complexity} of a finite string $a\in\ff_q^n$, $L_a(n)$, is the
126: least length of an LFSR (Linear Feedback Shift Register), which
127: produces $a_1,\dots,a_n$ starting with an initial content
128: $a_1,\dots,a_{L_a(n)}$. If all symbols are zero, we set
129: $L_{(0,\dots,0)}(n) = 0$. Also, we put $L_a(0)=0$ for all $a$.
130:
131: An alternative and equivalent definition defines $L_a(n)$ as the
132: length of the shortest
133: recurrence within the $a_i$, {\it i.e.}
134:
135:
136: \[L_a(n) := \min_{1\leq l\leq n}\left(
137: \exists\alpha_1,\dots,\alpha_{l-1}\in\ff_q,
138: \forall 1\leq k\leq n-l\colon
139: a_{k+l}=\sum_{i=1}^{l-1} \alpha_i\cdot a_{k+i}\right).\]
140:
141: Given an infinite sequence $a\in\fqo$, we define $L_a(n)$ as before,
142: taking into account only the finite prefix $a_1,\dots,a_n$. The
143: sequence $\left(L_a(n)\right)_{n\in\nn_0}$ is called the {\it linear complexity
144: profile} of $a$.
145: The diophantine approximation of the generating function
146: $G(a) := \sum_{n=1}^\infty a_nx^{-n}\in \ff_q[[x^{-1}]]$ by a
147: polynomial function with precision at least $k$ that is
148: \[G(a) = \frac{u(x)}{v(x)} + o(x^{-k}),\]
149: requires a polynomial $v(x)$ of degree at least $L_a(k)$, and this
150: length is also sufficient, since $v(x)$ may be chosen as the feedback
151: polynomial of the LFSR producing $a_1,\dots,a_k$.
152:
153: Turning to multisequences $(a_{n,m})_{n\in\nn, 1\leq m\leq M} \in
154: \fqw$, we ask for {\it simultaneously} approximating all $M$ formal
155: power series
156: \[\ff_q[[x^{-1}]]\ni G_m(a) := \sum_{n=1}^\infty a_{n,m}x^{-n}
157: =\frac{u_m(x)}{v(x)} + o(x^{-k}),1\leq m\leq M\]
158: with the {\it same} denominator polynomial $v(x)$, equivalently we
159: search a single LFSR which produces all $M$ sequences with suitable
160: initial contents.
161: The linear complexity profile of $a$ now is defined by
162: $(L_a(n,m))_{n\in\nn_0,1\leq m\leq M}$ (symbol by symbol), and we set
163: $L_a(n) := L_a(n,M)$, when considering only complete
164: columns of all $M$ sequences at the same place $n$, with profile
165: $(L_a(n))_{n\in\nn_0}.$
166:
167: \noindent{\bf
168: The goal of this paper is to characterize the behaviour of $L$
169: as a probability distribution over {\it all}
170: multisequences from $\fqw$.
171: }
172:
173:
174:
175: \subsection*{2. Continued Fraction Expansion:\\
176: Diophantine Approximation of Multisequences}
177:
178: The task of determining the linear complexity profile of {\it one}
179: multi\-se\-quen\-ce from $\fqw$ has been resolved by Dai and
180: Feng \cite{Dai}. Their mSCFA (multi--Strict Continued Fraction
181: Algorithm) computes a sequence
182: \[\left(\left(\frac{u_k^{(n,m)}}{v^{(n,m)}}\right)_{k=1}^M\right)_{(n,m)
183: \in \{1,\dots,M\} \times\nn_0} \]
184: of best simultaneous approximations to $(G_k)$. The order of timesteps is
185: $(n,m) = (0,M),(1,1),(1,2),\dots,(1,M),(2,1),(2,2),\dots$ with
186: $$G_m(a) = \sum_{t\in\nn}a_{m,t}\cdot x^{-t} =
187: \frac{u_m^{(n,m)}(x)}{v^{(n,m)}(x)}+o(x^{-n}),
188: n\in\nn_0, \forall\ 1\leq m\leq M.$$
189:
190: We will denote the degree of $v^{(n,m)}(x)$ by $\deg(n,m)\in\nn_0$,
191: thus the linear complexity profile is
192: $(\deg(n,M))_{n\in\nn_0}= (L_{(G_m,1\leq m\leq M)}(n))_{n\in\nn_0}.$
193:
194: The mSCFA uses $M$ auxiliary degrees $w_1,\dots,w_M\in\nn_0$.
195: The update of these values (and $\deg$) depends on a so--called
196: ``discrepancy'' $\delta(n,m)\in\ff_q$.
197: $\delta(n,m)$ is zero if the current approximation predicts
198: correctly the value $a_{n,m}$, and $\delta(n,m)$ is nonzero otherwise.
199:
200: Furthermore, the polynomials $u_m(x)$ and $v(x)$ are updated,
201: crucial for the mSCFA, but of no importance for our concern, and we
202: omit the respective part of the mSCFA in the program listing:
203:
204:
205: \begin{algorithm}
206: {\tt mSCFA}\\
207: $\deg:=0; w_m:=0,1\leq m\leq M$\\
208: {\tt FOR} $n := 1,2,\dots$\\
209: \hspace*{6 mm} {\tt FOR} $m:=1,\dots,M$\\
210: \hspace*{12 mm} {\tt compute} $\delta(n,m)$\ \ //discrepancy\\
211: \hspace*{12 mm} {\tt IF} $\delta(n,m) = 0$: \{\} // do nothing,
212: \cite[Thm.~2, Case 2a]{Dai}\\
213: \hspace*{12 mm} {\tt IF} $\delta(n,m) \neq 0$ {\tt AND}
214: $n-\deg-w_m\leq 0: \{\}$
215: // \cite[Thm.~2, Case 2c]{Dai}\\
216: \hspace*{12 mm} {\tt IF} $\delta(n,m) \neq 0$ {\tt AND}
217: $n-\deg-w_m > 0$:
218: // \cite[Thm.~2, Case 2b]{Dai}\\
219: \hspace*{18 mm} $\mbox{deg\_copy}:=\deg$\\
220: \hspace*{18 mm} $\deg := n -w_m$\\
221: \hspace*{18 mm} $w_m := n - \mbox{deg\_copy}$\\
222: \hspace*{6 mm} {\tt ENDFOR}\\
223: {\tt ENDFOR}
224: \end{algorithm}
225:
226:
227:
228: \subsection*{3. The Battery--Discharge--Model}
229:
230: This section introduces the Battery--Discharge--Model (BDM), a stochastic
231: infinite state machine or Markov chain, which will serve as a
232: container to memorize the behaviour of $\deg$ in the mSCFA for
233: {\it all} inputs $a\in\fqw$ simultaneously.
234:
235: Since the linear complexity grows approximately like
236: $L_a(n) = \deg(n,M)\approx \left\lceil
237: n\cdot \frac{M}{M+1}\right\rceil$ (exactly, if we had always
238: $\delta(n,m)\neq 0$), and the auxiliary degrees $w_m$ of the mSCFA
239: grow like
240: $w_m\approx\left\lfloor\frac{n}{M+1}\right\rfloor$, we
241: extract the {\it deviation} from this average behaviour as follows:
242: \bde
243: The {\it linear complexity deviation} or degree deviation is
244: \begin{align}
245: d := d_a(n) := \deg - \left\lceil n\cdot\frac{M}{M+1}\right\rceil\in\zz,
246: \end{align}
247: which we call the ``{\it drain}'' value,
248: and the deviation of the auxiliary degrees is
249: \begin{align}
250: b_m := \left\lfloor n\cdot\frac{1}{M+1}
251: \right\rfloor-w_m\in\zz,\ \ \ 1\leq m\leq M,
252: \end{align}
253: which we call the ``{\it battery charges}''.
254: \ede
255:
256: The BDM will assemble all necessary information about the development
257: of $d_a(n)$ with $n\to \infty$ and $a$ running through all of $\fqw$.
258:
259: We establish the behaviour of $d$ and $b_m$ in two steps. First we
260: treat the change of $d,b_m$ when increasing $n$ to $n+1$ in the mSCFA
261: (keeping $\deg, w_m$ fixed for the moment):
262:
263: \bq
264: \deg- \left\lceil (n+1)\cdot\frac{M}{M+1}\right\rceil=\left\{
265: \ba{ll}
266: \deg - \left\lceil n\cdot\frac{M}{M+1}\right\rceil-1,&n \not\equiv M
267: \operatorname{mod} M+1,\\
268: \deg - \left\lceil n\cdot\frac{M}{M+1}\right\rceil, &n \equiv M
269: \operatorname{mod} M+1,\\
270: \ea
271: \right.
272: \eq
273: and
274: \bq
275: \left\lfloor (n+1)\cdot\frac{1}{M+1}\right\rfloor-w_m=\left\{
276: \begin{array}{ll}
277: \left\lfloor n\cdot\frac{1}{M+1} \right\rfloor-w_m,&n \not\equiv M
278: \operatorname{mod} M+1,\\
279: \left\lfloor n\cdot\frac{1}{M+1} \right\rfloor-w_m+1,&n \equiv M
280: \operatorname{mod} M+1.\\
281: \end{array}
282: \right.
283: \eq
284:
285: Hence, by $(3)$ we have to decrease $d$ in all steps (we call this an
286: action $d_-$), except when
287: $n\equiv M \to$
288: $n\equiv 0 \operatorname{mod} (M+1)$,
289: and only here we increase all $M$ battery values $b_m$, by~$(4)$
290: (action $b_+$).
291:
292: With $d(M,0)=b_m(M,0):=0,\forall m$, we obtain the invariant
293: \bq
294: d(n,m) + \left(\sum_{k=1}^M b_k(n,m)\right)+ n\operatorname{mod} (M+1)=0,\ \
295: \forall n\in\nn_0, 1\leq m\leq M
296: \eq
297: for the initial timestep $(n,m)=(M,0)$. Also, by (3) and $(4)$, the
298: actions $d_-$ (increase $n$, decrease $d$) and $b_+$ (decrease $n \mod
299: (M+1) $ by $M$, increase $M$ batteries by $1$ each)
300: do not change the invariant.
301:
302: Now, for $n$ fixed, the $M$ steps of the inner loop of the mSCFA
303: change $w_m$ and $\deg$ only in the case of $\delta(n,m)\neq 0$ and
304: $n-\deg-w_m>0$ that is
305: \[n-\deg-w_m>0\stackrel{(1;2)}{\Longleftrightarrow}
306: n-\left(d+ \left\lceil n\cdot\frac{M}{M+1}\right\rceil\right)
307: -\left( \left\lfloor n\cdot\frac{1}{M+1} \right\rfloor-b_m\right) >0\]
308: $\Longleftrightarrow b_m >d.$
309: In the case $\delta\neq 0$ and $b_m>d$, the new values are (see mSCFA)
310: \bq
311: \deg^+=n-w_m\hspace{2 cm}\mbox{\rm \ and \ }\hspace{2 cm}w_m^+ = n-\deg
312: \eq
313: and thus in terms of the BDM variables:
314: \bqa
315: d^+ \stackrel{(1;6)}{=}
316: (n-w_m) - \left\lceil\frac{n\cdot M}{M+1}\right\rceil
317: \stackrel{(2)}{=}
318: \left\lfloor\frac{n}{M+1}\right\rfloor + b_m
319: - \left\lfloor\frac{n}{M+1}\right\rfloor = b_m
320: \eqa
321: and
322: \bqa
323: b^+_m \stackrel{(2;6)}{=}
324: \left\lfloor\frac{n}{M+1}\right\rfloor - (n - \deg)
325: \stackrel{(1)}{=}
326: -\left\lceil\frac{n\cdot M}{M+1}\right\rceil+ \left(d
327: +\left\lceil\frac{n\cdot M}{M+1}\right\rceil\right)
328: =d,
329: \eqa
330: an interchange of the values $d$ and $b_m$. We say in this case that
331: ``battery $b_m$ {\it discharges} the excess charge into the drain'',
332: and call this behaviour an action ``D'' of battery $b_m$,
333: corresponding to case 2b of \cite[Thm.~2]{Dai}.
334: A discharge does not affect the invariant $(5)$, which is thus valid
335: for all timesteps $(n,m)$.
336:
337:
338:
339: The remaining cases are $b_m>d$, but $\delta=0$, an {\it inhibition}
340: of $b_m$, action ``I'' (case 2a of \cite[Thm.~2]{Dai}),
341: and two actions of do nothing, ``N$_=$'' and
342: ``N$_<$'', distinguishing between $b_m=d$ and $b_m<d$
343: (case 2c and part of case 2a).
344:
345: Since we do not actually compute the discrepancy $\delta$ (in fact,
346: we do not even have a sequence $a$), we have to model the distinction between
347: $\delta=0 $ and $\delta\neq 0$ probabilistically.
348:
349: \begin{proposition}
350: In any given position $(n,m), n\in\nn, 1\leq m\leq M$ of the formal
351: power series,
352: exactly one choice for the next symbol $a_{n,m}$
353: will yield a discrepancy $\delta=0$, all other $q-1$ symbols from $\ff_q$
354: result in some $\delta\neq 0$.
355: \end{proposition}
356:
357: \begin{proof}\
358: The current approximation $u_m^{(n,m)}(x)/v^{(n,m)}(x)$ determines
359: exactly {\it one } approximating coefficient sequence for the $m$--th
360: formal power series $G_m$.
361: The (only) corresponding symbol belongs to $\delta=0$.
362: \end{proof}
363:
364: In fact, for every position
365: $(n,m)$, each discrepancy value $\delta \in\ff_q$
366: occurs exactly once for some $a_{n,m}\in\ff_q$,
367: in other words (see \cite{CV}\cite{VSETA} for $M=1$):
368: \\\\
369: {\bf Fact}
370: \ \
371: {\it The mSCFA induces an isometry on $\fqw$.
372: }
373: \\\\
374: Hence, we can model $\delta=0$ as occurring with
375: probability $1/q$, and $\delta\neq 0$ as having probability $(q-1)/q$.
376:
377:
378: To keep track of the variables $d,b_m$, we define the following state
379: set for the BDM:
380:
381: \bde
382: The augmented state set is
383: \[\overline S := \{s=(b_1,\dots,b_M,d;T,t)\ | \ b_m\in \zz, 1\leq m\leq M;
384: d\in\zz;\hspace*{4 cm}\]
385: \[\hspace*{4 cm}T\in\zz; 1\leq t\leq M+1; d+T+\sum_{m=1}^M b_m=0\},\]
386: where the last condition is the invariant $(5)$. For the BDM, we only
387: use the timesteps $0\leq T\leq M$, and the BDM thus has the state set
388: $$S := \{s\in\overline S\ | \ 0\leq T \leq M\}$$
389: with initial state $s_0:=(0,\dots,0;0,M+1)$.
390: \ede
391:
392: To facilitate notation, we also define
393: $S(T_0,t_0,d_0)=\{s\in S\ | \ T(s)=T_0, t(s)=t_0, d(s)=d_0\}$, and
394: similarly $S(T_0,t_0), S(T_0), \overline S(T_0,t_0,d_0)$.
395:
396: A state stores the values of the batteries and the drain in
397: $b_1,\dots, b_M,d$, the value $T$ corresponds
398: to the time modulo $M+1$ that is $T\equiv n \operatorname{mod} M+1$, and the
399: ``ministeps'' $t=1,\dots,M$ correspond to the update of battery
400: $b_m$ between $t=m$ and $t=m+1$, while $t=M+1\to 1$ corresponds to the updates
401: $d_-,b_+$.
402:
403: The allowed transitions $\alpha$ (action) from a state
404: $s=(b_1,\dots,b_M,d;T,t)$ are
405: $\alpha=d_-$ or $b_+$ for $t=M+1$, and otherwise depend on the relative size
406: of $b_t$ and $d$ ($\alpha\in\{D,I,N_=,N_<\}$).
407: We have $s\stackrel{\alpha}{\longrightarrow} s^+$
408: with the following actions, conditions,
409: nextstates $s^+$, and probabilities:
410:
411: \noindent
412: $
413: \ba{lllc}
414: \alpha&\mbox{condition}&s^+&\mbox{prob.}\\
415: D &b_t>d,t\leq M&(b_1,\dots,b_{t-1},d,b_{t+1},\dots,b_M,b_t;T,t+1)
416: &{q-1}/{q}\\
417: I &b_t>d,t\leq M&(b_1,\dots,b_M,d;T,t+1) &{1}/{q}\\
418: N_=&b_t=d,t\leq M&(b_1,\dots,b_M,d;T,t+1) &1\\
419: N_<&b_t<d,t\leq M&(b_1,\dots,b_M,d;T,t+1) &1\\
420: d_-&T<M,t=M+1&(b_1,\dots,b_M,d-1;T+1,1) &1\\
421: b_+&T=M,t=M+1&(b_1+1,b_2+1,\dots,b_M+1,d;0,1)&1\\
422: \ea
423: $
424:
425:
426: Whenever $b_t > d$, both D and I may occur, leading to two
427: feasible transitions from a given state $s$, whose
428: probabilities sum up to 1.
429:
430: Recall that from $(T,M+1)$ to $(T+1,1)$, the drain $d$ is decremented
431: according to
432: $(3)$ for $T<M$, action ``d$_-$'', and from $(M,M+1)$ to $(0,1)$, the
433: batteries $b_m$ are incremented according to $(4)$, action ``b$_+$''.
434:
435: \bde
436: The {\it state transition matrix} $\cal T$ of the BDM is an infinite
437: stochastic matrix indexed by $s,s'\in S$, and where
438: \[{\cal T}(s,s') =
439: \left\{
440: \ba{ll}
441: 1,
442: &s\stackrel{N_=}{\longrightarrow}s',
443: s\stackrel{N_<}{\longrightarrow}s',
444: s\stackrel{d_-}{\longrightarrow}s',
445: \mbox{\ or\ }
446: s\stackrel{b_+}{\longrightarrow}s',\\
447: (q-1)/q, &s\stackrel{D}{\longrightarrow}s',\\
448: 1/q, &s\stackrel{I}{\longrightarrow}s',\\
449: 0,&\mbox{\rm\ otherwise}.\\
450: \ea
451: \right.\]
452:
453: Every row either includes an ``I'' and a ``D'', or else one of
454: ``N$_=$'', ``N$_<$'', ``d$_-$'', or ``b$_+$''. Reading the feasible
455: transitions backwards, one obtains that a state with $b_t<d$
456: (at $(T,t+1)$) is reached either by a discharge, or by a ``N$_<$'',
457: hence the corresponding column of $s'$ sums up to $\frac{q-1}{q} +1$.
458: Likewise, if $s'$ has $b_t>d$, this may only be the result of an
459: inhibition, hence column sum $1/q$. The cases ``N$_=$'', ``d$_-$'', and
460: ``b$_+$'' all are by themselves the only nonzero entry within a
461: column, which has thus sum 1.
462: \ede
463:
464:
465: In terms of $d,b_m$, we have the following equivalent
466: probabilistic formulation of the mSCFA (timestep $t=M+1$ comes after
467: the {\tt FOR} $m\equiv t$ loop):
468:
469:
470: \begin{algorithm}
471: \noindent {\tt BatteryDischargeModel}\\
472: $d:=0; b_m:=0,1\leq m\leq M$\\
473: $d := d -1$\ // $d_-$\\
474: {\tt FOR} $n := 1,2,\dots$\\
475: \hspace*{6 mm} {\tt FOR} $m:=1,\dots,M$\\
476: \hspace*{12 mm} {\tt IF} $b_m > d$:\\
477: \hspace*{18 mm} {\tt WITH} prob.~$(q-1)/q$:\\
478: \hspace*{24 mm} {\tt swap}$(b_m,d)$ // action $D$\\
479: \hspace*{18 mm} {\tt WITH} prob.~$1/q$:\\
480: \hspace*{24 mm} \{\} // action $I$\\
481: \hspace*{12 mm} {\tt ELSE}\\
482: \hspace*{18 mm} \{\} // action $N_=,N_<$\\
483: \hspace*{12 mm} {\tt ENDIF}\\
484: \hspace*{6 mm} {\tt ENDFOR}\\
485: \hspace*{6 mm} {\tt IF} $n\not\equiv M \operatorname{mod} M+1:$\\
486: \hspace*{12 mm} $d := d -1$\ \ // $ d_-$\\
487: \hspace*{6 mm} {\tt ELSE}\\
488: \hspace*{12 mm} $b_m := b_m + 1, 1\leq m \leq M$\ // $b_+$\\
489: \hspace*{6 mm} {\tt ENDIF}\\
490: {\tt ENDFOR}
491: \end{algorithm}
492:
493:
494:
495:
496: \subsection*{4. Classes of BDM States}
497:
498: The Markov chain BDM will turn out to be strongly concentrated on few states.
499: We define a family of measures $\mu_\tau$ on $S$, indexed by
500: $\tau\in \nn_0$. We start for $\tau=0$ with all mass concentrated on the
501: initial state $s_0$:
502: \[
503: \mu_0(s) = \left\{
504: \ba{ll}
505: 1,&s=s_0=(0,\dots,0;0,M+1)\\
506: 0,&s\neq s_0\\
507: \ea
508: \right.\]
509:
510: For successive timesteps $\tau$, we then put $\mu_{\tau+1}(s') =
511: \mu_\tau(s)$, if
512: $s\stackrel{N_=}{\longrightarrow} s'$,
513: $s\stackrel{d_-}{\longrightarrow} s'$, or
514: $s\stackrel{b_+}{\longrightarrow} s'$.
515: Also, $\mu_{\tau+1}(s') = \frac{1}{q}\mu_\tau(s)$, if
516: $s\stackrel{I}{\longrightarrow} s'$.
517: Finally $\mu_{\tau+1}(s') = \frac{q-1}{q}\mu_\tau(s_1)+\mu_\tau(s_2)$, if
518: $s_1\stackrel{D}{\longrightarrow} s'$ and
519: $s_2\stackrel{N_<}{\longrightarrow} s'$.
520:
521: Put in other words, $\ds \left(\mu_{\tau+1}(s)\right)_{s\in S}
522: = {\cal T} \cdot \left(\mu_{\tau}(s)\right)_{s\in S}.$
523:
524: Be aware that from $\mu_\tau$ to $\mu_{\tau+1}$, we only deal with
525: {\it one} input symbol (or $d_-,b_+$),
526: hence the distribution after reading all $M$ inputs of column $n$ is in
527: fact $\mu_{(M+1)\cdot n}(s)$.
528:
529:
530: \bde
531: We will use repeatedly the ``timesteps''
532: $(T,t)\in\{0,\dots,M\}\times\{1,\dots,M+1\}$ of the BDM, comparing
533: them with linear time $\tau\in\nn_0$. We define:
534: \[(T,t)\equiv \tau :\Longleftrightarrow (T-1)\cdot(M+1) + t
535: \equiv \tau \mod (M+1)^2\]
536: \ede
537:
538:
539: When dealing with the $m$--th symbol in column $n$, the $\tau$--th
540: input symbol, we are in a state
541: with $T(s)\equiv n \mod (M+1)$, $t=m$, and $(T,t)\equiv \tau$.
542:
543:
544: \bpro
545: For every $\tau\in\nn_0$,
546: $$
547: \sum_{s\in S(T_0,t_0)} \mu_\tau(s)=
548: \left\{
549: \ba{ll}
550: 1,&(T_0,t_0)\equiv \tau \\
551: 0,&(T_0,t_0)\not\equiv \tau\\
552: \ea\right.
553: $$
554: \epro
555:
556: \bp
557: By induction on $(T,t)$: Initially ($\tau=0, T=0, t=M+1$), all mass is on
558: $s_0$. Also, every transition goes from states with $(T,t)\equiv \tau$
559: to states with $(T',t')\equiv \tau+1$, carrying over the mass to the
560: new $S(T',t')$.
561: \ep
562:
563: \bde
564: Denote the number of sequence prefixes in $\left(\ff_q^M\right)^n$
565: with linear complexity deviation $d\in \zz$ as $N(n,d;q)$.
566: \ede
567:
568:
569: Since the BDM has been derived from the behaviour of the mSCFA,
570: we obtain
571:
572: \bthm
573: Assume that exactly $N$ of the $q^{M\cdot n}$ sequence prefixes of
574: length $n$ lead to a certain configuration $(\deg, w_1,\dots ,w_M)$ of
575: the mSCFA, and let $b_1,\dots,b_M,d,T$ be derived from $n,\deg, w_m$
576: according to $(1),(2)$, then
577: \[\mu_{(M+1)\cdot n}(b_1,\dots,b_M,d;T,M+1) = \frac{N}{q^{M\cdot n}}\]
578: with $(T,M+1)\equiv (M+1)\cdot n$ that is
579: $T\equiv n\mod (M+1)$.
580: \ethm
581:
582: \bp
583: The theorem is true for $n=0$, $(T,t)=(0,M+1)$
584: with $N=1$, $\deg=d=b_m=w_m=0,\forall
585: m$, starting with the (only) prefix $\varepsilon$, the empty string.
586:
587: From then on, by the construction of the BDM, for $t(s)\leq M$ a transition
588: $s\to s^*$ takes place with probability $\frac{b}{q}$, with $b$ from
589: $\{1,q-1,q\}$, if and only if the mSCFA goes to the state
590: corresponding to $s^*$ for $b$ out of the $q$ possible next symbols
591: $a_{n,m}\in\ff_q$,
592: or, for $t(s)=M+1$, $t(s^*)=1$, corresponding to actions $d_-, b_+$,
593: with probability one, while the mSCFA increases $n$.
594: \ep
595:
596: From this theorem now follows as a corollary the description of
597: $N(n,d;q)$ by the mass distibution on the BDM states
598: (more on finite $n$ in Section 9):
599:
600: \bthm For $n\in\nn_0$ with $(T_0,M+1)\equiv (M+1)\cdot n$,
601: for $d\in \zz$,
602: $$N(n,d;q) = q^{M\cdot n} \times \sum_{s\in S(T_0,M+1,d)}
603: \mu_{(M+1)\cdot n}(s)$$
604: \ethm
605:
606:
607: \bde
608: For a given state $s\in S$, we define its asymptotic measure as
609: \[\mu_\infty(s) := \limsup_{n\to\infty}\mu_n(s)
610: = \lim_{
611: \scriptsize
612: \ba{c}
613: n\to\infty\\
614: n\equiv (T(s),t(s))
615: \ea
616: }\mu_n(s).\]
617: We have $\sum_{s\in S} \mu_\infty(s) = (M+1)^2$, since each $S(T,t)$
618: sums up to 1.
619: \ede
620:
621: We will see that all states satisfy
622: $\mu_{\infty}(s) = \mu_{\infty}(s_0) \cdot q^{-K(s)}$
623: for some $K(s)\in\nn_0$.
624: We call this value $K(s)$ the {\it class} of state $s$ and define it
625: algorithmically, generalizing to $s\in \overline{S}$:
626:
627: \bde
628: The {\it class} of a state $s=(b_1,\dots,b_M,d;T,t)\in\overline S$ is
629: $$K(s) = -\pi_s + M\cdot T +2\cdot \sum_{m=1}^{M+1} {\tilde b}_m\cdot
630: (M+1-m),$$
631: where $\pi_s$ is minimum number of transpositions between neighbours
632: necessary to sort $(b_1,\dots,b_{t-1},d,b_t,\dots,b_M)$ into
633: decreasing order as $({\tilde b}_1,\dots,{\tilde b}_{M+1})$,
634: ${\tilde b}_i\geq {\tilde b}_{i+1}, 1\leq i\leq M)$.
635: Observe that the place of $d$ in the initial sequence depends on $t$.
636: \ede
637:
638: \begin{example}
639: The state $s=(-5,4,-4,2;1,2)$ with $M=3$, $d=2$, $T=1$ and $t=2$
640: requires the sorting of $(-5,2,4,-4)$ into $(4,2,-4,-5)$, using
641: $\pi_s=4$ transpositions, and thus
642: $K(s) = -4+3\cdot 1+2(4\cdot 3+2\cdot
643: 2+(-4)\cdot 1 + (-5)\cdot 0) = 23$.
644: \end{example}
645:
646: This {\it static} way of determining $K(s)$ is compatible with the
647: following {\it dynamic} consideration of transitions. First we need a
648: technical lemma:
649:
650:
651:
652: \blem
653: For all $s=(b_1,\dots,b_M,d;T,t)\in \overline S$, we have
654: $$K(s) = K(b_1,\dots,b_M,d;T,t) = K(b_1+1,\dots,b_m+1,d+1;T-M-1,t).$$
655: \elem
656:
657: \bp
658: Let $s=(b_1,\dots,b_M,d;T,t)$ and
659: $s'=(b'_1,\dots,b'_m,d';T',t):=(b_1+1,\dots,b_m+1,d+1;T-M-1,t)$.
660: Then $\pi_s = \pi_s'$, since the relative order within $s$ and $s'$
661: are the same, also $\tilde b_i'=\tilde b_i+1, 1\leq i\leq M+1$.
662: Using
663: \[2\cdot \sum_{m=1}^{M+1} 1 \cdot(M+1-m)=2
664: \genfrac(){0cm}{}{M+1}2 =
665: M\cdot(M+1),\]
666: we thus have
667: \bqa
668: K(s)
669: &=& -\pi_s + M\cdot T +2\cdot \sum_{m=1}^{M+1} {\tilde b}_m\cdot(M+1-m)\\
670: &=& -\pi_s' + MT-M(M+1)
671: +2\cdot \sum_{m=1}^{M+1} ({\tilde b}_m+1)\cdot(M+1-m)\\
672: &=& -\pi_s' + M\cdot T' +2\cdot \sum_{m=1}^{M+1}{\tilde
673: b}'_m\cdot(M+1-m)=K(s'). \qedhere
674: \eqa
675: \ep
676:
677: We now obtain the change in class by counting actions $I$ and $N_<$:
678:
679: \bthm \hspace*{2 mm}\\
680: \indent$(i)$ For every feasible transition $s\stackrel {\alpha}{\to}
681: s'$ between
682: states $s,s'\in S$ with $\alpha\in\{D,I,N_=,N_<,d_-,b_+\}$, we have
683: \[K(s') = K(s) + \left\{
684: \ba{rl}
685: 1,&\alpha=I\\
686: -1,&\alpha=N_<\\
687: 0,&\alpha \in\{D,N_=,d_-,b_+\}\\
688: \ea
689: \right.
690: \]
691:
692: $(ii)$ Let $s_0\stackrel{\alpha_1\dots\alpha_k}{\longrightarrow}s$ be some
693: path from the initial state $s_0$ to $s$.\\
694: Let $\#I=\#\{1\leq i \leq k\ | \alpha_i=I\}$ and
695: $\#{N_<}=\#\{1\leq i \leq k\ | \alpha_i=N_<\}$. Then
696: \[ K(s') - K(s) = \#I-\#{N_<}.\]
697: \ethm
698:
699: \bp
700: $(i)$ We first deal with transitions from $D,I,N_=,N_<$ that is $t\neq
701: M+1$. Since the values of the multiset $\{b_1,\dots,b_M,d\}$ only get
702: swapped (in the case of a discharge D), the sum
703: $2\sum_{m=1}^{M+1}\tilde b_m\cdot(M+1-m)$
704: as well as the term $M\cdot T$ stay the same.
705:
706: It suffices thus to compare $\pi_s$ with $\pi_{s'}$.
707: Let $(b_1,\dots,b_{t-1},d,b_t,\dots,b_M)$ be the sequence to be
708: ordered for $s$ and similarly for $s'$, after the discharge,
709: $(b'_1,\dots,b'_{t},d',b'_{t+1},\dots,b'_M)$.
710: Since $b_m=b'_m$ for $m\neq t$, they need the same number of transpositions,
711: and we may in fact restrict our comparison
712: to the sorting of $(d,b_t)$ for $s$ and $(b'_t,d)$ for $s'$.
713:
714: Case $\alpha=D$: We had $b_t>d$ (to be able to apply $D$), $d' := b_t,
715: b'_t := d$ and thus $d'>b_t'$. Both before and after the discharge,
716: one transposition is necessary and thus $\pi_s=\pi_{s'}$, $K(s) =
717: K(s')$.
718:
719: Case $\alpha=I$: Again $b_t>d$, $b_t' := b_t, d' := d$. We sort $(d,b_t)$
720: with one transposition, $(b_t',d')$ is already sorted.
721: Hence $\pi_{s'}=\pi_s-1$, $K(s') = K(s)+1$.
722:
723: Case $\alpha=N_=$: Now, $b_t=d=b_t'=d'$ and so
724: $\pi_{s'}=\pi_s$, $K(s') = K(s)$.
725:
726: Case $\alpha=N_<$: Here $b_t < d$ and $b_t'<d'$. $(d,b_t)$ is already in
727: order, $(b_t',d')$ requires a transposition and so $\pi_{s'}=\pi_s+1$,
728: $K(s') = K(s)-1$.
729:
730: Finally, for $d_-$ we have $s'=(b_1,\dots,b_M,d-1;T+1,1)$ from
731: $t=M+1$ for $s$. We have to sort $(b_1,\dots,b_M,d)$ for $s$ (with $t=M+1$) and
732: $(d-1,b_1,\dots,b_M)$ for $s'$ (with $t=1$).
733: Sorting first the part $b_1,\dots,b_M$ with equal effort in both $s$
734: and $s'$, $\overline\pi_s =
735: \overline\pi_{s'}$, we then introduce $d$ from the right, respectively
736: $d-1$ from the left to the {\it same} place:
737: $(\tilde b_1,\dots,\tilde b_{k-1},d\mbox{\rm \ or \ } d-1,\tilde
738: b_{k+1},\dots,\tilde b_M)$, where $\tilde b_{k-1}\geq d>d-1$ and
739: $\tilde b_{k+1}\leq d-1<d$.
740: The total number of transpositions is then $\pi_s = \overline
741: \pi_s+(M+1-k)$ and $\pi_{s'} = \overline\pi_{s'}+(k-1)$.
742:
743: The class now is
744: \[K(s) = -\pi(s)+M\cdot T+2{\sum_{m=1,m\neq k}^{M+1}}
745: \tilde b_m(M+1-m)
746: +2d(M+1-k) \]
747: \[= -\pi(s)+(M-(k-1))-(k-1)+M\cdot (T+1)\]
748: \[+2{\sum_{m=1,m\neq k}^{M+1}} \tilde b_m(M+1-m)
749: +2(d-1)(M-(k-1))=K(s').\]
750:
751: The case $\alpha = b_+$ is equivalent to $d_-$
752: followd by incrementing all the $b_m$ and $d$, hence
753: follows from the case $\alpha=d_-$ and Lemma~7.
754:
755: $(ii)$ This follows by applying $(i)$ to the $k$ transitions leading
756: to $s$, starting in $s_0$ with $K(s_0)=0$.
757: \ep
758:
759:
760: We will now show that the limit mass distribution $\mu_\infty$ follows
761: in fact (up to a constant) from the state classes as
762: $\mu_\infty(s)=C_0\cdot q^{-K(s)}$.
763: First, we state a theorem by Rosenblatt (an infinite matrix version of
764: Perron--Frobenius):
765:
766: \bthm {\rm (Rosenblatt, \cite{Rosen})}
767: Let {\cal T} be a Markov chain, finite or infinite.
768: ``If the chain is irreducible and
769: nonperiodic, there is an invariant instantaneous distribution if and
770: only if the states are persistent, in which case the distribution is
771: unique and given by $\{u_k\}$'' $\cite[p.~56]{Rosen}$, where
772: $u_j = \lim_{n\to\infty}p_{j,j}^{(n)},$ and $p_{j,j}^{(n)}$ is the
773: probability to return to state $j$ after $n$ steps.
774: \ethm
775:
776: \bp
777: See \cite[p.~56]{Rosen}.
778: \ep
779:
780: Here $\cal T$ certainly {\it is} periodic, with period $(M+1)^2$.
781: The $(M+1)^2$--th power of $\cal T$ has the property that transitions
782: occur only
783: within the sets $S(T,t)$, so it can be ordered into a block diagonal matrix.
784: We use only the block with $(T,t)=(0,M+1)$, including $s_0$, as
785: $\widehat {\cal T} := {\cal T}^{(M+1)^2}|_{s\in S(0,M+1)}$.
786:
787: ${\cal T}$ and thus $\widehat {\cal T}$ is irreducible, since we get
788: from $s_0$ to every state and back by the following theorem:
789:
790: \bthm
791: $(i)$ For every state $s\in S$, there is exactly one
792: sequence of transitions $\underline\alpha=\alpha_1\cdots\alpha_k$ with
793: $s_0\stackrel{\underline\alpha(s)}{\longrightarrow}s$ and
794: $\underline\alpha(s)\in\left\{D,I,N_=,d_-,b_+\right\}^*$
795: $($avoiding actions of the type $N_<)$, which touches the state $s_0$
796: only initially.
797:
798: \noindent
799: $(ii)$ Also, there is exactly one path from $s$ to $s_0$ avoiding actions of
800: type $I$, which touches the state $s_0$ only finally.
801: \ethm
802:
803:
804: \bp
805: $(i)$
806: {\it Unicity}:
807: There is at most one such transition: When going backwards from $s$ to
808: $s_0$ , running through the batteries in reverse order $M,M-1,\dots,1$
809: for each transition, we have:
810:
811: For $b_m < d$ this results either from a discharge $D$, or a do
812: nothing $N_<$. Since $N_<$ is not allowed in $a_s$, put D.
813:
814: For $b_m = d$ this results from a do nothing $N_=$.
815:
816: For $b_m > d$, only an inhibition I is possible.
817:
818:
819: {\it Existence}:
820: There is an infinite chain of predecessors, all of class less than or
821: equal to $K(s)$. Since for each $K$, there are only finitely many
822: states with this class, in particular, there is some state $s^*$ with
823: $(T,t)=(0,M+1)$, which is reached repeatedly. If this state is
824: $s^*=s_0$, we are done. If not, $s^*=(b_1,\dots,b_M,d;0,M+1)$
825: has $mx:=\max\{b_1,\dots,b_M,d\}\geq 1$
826: and $mn:=\min\{b_1,\dots,b_M,d,\}\leq -1$ (by the invariant $(5)$, with
827: $T$ being zero).
828:
829: However, a cycle
830: $s^*\stackrel{\{D,N_=,d_-,b_+\}^+}{\longrightarrow}s^*$ without $I$
831: or $N_<$ is impossible:
832: Either $d=mx$ at $(T,t)=(0,M+1)$, or else some battery $b_t=mx$
833: has to discharge ($I$ prohibited). At $(T,t)=(1,M+1)$, we have
834: $d=mx\geq 1$ in any case, thus at $(T,t)=(2,1)$, we get $d\geq 0$.
835: Now, since $mn\leq -1$ is the value of one of the batteries, say
836: $b_{t^*}$, at time $(2,t^*)$ we have $b_{t^*}<d$ and thus $N_<$ is
837: the only possible action.
838: So, no return to $s^*$ avoiding $I$ and $N_<$ (having reached $K=0$,
839: there is no further decrement) is possible, unless
840: $s^*=s_0$.
841: Since the only cycle to avoid passes repeatedly through $s_0$,
842: $\underline \alpha(s)$ is well-defined by excluding this case.
843:
844: $(ii)$ To get back, just choose $D$, whenever $b_t>d$. In this way,
845: the class can never increase, and thus eventually, we must hit a
846: cycle. But we have already seen that the only cycle avoiding both $I$
847: and $N_<$ passes through the states with class 0, including $s_0$.
848: \ep
849:
850:
851:
852:
853: \bthm
854: For any two states $s,s'\in S$,
855: \[\frac{\mu_\infty(s)}{\mu_\infty(s')} = q^{K(s')-K(s)}.\]
856: \ethm
857:
858: \bp
859: Let a mass distribution $\mu(s) := q^{-K(s)}$ be given.
860: We show that $\mu$ is invariant under the transition matrix of the
861: BDM, {\it i.e.} $(\mu(s))_{s\in S}$ is an eigenvector of eigenvalue one,
862: and unique with this property up to a constant factor.
863: We consider all states leading to a fixed state $s$.
864: We have three cases:
865:
866: 1. $b_t<d$ after the action, coming from
867: $s_1\stackrel{D}{\longrightarrow} s$ or
868: $s_2\stackrel{N_<}{\longrightarrow} s$, and thus
869: $\mu_\infty(s) = \frac{q-1}{q}\mu_\infty(s_1) + \mu_\infty(s_2)$.
870: Since $N_<$ decrements the class (but $D$ not), we have
871: $ \frac{q-1}{q}p_o\cdot q^{-K(s_1)}+p_o\cdot q^{-K(s_2)}
872: = \frac{q-1}{q}p_o\cdot q^{-K(s)}+p_o\cdot q^{-(K(s)+1)}
873: = \left(\frac{q-1}{q}+\frac{1}{q}\right)\cdot p_o\cdot q^{-K(s)}
874: = p_0\cdot q^{-K(s)}$.
875:
876: 2. $b_t=d$ after the action, which must be a do nothing, $\alpha=N_=$,
877: and thus $K(s)=K(s')$, $\mu_\infty(s) = \mu_\infty(s')$.
878:
879: 3. $b_t>d$ afterwards (and before), from an inhibition, $\alpha=I$ which
880: increments the class, hence $q^{-K(s)}\cdot\frac{1}{q}=q^{-(K(s)+1)}$
881:
882: This shows {\it consistency} of $\mu(s) =c\cdot q^{-K(s)}$ with the
883: behaviour of the BDM, or stated otherwise:
884: $(\mu(s))_{s\in S} = (q^{-K(s)})_{s\in S}$ is an eigenvector
885: of the infinite state transition matrix of the BDM. Furthermore its
886: eigenvalue 1 is the {\it largest} eigenvalue of ${\cal T}$, since
887: ${\cal T}$ is stochastic.
888:
889: Now, $\widehat {\cal T}$ inherits the eigenvector $\mu$, restricted to states
890: from $S({0,M+1})$, with eigenvalue $1^{(M+1)^2}=1$. This matrix is
891: aperiodic and irreducible by Theorem 10, and by Theorem 9
892: (Rosenblatt), $\mu$ is already the {\it only}
893: such eigenvector up to a constant factor, and it remains to normalize it.
894:
895: Returning from $\widehat {\cal T}$ to ${\cal T}$, we obtain the
896: statement, since $\mu(s)=q^{-K(s)}$ for all $s\in S(0,M+1)$ forces all
897: other states in $S$ also into this eigenvector.
898: \ep
899:
900:
901:
902: \subsection*{5. Antisymmetry}
903:
904: In this section, we consider only the configurations with $t=M+1$, at
905: the end of a complete column from the input $a$.
906:
907: \bpro
908: For $M\in\nn$, $T\in\zz$,
909: $d\in \zz$, $k\in\nn_0$, and $2\leq q\in \nn$, let
910: $A=\{s\in \overline S({T,M+1,d})\ | \ K(s) = k\}$ and\\
911: $\overline A = \{s\in \overline S({M-T,M+1,-d})\ | \ K(s) = k\}$.
912: Then $|A|=|\overline A|$.
913: \epro
914:
915: {\it Proof}.
916: We show that states $s :=(b_1,\dots,b_M,-T-X;T,M+1)$ and\\
917: $\overline s :=(-b_M-1,\dots,-b_1-1,T+X;M-T,M+1)$,
918: where $X:= \sum_{m=1}^M b_m$, satisfy:\\
919: $(i)$ $T(s)=T$ and $T(\overline s) = M-T$,
920: $(ii)$ $d(s) = -d(\overline s)$, and
921: $(iii)$ $K(s) = K(\overline s)$. \\
922: Then $s\in A\Longleftrightarrow \overline s \in
923: \overline A$, and we have a bijection
924: between $A$ and $\overline A$, hence $|A|=|\overline A|$.
925:
926: $(i)$ and $(ii)$ are obvious by inspection. To show $(iii)$,
927: we first sort $b_1,\dots, b_M$ of $s$ into decreasing order as
928: $\tilde b_1\geq \tilde b_2\geq\dots\geq \tilde b_M$ by $\pi_s'$
929: permutations of neighbours.
930: Then $-b_M-1,\dots, -b_1-1$ of $\overline s$ can be sorted into
931: decreasing order
932: by $\pi_s'$ permutations at the same places into
933: $-\tilde b_M-1,\dots,-\tilde b_1-1$.
934:
935: We now introduce $d=-T-X$ and $-d=T+X$, resp., into the ordered $\tilde b$'s as
936: $\tilde b_1\geq\dots \tilde b_{k}\geq -T-X> \tilde b_{k+1}\geq \dots
937: \tilde b_M$ and
938: $-\tilde b_M-1\geq\dots -\tilde b_{k+1}-1\geq T+X> -\tilde b_{k}-1\geq
939: \dots \tilde b_1$ (observe
940: the $>$ inequality in {\it both} cases to the right of $\pm(T+X)$).
941: We have a total of $\pi_s = \pi_s'+M-k$ and $\pi_{\overline s} =
942: \pi_s'+k$, resp., permutations, thus
943: $\ds K(s) =-\pi_s -(M-k)+ M\cdot T
944: +2\sum_{i=1}^M(M+1-i)\tilde b_i-2\sum_{i=k+1}^M \tilde b_i + 2(M-k)(-T-X)$
945: and
946: $\ds K(\overline s) = -\pi_s-k+M\cdot (M-T)
947: +2\sum_{i=1}^M(M+1-i)(-\tilde b_{M+1-i}-1)-2\sum_{i=1}^k (-\tilde
948: b_i-1) + 2k(T+X),$
949: where the first sum treats the $\tilde b_i$'s in their place {\it before}
950: introducing $\pm(T+X)$, the second sum adjusts the $\tilde b_i$'s,
951: which are shifted while introducing $d$, by 2,
952: and the last term belongs to the drain $\pm(T+X)$.
953: The difference is then
954: \bqa
955: &&K(\overline s) - K(s)
956: = M^2-2MT+M -2k +2\sum_{i=1}^M(-i-M-1+i)\tilde b_{i}-\\
957: &&-2\sum_{i=1}^M 1 +2\sum_{i=1}^M \tilde b_i
958: +2\sum_{i=1}^k 1 + 2(k+M-k)(X+T)\\
959: &=& M(M+1)-2MT -2k - 2(M+1)\sum_{i=1}^M\tilde b_{i}-M(M+1)+\\
960: &&+2\sum_{i=1}^M \tilde b_i+2k +2MX+2MT = - 2(M+1)X+2X + 2MX=0,
961: \eqa
962: and we obtain $(iii)$.
963: \hfill$\Box$
964:
965:
966: \bthm $($Antisymmetry$)$
967:
968: For all $M\in \nn$, $T\in \zz$, and $d\in \zz$,
969: \[\sum_{s\in\overline S({T,M+1,d})} q^{-K(s)}
970: =\sum_{s'\in\overline S({M-T,M+1,-d})} q^{-K(s')}.\]
971: \ethm
972:
973: \bp
974: As in the proof of the preceeding proposition, we can match the states in
975: the first
976: sum with those in the second one. From property $(iii)$ in 12, we conclude
977: that the classes, and thus the sum terms, are the same in each case.
978: \ep
979:
980: \bde
981: For all $d\in\zz$, $q=|\ff_q|$, $M\in\nn$, and $0\leq T\leq M$, let
982: $$\gamma(d,T,M+1) := \sum_{s\in S({T,M+1,d})} \mu_\infty(s)$$
983: be the asymptotic mass on all states with a given drain value $d$,
984: at times $\equiv (T,M+1)$.
985: \ede
986:
987:
988: \bthm
989: For all $d\in \zz$, $M\in\nn$, and $0\leq T\leq M$, we have
990: $$\gamma(d,T,M+1) = \gamma(-d,M-T,M+1).$$
991: \ethm
992:
993: \bp
994: This follows immediately from Proposition 12 and
995: Theo\-rem 11.
996: \ep
997:
998: \bde
999: For $0\leq T\leq M$ and $1\leq t \leq M+1$, let
1000: \[\overline d(T,t) :=\sum_{s\in S(T,t)} \mu_\infty(s)\cdot d(s).\]
1001: Also, let
1002: \[\overline {\overline d}:= \frac{1}{M+1}\sum_{T=0}^M \overline d(T,M+1).\]
1003: \ede
1004:
1005: \bpro \hspace*{ 1 cm}\\
1006: $(i)$ For $0\leq T\leq M$, $\overline d(T,M+1) = -\overline d(M-T,M+1)$.
1007:
1008: \noindent
1009: $(ii)$ For even $M$, we have $\overline d(M/2,M+1)=0$.
1010: \epro
1011:
1012: \bp
1013: $(i)$ follows from Theorem 14, since $\overline
1014: d(T,M+1)=\sum_{d\in\zz} d\cdot \gamma(d,T,M+1))$.\\
1015: $(ii)$ follows from $(i)$ with
1016: $\overline d(M/2,M+1)=-\overline d(M/2,M+1)\Rightarrow \overline
1017: d(M/2,M+1)=0$.
1018: \ep
1019:
1020: \bthm
1021: For every $M\in \nn$, $\overline {\overline d}=0$.
1022: \ethm
1023:
1024: \bp
1025: Using $15(i)$ (and $15(ii)$ in case of even $M$), we have
1026: \[\overline {\overline d}
1027: = \frac{1}{M+1}\sum_{T=0}^M \overline d(T,M+1)
1028: = \frac{1}{M+1}\left(\sum_{T=0}^{\lfloor M/2\rfloor} \overline
1029: d(T,M+1)+\overline d(M-T,M+1)\right)\]
1030: =0.
1031: \ep
1032:
1033: {\it Remark.} In particular, Theorem 16 is an (aesthetical)
1034: reason to choose
1035: $L_a(n) \approx\lceil n \cdot \frac{M}{M+1}\rceil$ (and {\it not}
1036: $L_a(n) \approx n \cdot \frac{M}{M+1}$) as ``typical'' average behaviour,
1037: another reason is that for $q\to\infty$ this same
1038: $\lceil\dots\rceil$ value is the limit behaviour.
1039:
1040:
1041:
1042:
1043: \subsection*{6. The Partition Model}
1044:
1045:
1046: \bde
1047: Let $P_M(K)\in\nn$, for $ M\in\nn,K\in\nn_0$,
1048: be the number of partitions of $K$ into
1049: at most $M$ parts $($equivalently, into parts of size at most~$M)$.
1050: \ede
1051:
1052: \bde
1053: Let ${\cal P}(M,q)=\sum_{K=0}^\infty P_M(K) \cdot q^{-K}$.
1054: \ede
1055:
1056: \bpro a$)$ The following initial values and recursion formulae hold:
1057: $P_1(K) =1, \forall K\in\nn$,
1058: $P_M(1) = 1, P_M(K)=0, \forall K\leq 0, \forall M\in\nn$,
1059: and\\
1060: $P_M(K) = P_M(K-M) + P_{M-1}(K)$.
1061:
1062: \noindent b$)$ The generating function of $P_M(K)$ in powers of $q^{-1}$ is
1063: $${\cal P}(M,q)=\sum_{K=0}^\infty P_M(K) \cdot q^{-K} =\prod_{m=1}^M
1064: \frac{q^m}{q^m-1}.$$
1065:
1066: \noindent c$)$
1067: $\ds P_M(K) \approx\frac{K^{M-1}}{M!(M-1)!}$ for fixed $M$ and
1068: $K\to\infty$.
1069: \epro
1070:
1071: \bp
1072: See \cite{CRC}, Sections 2.5.10, 2.5.12 and 2.5.11.
1073: \ep
1074:
1075: \begin{remark}
1076: Observe that by c), for every $K\in\nn_0$, we have only
1077: {\it polynomially} many states of class $K$, each with
1078: {\it exponentially small} probability $q^{-K}\cdot \mu(s_0)$.
1079: This leads to the concentration of mass on the states with small $K$.
1080: \end{remark}
1081:
1082:
1083: \bde
1084: Let $I_m(s), 1\leq m\leq M$, count the number of actions $I$ at battery
1085: $m$ during $\underline\alpha_s$ (see Theorem 10).
1086: If $K(s)=0$, put $I_m(s)=0, 1\leq m\leq M$.
1087:
1088: Let $(\tilde I_1,\dots,\tilde I_M)$ be the ordered
1089: $(\tilde I_i \geq \tilde I_{i+1}, 1\leq i <M)$ version of
1090: $\{I_m\}$.
1091: \ede
1092:
1093:
1094: \bcor
1095: Let $\#I$ be the number of inhibitions during all of the transitions
1096: in $\underline\alpha(s)$, similarly $\#N_<$.
1097: Then $\ds\sum_{m=1}^M I_m = \#{I} = K(s).$
1098: \ecor
1099:
1100: \bp
1101: The $I_m$ sum up to $\#{I}$ by definition.
1102: By Theorem 8, we have $K(s) - K(s_0) = \#{I} -
1103: \#{N_<}$. With $\#{N_<}=0$ and $K(s_0)=0$, $\#{I} = K(s)$ follows.
1104: \ep
1105:
1106:
1107:
1108: \bthm \hspace*{1 mm}\\
1109: $(i)$ For $1\leq M\leq 8, 0\leq T\leq M, 1\leq t \leq M+1$, and
1110: $0\leq K\leq 1200-100M$, the state set
1111: $S(T,t)$ contains exactly $P_M(K)$ states with $K(s)=K$.
1112:
1113: $(ii)$ For $1\leq M\leq 8$
1114: and
1115: $0\leq K\leq 600-50M$,
1116: fix a time $(T_0,t_0)$.
1117: Then the $(\tilde I_1,\dots,\tilde I_M)$ of all the $P_M(K)$ states in
1118: $S(T_0,t_0)$ with $K(s)=K$ give the $P_M(K)$ different partitions of
1119: $K$ into $M$ parts $($including those of size 0$)$.
1120: \ethm
1121:
1122: \bp
1123: By numerical simulation over the mentioned ranges.
1124: \ep
1125:
1126:
1127: \bcon
1128: The previous theorem holds for every $M,T,t,K$.
1129: \econ
1130:
1131: \newpage
1132: \noindent
1133: A graph for $M=2$, showing states $(b_1,b_2,d)$ with $K(s)\leq 4$ and\\
1134: their associated partitions:
1135: \\\\
1136: \includegraphics{arx.eps}
1137:
1138:
1139:
1140:
1141: \bcon ({\bf Theorem} for $M\leq 8$)\ \
1142: For every state $s\in S$,
1143: $$\mu_\infty(s) =\frac{q^{-K(s)}}{{\cal P}(M,q)}.$$
1144: \econ
1145:
1146: \bp
1147: We assume the previous Theorem 19 or Conjecture 20.
1148: To normalize, we want to have
1149: $$1=\sum_{s\in S} c_0\cdot q^{-K(s)}
1150: = c_0 \sum_{K\in\nn_0} P_M(K)\cdot q^{-K}
1151: =c_0{\cal P}(M,q).$$
1152:
1153: With $c_0 := {\cal P}(M,q)^{-1}=\mu_\infty(s_0)$,
1154: $\mu_\infty(s) := q^{-K(s)}/{\cal P}(M,q)$ is a probability
1155: distribution (with $\sum_{s\in S(T,t)}\mu_\infty(s) = 1$
1156: for all $0\leq T\leq M, 1\leq t\leq M+1$),
1157: which is invariant under ${\cal T}.$
1158: \ep
1159:
1160:
1161: \subsection*{7. Asymptotic ($n\to\infty$) Measure for the\\
1162: Linear Complexity Deviation}
1163:
1164:
1165: \bde
1166: Let the mass on states with drain (deviation) $d$ be
1167: $\gamma(d,T,t)=
1168: \sum_{s\in S({T,t,d})} \mu_\infty(s),$
1169: distinguished according to the timesteps $(T,t)$.
1170: \ede
1171:
1172: Numerical results indicate that $\gamma$ indeed depends
1173: only on the difference $t-T$:
1174:
1175: \bthm
1176: For $1\leq M\leq 8$, $0\leq T\leq M$, $1\leq t\leq M+1$,
1177: and any finite field $\ff_q$, let $\Delta := t-T$. Then
1178: for every linear complexity deviation $d\in\zz$,
1179: \bq
1180: \gamma(d,T,t) \dot{=} \frac{1}{{\cal P}(M,q)}
1181: \sum_{h=1}^M
1182: (-1)^{h+1}
1183: \frac{\sum_{k=0}^{h-1}q^{(M+1)\cdot k}}{q^{(M+1)(h-1)}}
1184: \cdot
1185: \frac{q^{-h\cdot(M+1)\cdot |d|}
1186: \cdot
1187: q^{\varepsilon_{\operatorname{sgn}(d)}(\Delta,h)}
1188: }
1189: {\prod_{k=1}^{M-h}(q^k-1)
1190: \prod_{k=M+2}^{M+h}(q^k-1)}
1191: ,\eq
1192: \noindent where
1193: \[
1194: \ba{lll}
1195: \varepsilon_{-}(\Delta,h) &=& h(M-1+\Delta)-\genfrac(){0cm}{}h 2\\
1196: \varepsilon_{+}(\Delta,h) &=& h(\Delta-h)+\genfrac(){0cm}{}h 2\\
1197: \varepsilon_{0}(\Delta,h) &=& \min\{\varepsilon_{+}(\Delta,h),
1198: \varepsilon_{-}(\Delta,h)\}
1199: \ea
1200: \]
1201: depends only on the {\rm sign} of $d$, and $\dot{=}$ means
1202: equality with precision at least $q^{-(1200-100\cdot M)}$.
1203: \ethm
1204:
1205: \bp
1206: By verifying all states with class up to $1200-100\cdot M$ in the
1207: partition model.
1208: The left and right side coincide up to precision
1209: $q^{-1200+100M}$.
1210: \ep
1211:
1212: \begin{remark}
1213: This involved about $2^{39}$ or half a trillion states for $M=8$.\\
1214: We used Victor Shoup's library NTL \cite{NTL} (Thank you!).
1215: \end{remark}
1216:
1217:
1218:
1219:
1220:
1221: \bcon
1222: For every $M\in\nn$, $0\leq T\leq M$, $1\leq t\leq M+1$,
1223: and every finite field $\ff_q$, with $\Delta$ and
1224: $\varepsilon(\Delta,h)$ as before,
1225: for every $d\in\zz$, we have exactly
1226: \[
1227: \gamma(d,T,t) {=}
1228: \sum_{h=1}^M
1229: \frac
1230: {
1231: (-1)^{h+1}
1232: \left(\sum_{k=0}^{h-1}q^{(M+1)\cdot k}\right)
1233: \left(\prod_{k=M-h+1}^{M}(q^k-1)\right)
1234: \cdot
1235: q^{\varepsilon_{\operatorname{sgn}(d)}(\Delta,h)}
1236: }
1237: {
1238: q^{(M+1)(h+M/2)}
1239: \left(\prod_{k=M+2}^{M+h}(q^k-1)\right)
1240: q^{h\cdot(M+1)\cdot |d|}
1241: }
1242: ,\]
1243: the same formula as in Theorem~22, rearranged.
1244: \econ
1245:
1246:
1247: {\it Remark:} The resulting values $\gamma(d,T,M+1)$ for $M=2$ and
1248: $M=3$, and $ \overline d(T,M+1)$ for $M=2$,
1249: cor\-res\-pond with Niederreiter's and Wang's results
1250: in \cite[Thm.~3]{WN}, \cite[Thm.~4]{WN}, and \cite[Thm.~11]{NW1},
1251: resp., for $n\to\infty$, see also \cite{NW}. Observe that we use
1252: $d = L-\left\lceil n\cdot\frac{2}{3}\right\rceil$, not $L-n\cdot\frac{2}{3}$.
1253:
1254: \subsection*{8. The Law of the Logarithm}
1255:
1256: We follow the approach by Niederreiter in \cite{NRlaw} for the
1257: case $M=1$.
1258:
1259: \bthm
1260: For all $M\in\nn$, for all $0\leq T \leq M$, and $1\leq t\leq M+1$,
1261: there exists a constant
1262: $C(M,T,t)>0$ $($independent of $d)$ such that:
1263: \[\frac{1}{{\cal P}(M,q)}\cdot q^{-|d|\cdot (M+1)}\leq \gamma(d,T,t) \leq C(M,T,t) \cdot
1264: q^{-|d|\cdot (M+1)},\]
1265: that is
1266: \[\gamma(d,T,t) =\Theta(q^{-|d|(M+1)}).\]
1267: \ethm
1268:
1269:
1270: \bp
1271: Lower bound:
1272:
1273: We distinguish cases $d < 0$, $d > 0$, and $d=0$:
1274:
1275: a) $d<0$
1276:
1277: Let $b := \left\lfloor\frac{-d-T}{M}\right\rfloor$ and $a :=
1278: -d-T-M\cdot b$ that is $b=-(a+d+T)/M$.
1279: Then $s^*:= (b,\dots,b,b+1,\dots, b+1,d;T,t)$ with
1280: $b_1=\cdots=b_{M-a}=b$ and $b_{M-a+1}=\cdots=b_M=b+1$ is in $S(T,t)$.
1281:
1282: The class of $s^*$ is $K(s^*)=-\pi_s+M\cdot T + 2\sum_{k=1}^a
1283: (b+1)(M+1-k) +2\sum_{k=a+1}^M b\cdot (M+1-k)$,
1284: since after the sorting, the $a$
1285: batteries with value $b+1$ will be the largest, while $d$ is the
1286: smallest value.
1287:
1288: Now, sorting starts with
1289: $b,\dots,(d),\dots,b,b+1,\dots,(d),\dots,b+1$,
1290: where $d$ occupies the $t$--th place from the left.
1291: $d$ moves to the right by $M+1-t$ moves, then all the $b$'s interchange
1292: with all the $(b+1)$'s in $a(M-a)$ transpositions, yielding
1293: $\pi_{s^*}= M+1-t+a(M-a)$ and class
1294: \begin{align*}
1295: &K(s^*)\\
1296: =& -(M+1-t+aM-a^2)+MT+2b(M+1)M/2\\
1297: &+2[(M+1)M/2-(M-a+1)(M-a)/2]\\
1298: =& -M-1+t-aM+a^2+MT-(d+T+a)(M+1)\\
1299: &+(M+1)M-(M-a+1)(M-a)\\
1300: =&|d|(M+1) -M-1+t-aM+a^2+MT-MT-T-aM-a\\
1301: &+(M+1)M-(M+1)M -a^2+2aM+a\\
1302: =&|d|(M+1) -[(M-t)+1+T]\\
1303: \leq& |d|(M+1)
1304: \end{align*}
1305: and already $s^*$ alone accounts for the lower bound.
1306:
1307:
1308: b) $d>0$
1309:
1310: With $b$, $a$, and $s^*$ as before, sorting now leads to
1311: $a+a(M-a)$ transpositions, since $d$ goes to the left. As before,
1312: \[K(s^*)
1313: = -a(M+1-a) +MT+2dM
1314: + 2\sum_{k=2}^{a+1} (b+1)(M+1-k)
1315: + 2\sum_{k=a+2}^M b\cdot (M+1-k)\]
1316: \[
1317: = -a(M+1-a) +MT+2dM+2b(M+1)M/2-2bM
1318: + 2[M(M-1)/2-(M-a)(M-a-1)/2]\]
1319: \[
1320: = -a(M+1-a) +MT+2dM-(d+T+a)(M+1)+2(d+T+a)
1321: + M(M-1)-(M-a)(M-a-1) \]
1322: \[
1323: = -aM-a+a^2 +MT+2dM-dM-MT-aM-d-T-a+2d+2T+2a\]
1324: \[
1325: +M^2-M -M^2+2aM-a^2-M+a \]
1326: \[
1327: = dM+d+T+a-2M
1328: = |d|(M+1)-(M-T) -(M-a)\leq |d|(M+1)\]
1329:
1330: c) $d=0$: Let $s^*$ be the (only) state in $S(T,t)$ with
1331: $K(s^*)=0=|d|(M+1)$.
1332:
1333:
1334: Upper bound:
1335:
1336: \noindent We have
1337: \[\gamma(d,T,t)
1338: = \sum_{s\in S(T,t,d)} q^{-K(s)}\cdot C_0\]
1339: (use $C_0 := {\cal P}(M,q)^{-1}$, if you trust Conjecture 21),
1340: and
1341: $$K(s) = -\pi_s + M\cdot T +2\cdot \sum_{m=1}^{M+1} {\tilde b}_m\cdot
1342: (M+1-m).$$
1343:
1344: a) $d < 0$:
1345:
1346: \nopagebreak
1347: Let $\{b_1, \dots, b_M\}$ be ordered nonincreasingly as
1348: $\tilde b'_1\geq \dots\geq \tilde b'_M$
1349: (where $'$ indicates that $d$ does not enter into the sort).
1350:
1351: We write the battery values as sum of their differences
1352: $\Delta_k := \tilde b'_{M-k} - \tilde b'_{M-k+1}\geq 0, 1\leq k\leq M-1$
1353: \bq
1354: \tilde b'_m = \tilde b'_M + \sum_{k=1}^{M-m} \Delta_k
1355: \eq
1356: (where for $m=M$ the empty sum is zero).
1357:
1358: By the invariant $d+T+\sum_m b_m = 0$ we must have
1359: \bq
1360: &&d+T+\sum_{m=1}^M (\tilde b'_M + \sum_{k=1}^{M-m} \Delta_k) = 0\\
1361: &\Longleftrightarrow&M\cdot \tilde b'_M= - d-T-\sum_{k=1}^{M-1} \Delta_k(M-k)\\
1362: &\Longleftrightarrow&\tilde b'_M= -\frac{d}{M}
1363: -\frac{T+\sum_{k=1}^{M-1} \Delta_k(M-k)}{M}
1364: \eq
1365:
1366: When running $\Delta_1,\dots,\Delta_{M-1}$ through all values from $\nn_0$
1367: and setting $\tilde b'_M$ by (9--11) and then $\tilde b'_m$ by (8), we
1368: obtain all possible values for $(\tilde b'_1,\dots,\tilde b'_M)$ (and
1369: a lot more, since $\tilde b'_M$ is taken from $\frac{\zz}{M}\supset \zz$).
1370:
1371: Furthermore, each $(\tilde b'_1,\dots,\tilde b'_M)$ corresponds to up
1372: to $M!$ states (with different permutation of the values) with
1373: $\{\tilde b'_m\}=\{b_m\}$.
1374:
1375: $\pi_s$ can be bounded in general by $0\leq \pi_s\leq
1376: \genfrac(){0cm}{} {M+1}2$
1377: (the maximum being attained in the case of $b_1<b_2<\dots <b_m$).
1378:
1379: The transition from $(\tilde b'_1,\dots,\tilde b'_M), d$ to
1380: $(\tilde b_1,\dots,\tilde b_{M+1})$ {\it i.e.} including $d$ in the
1381: sort order, gives the inequality
1382: $$2\sum_{m=1}^M \tilde b'_m(M+1-m) + 2\cdot 0\cdot d \leq
1383: 2\sum_{m=1}^{M+1} \tilde b_m(M+1-m)$$
1384: since at any rate a smaller $\tilde b'_m$ will be replaced by a larger
1385: $d$ or $\tilde b'_{m-1}$.
1386:
1387: Putting things together, we have the upper bound
1388: \bqa
1389: \gamma(d,T,t) &\leq& C_0
1390: \sum_{\Delta_1\in \nn_0}\dots \sum_{\Delta_{M-1}\in \nn_0}
1391: M!\cdot q^{\genfrac(){0cm}{}{M+1}2}\cdot q^{-MT}\times\\
1392: &&\times \ q^{-2\sum_{m=1}^M
1393: -\frac{d}{M}(M+1-m)
1394: -2\sum_{m=1}^M\frac{-T-\sum_{k=1}^{M-1}\Delta_k(M-k)}{M}}\\
1395: &=&-q^{-2\sum_{m=1}^M -\frac{d}{M}(M+1-m)}\cdot C(M,T)\\
1396: &=&- q^{-|d|(M+1)}\cdot C(M,T)\\
1397: \eqa
1398: where
1399: \[C(M,T) = C_0
1400: \sum_{\Delta_1\in \nn_0}\dots \sum_{\Delta_{M-1}\in \nn_0}
1401: M!\times\]
1402: \[\times q^{\genfrac(){0cm}{}{M+1}2}\cdot q^{-MT
1403: -2\sum_{m=1}^M\frac{-T-\sum_{k=1}^{M-1}\Delta_k(M-k)}{M}}\]
1404: is independent of $d$.
1405:
1406: b) In the case $d >0$ we follow the same idea, however we put $d$ as
1407: first (largest) value of the sort order. We obtain
1408: $$\tilde b'_m = \tilde b'_2 - \sum_{k=1}^{m-2} \Delta_k, 2\leq k\leq
1409: M+1$$
1410: with $\Delta_k\in\nn_0.$
1411:
1412: The invariant $d+T+\sum_m b_m=0$ requires
1413: $$d+\sum_{m=2}^{M+1} (\tilde b'_2-\sum_{k=1}^{m-2} \Delta_k) =0
1414: \Longleftrightarrow
1415: M\tilde b'_2 = -d-T+\sum_{k=1}^{M-1} \Delta_k(M-k)$$
1416: $$\Longleftrightarrow \tilde b'_2=-\frac{d}{M}-\frac{T}{M}
1417: +\frac{\sum_{k=1}^{M-1} \Delta_k(M-k)}{M}.$$
1418:
1419: Again up to $M!$ states can be attached to one sorted tuple
1420: $(\tilde b'_2,\dots,\tilde b'_{M+1})$, again $\pi_s\leq
1421: \genfrac(){0cm}{}{M+1}2$,
1422: and introducing $d$ (from the left) increases (if at all) the
1423: values, {\it i.e.} $\tilde b_m\geq \tilde b'_m$. We obtain
1424: \bqa
1425: &&-2\sum_{m=1}^{M+1} \tilde b_m(M+1-m)\\
1426: &\leq&-2\cdot d\cdot M -2\sum_{m=2}^{M+1} \tilde b'_m(M+1-m)\\
1427: &=&-2Md-2\sum_{m=2}^{M+1}\left(-\frac{d}{M}-\frac{T}{M}
1428: +\frac{\sum_{k=1}^{m-2}\Delta_k(M-k)}{M}-\sum_{k=1}^{m-2}\Delta_k\right)
1429: \left(M+1-m\right)\\
1430: &=&-2Md+2\sum_{m=2}^{M+1}-\frac{d}{M}+C_1\\
1431: &=&d(-2M+2\frac{(M-1)M}{2})+C_1\\
1432: &=&-d(M+1)+C_1,\\
1433: \eqa
1434: where $C_1$ does not depend on $d$, and thus
1435: $$\gamma(d,T,t) \leq C_0
1436: \sum_{\Delta_1\in \nn_0}\dots \sum_{\Delta_{M-1}\in \nn_0}
1437: M!\cdot q^{\genfrac(){0cm}{}{M+1}2}\cdot q^{-MT} q^{-d(M+1)+C_1}$$
1438: \[=q^{-|d|(M+1)}\cdot C(M,T).\]
1439: \ep
1440:
1441:
1442:
1443:
1444: \blem {\rm (Borel--Cantelli)}
1445:
1446: $(i)$ Let $A_1,A_2,\dots$ be events which happen with probability
1447: $a_1,a_2,\dots$, resp.
1448:
1449: If now $\sum_{k\in \nn} a_k<\infty$, then with probability one
1450: only finitely many of the events $A_k$ occur simultaneously.
1451:
1452: $(ii)$ Let $A_1,A_2,\dots$ be {\underline{ independent}} events which happen
1453: with probability $a_1,a_2,\dots$, resp.
1454:
1455: If now $\sum_{k\in \nn} a_k=\infty$, then with probability one
1456: infinitely many of the events $A_k$ occur simultaneously.
1457: \elem
1458:
1459: \bp
1460: See Feller \cite[VIII.3]{Fel}.
1461: \ep
1462:
1463: \newpage
1464: \bthm \hspace*{1 cm}\\
1465: {\rm The Law of the Logarithm for Linear Complexity of
1466: Multisequences}
1467:
1468: For all $M\in\nn$ and for almost all $($in the sense of Haar
1469: measure on $\fqw)$ sequences $a\in\left(\ff_q^M\right)^\infty$,
1470: we have
1471: $$\limsup_{n\to\infty}\frac{d_a(n)}{\log n} =\ \ \frac{1}{(M+1)\log
1472: q}$$
1473: and
1474: $$\liminf_{n\to\infty}\frac{d_a(n)}{\log n} = -\frac{1}{(M+1)\log
1475: q}.$$
1476: \ethm
1477:
1478: \bp
1479: We fix some $\varepsilon >0$ and apply the Borel--Cantelli Lemma $31(i)$
1480: to the events
1481: $$A_n: \left|\frac{d_a(n)}{\log n}\right|> \frac{1+\varepsilon}{(M+1)\log q}.$$
1482:
1483: With $L := \left\lceil\frac{\log n}{(M+1)\log q}\right\rceil$,
1484: the probability for $A_k$ is
1485: \[a_k=
1486: \sum_{d=L }^\infty \gamma(d,T,t)
1487: +
1488: \sum_{d=-L}^{-\infty} \gamma(d,T,t)
1489: \leq 2\cdot C(M,T)
1490: \sum_{d=L}^{\infty}
1491: q^{-|d|(M+1)}\]
1492: \[\qquad= 2C(M,T) \frac{q^{-L(M+1)}}{1-q^{-(M+1)}},\]
1493: with accumulated probability
1494: \[\sum_{n=1}^\infty a_n
1495: \leq \frac{2C(M,T)}{1-q^{-(M+1)}}
1496: \sum_{n=1}^\infty q^{-(M+1)\cdot\frac{(1+\varepsilon)\log n}{(M+1)\log q}}
1497: = \frac{2C(M,T)}{1-q^{-(M+1)}}
1498: \sum_{n=1}^\infty n^{-(1+\varepsilon)}<\infty
1499: .\]
1500:
1501:
1502: For the inner bounds, we need {\it independent} events:
1503:
1504: Denote by $n_1,n_2,\dots$ the timesteps, when $d=0$. If this sequence
1505: is finite, $d\to-\infty$, since at least one battery no longer
1506: discharges. This event is of measure zero, requiring {\it all}
1507: discrepancies $\delta$ pertaining to that battery equal to zero from
1508: some $n_0$ on.
1509:
1510: Assume now an infinite sequence of these timesteps.
1511: Let $L_k := \left\lceil\frac{\log k}{(M+1)\log q}\right\rceil$ and let
1512: $A_k$ be the event of $(M+1)\cdot (L+1)$ consecutive discrepancies, all
1513: zero, after $n_k$.
1514: The events $A_k$ are independent with probability $a_k = q^{-(M+1)(L+1)}$,
1515: since they belong to different, independent discrepancies.
1516: Now, within $(L+1)(M+1)$ symbols, we have at least
1517: $(L+1)\frac{M+1}{M}$ columns and thus
1518: $\lfloor(L+1)\frac{M+1}{M}\frac{M}{M+1}\rfloor\geq L$ actions $d_-$
1519: (without intermediate discharges), and thus $A_k$ leads to $d\leq -L$.
1520:
1521: With
1522: \[\sum_{n=1}^\infty a_n \geq
1523: \sum_{n=1}^\infty q^{-(M+1)(1+\frac{\log n}{(M+1)\log q})}
1524: =q^{-(M+1)}\sum_{n=1}^\infty n^{-1}=\infty\]
1525: and Lemma $31(ii)$, we get equality of the bounds.
1526: \ep
1527:
1528: \bcor
1529: For all $M\in\nn$, for all $\varepsilon >0$, for almost all
1530: sequences from $\fqw$, it holds
1531: \[-\varepsilon<\liminf_{n\to\infty}\frac{d_a(n)}{n}
1532: \leq\limsup_{n\to\infty}\frac{d_a(n)}{n}<\varepsilon\]
1533: \ecor
1534:
1535: \bp
1536: Almost always, we have
1537: \[\left|\frac{d_a(n)}{\log n}\right| \leq
1538: \frac{1}{(M+1)\log q}\Longleftrightarrow
1539: \left|\frac{d_a(n)}{n}\right|\leq \frac{\log n}{n (M+1)\log q}\]
1540: by the last theorem, and with
1541: \[\frac{1}{(M+1)\log q}\lim_{n\to\infty}\frac{\log n}{n}=0\]
1542: the statement follows.
1543: \ep
1544:
1545: \bthm
1546: With measure one,
1547: \[\liminf_{n\to\infty}\frac{L_a(n)}{n}=\limsup_{n\to\infty}\frac{L_a(n)}{n}
1548: =\frac{M}{M+1}.\]
1549: \ethm
1550:
1551: \bp
1552: From $L_a(n) = d_a(n)+\left\lceil\frac{n\cdot M}{M+1}\right\rceil$
1553: and the previous corollary, we have
1554: $$\frac{L_a(n)}{n}=\frac{d_a(n)}{n}+\frac{M}{M+1}+O(\frac{1}{n})$$
1555: and thus
1556: \[\lim_{n\to \infty} \frac{L_a(n)}{n}=
1557: \lim_{n\to \infty} \frac{d_a(n)}{n}+\frac{M}{M+1}=\frac{M}{M+1}.\qedhere\]
1558: \ep
1559:
1560: In other words, we obtain again the result of Niederreiter and Wang
1561: \cite{NW,WN} that $\frac{L_a(n)}{n}\to\frac{M}{M+1}$ with probability one,
1562: for all $M\in\nn$.
1563:
1564: \newpage
1565: \subsection*{9. Finite Strings}
1566:
1567:
1568: \bde
1569: For $s\in S$, let the {\it generation} of state $s$ be
1570: $$g(s)=\left\lceil\frac{\tilde I_1(s)}{M+1}\right\rceil\cdot (M+1).$$
1571: \ede
1572:
1573: %\newpage
1574: \bcon
1575: For every state $s\in S$ and every $n\in\nn_0$
1576: $$\mu_n(s) = \left\{
1577: \ba{ll}
1578: 0, &n<g(s) \land (T,t)\not\equiv n\\
1579: \mu_\infty(s)\cdot F(s),\ \ &n=g(s)\\
1580: \mu_\infty(s), &n>g(s) \land (T,t)\equiv n\\
1581: \ea
1582: \right.
1583: $$
1584: with
1585: $$\ds F(s) = \prod_{m=M_1(s)}^M\frac{q^m}{q^m-1},$$
1586: for
1587: $$M_1(s)=M + 1 - \#\left\{1\leq m\leq M\ |\ b_m = \max \{
1588: b_1,\dots,b_M,d\}\right\}.$$
1589:
1590: In the case of the empty product for $M_1=M+1$, $F(s) = 1$,
1591: and for $M_1(s) = 1, F(s)={\cal P}(M,q)$.
1592: \econ
1593: \bcon
1594: a$)$ For $g\in\nn_0$, let $\#(g,M)$ be the number of states that are
1595: reachable in the $g$--th generation. Then
1596: $$\#(g,M) = \genfrac(){0cm}{}{g+M}M .$$
1597: b$)$ $\#\{s\in S\ |\ g(s)=g\} = \genfrac(){0cm}{}{g+M}M -
1598: \genfrac(){0cm}{}g M.$
1599: \econ
1600:
1601:
1602: \subsection*{Conclusion}
1603:
1604: We introduced the Battery--Discharge--Model BDM as a convenient container
1605: for all information about linear complexity deviations in
1606: $\fqw$.
1607:
1608: We obtained a closed formula for measures and averages
1609: for the linear complexity deviation, numerically proven for the cases
1610: $M=1,\dots,8$, and conjectured for any $M$, which
1611: coincides with the results known before for $M=1,2,3$,
1612: but gives a better account of the inner structure of these measures.
1613: In particular, the measure is a sum of $M$ components of
1614: the form
1615: \[\Theta(q^{-|d|(M+1)h}), h=1,\dots,M.\]
1616:
1617:
1618: \newpage
1619: \begin{thebibliography}{99}
1620: \bibitem{CV}
1621: M.~del P.~Canales Chac\'on, M.~Vielhaber, {\it Structural and Computational
1622: Complexity of Isometries and their Shift Commutators},
1623: Electronic Colloq.~on Computational Complexity, ECCC {\bf
1624: TR04--057}, 2004.
1625: \bibitem{Dai}
1626: Z.~Dai, X.~Feng, {\it Multi--Continued Fraction Algorithm and
1627: Generalized B--M Algorithm over $\ff_2$}, in \cite{SETA04}.
1628: \bibitem{Fel}
1629: William Feller, {\it An Introduction to Probability Theory and Its
1630: Application} (3rd ed.), Wiley, 1968.
1631: \bibitem{Gus}
1632: F.~G.~Gustavson, {\it Analysis of the Berlekamp-Massey linear feedback
1633: shift-register synthesis algorithm}, IBM J.~Res.~Develop., {\bf 20},
1634: 204--212, 1976.
1635: \bibitem{NRlaw}
1636: H.~Niederreiter, ``The probabilistic theory of linear complexity'',
1637: in: {\it Advances in Cryptology -- EUROCRYPT $'88$} (C.G.~G\"unther, Ed.),
1638: LNCS 330, 191 -- 209, Springer, Berlin, 1988.
1639: \bibitem{NW}
1640: H.~Niederreiter, L.--P.~Wang, {\it Proof of a Conjecture on the Joint
1641: Linear Complexity Profle of Multisequences}, in: INDOCRYPT 2005
1642: (T.~Johansson, S.~Maitra {\it et al.} Eds) , LNCS {\bf 3797}, Springer
1643: 2005, 13--22.
1644: \bibitem{NW1}
1645: H.~Niederreiter, L.--P.~Wang, {\it The Asymptotic Behavior of the Joint
1646: Linear Complexity Profile of Multisequences}, Preprint.
1647: \bibitem{Rosen}
1648: M.~Rosenblatt, {\it Random Processes}, Springer, 1974.
1649: \bibitem{NTL}
1650: Victor Shoup, {\it The Number Theory Library NTL},\\
1651: {\tt http://shoup.net/ntl}
1652: \bibitem{VSETA}
1653: M.~Vielhaber, {\it A Unified View on Sequence Complexity Measures
1654: as Isometries}, in~\cite{SETA04}.
1655: \bibitem{WN}
1656: L.--P.~Wang, H.~Niederreiter, {\it Enumeration results on the joint
1657: linear complexity of multisequences}, to appear in FFA.
1658: \bibitem{CRC}
1659: Handbook of Discrete and Combinatorial Mathematics (K.H.~Rosen, ed.)
1660: CRC, Mouth of the Mouse, Fla., 2000.
1661: \bibitem{SETA04}
1662: Proceedings SETA '04, International Conference on Sequences and
1663: Their Applications, October 24 -- 28, 2004, Seoul, Korea
1664: and LNCS {\bf 3486}, Springer, 2005.
1665: \end{thebibliography}
1666:
1667: \end{document}
1668: