On the b-Symbol Weight Distribution of Dual Melas Codes and a Poisson Randomness Postulate
Gabriel Sac Himelfarb, Moshe Schwartz
Abstract
We prove a new lower bound on the b-symbol weight of codewords in dual Melas codes, which is strictly better than known results. We employ a new strategy that translates a pattern counting problem in linear-feedback shift register sequences to a problem on orbits of binary polynomials under a certain action. We use the same techniques to provide an improved lower bound on the burst-covering radius of Melas codes and a new upper bound on the critical exponent of dual Melas codes.
We then define a new randomness postulate on (families of) binary sequences, based on the definition of infinite Poisson generic sequences. We conjecture that codewords in the dual Melas code satisfy this postulate, and we show partial progress in establishing this conjecture. We also show how a relaxed version of the problem can be completely resolved, and relate the conjecture to the first part of the paper, giving a justification of why the improved bounds on the b-symbol weight were somewhat to be expected.
MOTIVATED by applications to high-density data storage, Cassuto and Blaum introduced symbol-pair codes in [7], [9]. They considered a setting where readings from the channel are overlapping pairs of symbols rather than individual symbols. This model is adequate for scenarios where the read resolution is lower than the write resolution. Cassuto and Blaum's work prompted a fruitful new line of research, including the study of cyclic codes in the symbol-pair read channel [8], [34], and the construction of MDS symbol-pair codes [10], [20], [22], [23].
The symbol-pair channel generalizes naturally to b-symbol read channels, where b consecutive symbols are observed together in each read, instead of just two. Despite there being numerous works in this area, such as [11], [35], [38], the b-symbol weight distribution is only known for a few codes, e.g., [36], [37].
In [32], new bounds on the b-symbol weight for cyclic codes were given by a geometric approach. These may be viewed through the lens of pattern frequencies appearing in linear-feedback shift register sequences (LFSRs). Codewords in cyclic codes are LFSR sequences with connection polynomial equal to the generator polynomial of the dual code. Thus, bounds on the number of occurrences of an all-zero window in the LFSR yield bounds on the b-symbol weight. For instance, Niederreiter established bounds on LFSR pattern occurrences in [28]. It is true, however, that these bounds are not tight in some relevant cases, such as cyclic codes where the generator polynomial factors as the product of irreducibles of the same degree (see [30, Section IV.A.]).
In this work we will focus in particular on the study of dual Melas codes, or equivalently, LFSR sequences that are obtained as the sum of a PN sequence (pseudo-noise sequence or m-sequence) and some shift of its reversal. We will show that if the length of the code is 2k−1, then its k-symbol weight is lower bounded by 2k−1−2log2k2k(1+o(1)). This is strictly better than the known lower bounds of the order 2k−Θ(2k/2) which can be obtained through the application of the Weil-Carlitz-Uchiyama bound on character sums [30] or the Hasse-Weil bound [32]. The main strategy consists in translating the problem from the LFSR domain to studying orbits of binary polynomials under a certain action. We can then take advantage of the algebraic structure of the ring of polynomials, in particular, unique factorization, in order to obtain this improved result. We will see how this technique also allows us to give an improved lower bound for Melas codes on a recently introduced parameter, the burst-covering radius [30], and a new upper bound on the critical exponent of dual Melas codes. The connection between LFSRs and polynomial orbits was previously used by the authors to derive upper bounds on the burst-covering radius of cyclic codes [30], albeit in the opposite direction, that is, the original characterization of the burst-covering radius in terms of degrees of polynomials in certain orbits was translated into the LFSR realm, where previously known results could be employed.
Gabriel Sac Himelfarb is with the Department of Electrical and Computer Engineering, McMaster University, Hamilton, ON, L8S 4K1, Canada (e-mail: sachimeg@mcmaster.ca).
Moshe Schwartz is with the Department of Electrical and Computer Engineering, McMaster University, Hamilton, ON, L8S 4K1, Canada (e-mail: schwartz.moshe@mcmaster.ca).
This paper will be submitted in part to ISIT 2027.
We acknowledge the support of the Natural Sciences and Engineering Research Council of Canada (NSERC), RGPIN-2026-06805 and CGRS D-611819-2026. Cette recherche a été financée par le Conseil de recherches en sciences naturelles et en génie du Canada (CRSNG), RGPIN-2026-06805 et CGRS D-611819-2026. This work was also supported in part by a grant of access to OpenAI models through the ChatGPT for Academic Researchers program.
The second half of this paper presents a new randomness postulate on (families of) binary sequences inspired by the definition of Poisson generic infinite sequences [1]. Golomb famously introduced his three randomness postulates in [13], and showed that PN sequences satisfy all three. Notably, PN sequences do not satisfy the Poisson randomness postulate, which prompts the question: can we give any explicit examples of such sequences? We conjecture that indeed, the codewords in the dual Melas codes satisfy this postulate, and show numerical evidence for this. This observation is totally new as far as we are aware. As first steps towards establishing this conjecture, we show the convergence of the first three factorial moments of relevant random variables to those of the Poisson P(1) distribution, when averaging over all codewords of Melas(k)⊥. Showing convergence for all moments seems like a problem that escapes all currently known techniques and a considerable challenge. We also show how the conjecture is related to the first half of the paper, as it provides an explanation of why a bound like 2k−2k/log2k was indeed to be expected.
The paper is organized in the following way. In Section II we introduce necessary concepts and notations, including results on the connection between the study of LFSR sequences and the study of certain polynomial orbits. In Section III we prove stronger lower bounds on the b-symbol weight distribution of dual Melas codes, as well as estimates on the number of codewords with full b-symbol weight. In Section IV we give an improved lower bound on the burst-covering radius of Melas codes, as well as a new upper bound on the critical exponent of dual Melas codes. We finish that section with an improved algorithm for computing the burst-covering radius of Melas codes. In Section V we introduce the definition and intuition behind a new Poisson randomness postulate for binary sequences, we provide numerical evidence that supports the conjecture that codewords in the dual Melas code satisfy this postulate, and prove convergence of the first three factorial moments of certain random variables to those of the Poisson P(1) distribution. We also show the connection to Section III, and finally, we prove that under a certain relaxation, it is possible to fully prove convergence in distribution to P(1) of the relevant random variables.
II. PRELIMINARIES AND NOTATION
This section is dedicated to presenting the definitions, basic notions, and results that are required for the main claims in the sections to follow. We begin with linear-feedback shift register sequences (LFSRs), then introduce an equivalence relation on binary polynomials which will prove to be useful, and establish a relation between both. We also recall concepts from coding theory, including the definitions of Melas and BCH codes, the notions of b-symbol weight, burst-covering radius and the critical exponent of linear codes.
Throughout the paper, let Fq denote the finite field of size q, and Fq∗≜Fq∖{0}. Let Fq[x] denote the set of polynomials over Fq in the unknown x. If A is a set, we use #A to denote the size of A.
A. Linear-feedback shift registers (LFSRs)
The trace map, TrF2k/F2:F2k→F2, is defined as
TrF2k/F2(α)≜α+α2+⋯+α2k−1.
If the domain and codomain are understood from context, we simply write Tr(⋅). Given α∈F2k, we denote by Mα(x)∈F2[x] the minimal polynomial of α over F2.
Definition 1. Given a polynomial of degree r, g(x)=xr+∑i=0r−1mixi∈F2[x], we define an LFSR sequence of order r and connection polynomial g as a sequence (aj)j≥0 which satisfies the linear recurrence
aj=i=0∑r−1miaj−r+i
for all j⩾r. The elements a0,…,ar−1 are called the initial conditions (or initial elements) of the sequence.
The following theorem summarizes results from [14] and [13].
Theorem 2. Let g∈F2[x]. Then the following two claims hold:
If g is irreducible over F2, and α∈F2r is a root of g, there exists some β∈F2r, determined by the initial conditions a0,…,ar−1∈F2, such that for all j⩾0,
aj=TrF2r/F2(βαj).
If g factors into distinct irreducible polynomials of the same degree k, g=∏i=1egi, then for all j⩾0,
aj=TrF2k/F2(i=1∑eγiαij),
where αi∈F2k is a root of gi and γi∈F2k, for all 1⩽i⩽e.
B. Polynomial orbits
We now introduce polynomial orbits that will facilitate our analysis of certain LFSRs of interest. For a vector v=(v0,v1,…,vn−1)∈F2n, we define the reversal of v as v≜(vn−1,…,v1,v0). In a similar fashion, assume f∈F2[x] of degree r, and write f(x)=xr+∑i=0r−1fixi. Then the reciprocal of f is defined as the polynomial with coefficients in the reverse order of f, i.e.,
f(x)≜1+i=0∑r−1fixr−i=xdegff(x−1).
If f=f we say it is self-reciprocal.
Definition 3. Let α∈F2k be primitive, k⩾3. We define the equivalence relation ∼ on the set {f∈F2[x]:deg(f)<2k}, as:
f∼g⟺∃j∈Zsuchthatf≡xjg(modMαMα−1).
We denote the equivalence class of a polynomial f as Of (as it is the orbit of f under the action of multiplication by x modulo MαMα−1). We say an orbit Of is degenerate if α or α−1 is a root of f, or equivalently, a root of all of its elements.
We emphasize that whenever we use the ∼ equivalence relation, we assume that α∈F2k, k⩾3, and α primitive, are understood implicitly from the context. We present a sequence of three lemmas that study properties of the equivalence relation ∼. First, we look at the size of the equivalence classes.
Lemma 4. The equivalence relation ∼ has:
• One degenerate orbit of size 1, O0={0}.
• Two degenerate orbits of size 2k−1 each, containing multiples of Mα and Mα−1 respectively.
• 2k−1 non-degenerate orbits of size 2k−1 each.
Proof: Trivially O0={0}, and it is the only orbit of size 1. In all other cases, the size of each orbit is the minimal j>0 such that f≡xjf(modMαMα−1), that is, such that f(x)⋅(1+xj)≡0(modMαMα−1). If the orbit is non-degenerate, we deduce that MαMα−1∣xj+1, and if it is degenerate, then either Mα∣xj+1 or Mα−1∣xj+1. In any case, since α and α−1 have order 2k−1, we deduce that the minimal j is 2k−1, and thus #Of=2k−1 for every f.
We further deduce that there are exactly two non-zero degenerate orbits: one contains all 2k−1 non-zero polynomials of degree <2k which are multiples of Mα, while the other contains the multiples of Mα−1.
Finally, the number of non-zero orbits is 2k−122k−1=2k+1, and the number of non-degenerate orbits is 2k−1.
Next, we present a simple test to see whether two polynomials are equivalent in a non-degenerate orbit.
Lemma 5. Let α∈F2k be primitive, k⩾3. If Of is non-degenerate, then f∼g if and only if
f(α)f(α−1)=g(α)g(α−1).
Proof: If f∼g, by definition there exists j such that f(α)=αjg(α) and f(α−1)=α−jg(α−1). Multiplying the two equations we get f(α)f(α−1)=g(α)g(α−1).
For the converse, since Of is non-degenerate, 0=f(α)f(α−1)=g(α)g(α−1). Note that this also implies Og is non-degenerate. Since α is primitive, we have for some j
g(α)f(α)=f(α−1)g(α−1)=αj,
from which we extract
f(α)−αjg(α)=0,f(α−1)−α−jg(α−1)=0.
Thus, MαMα−1∣f−xjg.
Lemma 6. Let α∈F2k be primitive, k⩾3, and f,g∈F2[x]. Write f=xaP, g=xbQ, such that P,Q∈F2[x] and x∤P,Q. Then the following claims hold:
If deg(P), deg(Q)<k, then
f(α)f(α−1)=g(α)g(α−1)⟺P(x)P(x)=Q(x)Q(x),
and deg(P)=deg(Q).
If deg(Q)⩽deg(P)⩽k+s for some s⩾0, then f(α)f(α−1)=g(α)g(α−1) if and only if P and Q satisfy one of the following equations:
where R(x)∈F2[x] has degree ⩽2s and x2(degP−k)R(x−1)=R(x). Notice that there are at most 2s+1 possible such choices for R.
If deg(f), deg(g)<k then
f(α)g(α−1)=f(α−1)g(α)⟺f(x)g(x−1)=f(x−1)g(x).
Proof: Claim 1): Suppose without loss of generality that deg(P)⩾deg(Q). Consider the polynomial
h(x)≜xdeg(P)(P(x)P(x−1)+Q(x)Q(x−1)).(1)
If f(α)f(α−1)=g(α)g(α−1) then h(α)=h(α−1)=0. Thus, MαMα−1∣h. Notice that deg(h)⩽2deg(P)<2k, so h=0. This implies that P(x)P(x−1)=Q(x)Q(x−1), hence deg(P)=deg(Q). Thus, h(x)=P(x)P(x)+Q(x)Q(x)=0.
On the other hand, if P(x)P(x)=Q(x)Q(x), then necessarily deg(P)=deg(Q), and so P(α)P(α)=Q(α)Q(α) implies f(α)f(α−1)=g(α)g(α−1).
Claim 2): Let h be as in (1). If f(α)f(α−1)=g(α)g(α−1) we deduce in the same way that MαMα−1∣h. Since deg(h)⩽2deg(P)⩽2(k+s), we have h=MαMα−1⋅R(x) for some R∈F2[x] with deg(R)⩽2s. Then
PP=xdeg(P)−deg(Q)QQ+MαMα−1R.
Evaluating the above equation in x−1 and using the fact that MαMα−1, PP and QQ are all self-reciprocal, we obtain the claimed identity on R.
For the converse, if P and Q satisfy one of the equations for some R, evaluating at α yields P(α)P(α−1)=Q(α)Q(α−1), which implies f(α)f(α−1)=g(α)g(α−1).
Claim 3): Similarly to 1), suppose without loss of generality that deg(f)⩾deg(g), and consider
h(x)≜xdeg(f)(f(x)g(x−1)+f(x−1)g(x)).
The rest of the argument is analogous.
We will also require the following technical counting lemma, whose proof can be found in the appendix.
We now establish a connection between the polynomial orbits defined above, and LFSR sequences. To that end, we need to introduce Galois-mode LFSRs.
Definition 8. Given a polynomial of degree r, g(x)=∑i=0r−1mixi+xr∈F2[x], we define the Galois-mode LFSR of order r and connection polynomial g, as a sequence generator with states of the form (f0,f1,…,fr−1)∈F2r, and whose state transition is given by:
The output of the LFSR is the sequence of elements fr−1 from each state.
Theorem 9 ([14], [30]). Given a Galois-mode LFSR of order r with a connection polynomial g∈F2[x],
If we identify a state (f0,…,fr−1) with the polynomial f(x)=∑i=0r−1fixi, then the sequence of states corresponds to the sequence of polynomials (xjf(modg)))j≥0, where f is the initial state (initial load).
The output (aj)j≥0 satisfies the linear recurrence
aj=mr−1aj−1+mr−2aj−2+⋯+m0aj−r,
for every j⩾r.
Remark 10. In the setting of Theorem 9, define the companion matrix
A≜01⋮0000⋱00⋯⋯⋱⋱⋯00⋮01m0m1⋮mr−2mr−1.
Let f(x)=∑i=0r−1fixi be the initial load of the Galois-mode LFSR. The states are given by A0f,A1f,A2f,…. Denote by e the row vector e=(0,0,…,0,1). Then the initial elements of the output LFSR sequence are:
⎩⎨⎧eA0feA1f⋮eAr−1f=a0,=a1,=ar−1.
We claim that the vectors eA0,eA1,…,eAr−1 are linearly independent. Indeed, it is not hard to verify inductively that eAi has zeros in coordinates 0,1,…,r−2−i and a 1 in coordinate r−1−i (as well as other possibly non-zero entries in positions r−i,…,r−1).
We deduce that for every choice of initial conditions (a0,…,ar−1), there exists a unique initial load f that generates those initial elements for the output sequence in the Galois-mode LFSR. Thus, there is a one-to-one correspondence between sequences (xjf(modg))j≥0, and LFSR sequences with connection polynomial g.
Instantiating this for g=MαMα−1, we see that there is a one-to-one correspondence between polynomial orbits Of and LFSR sequences with connection polynomial MαMα−1 (distinct up to shifting).
Theorem 11 ([30]). Given g∈F2[x] of degree r, consider the Galois-mode LFSR with connection polynomial g and initial load f=0. Denote by (aj)j≥0 the output sequence. Then
Let us instantiate the previous result in the particular case which will be useful throughout this work.
Theorem 12. Let g∈F2[x], deg(g)=2k, and consider the Galois-mode LFSR with connection polynomial g and initial load f=0. Denote by (aj)j≥0 the output sequence. This sequence has a run of (at least) k zeros at position j, aj=⋯=aj+k−1=0, if and only if deg(xjf(modg))<k. More generally, it has a run of at least t zeros at position j if and only if deg(xjf(modg))<2k−t.
Proof: This is a direct application of Theorem 11.
Theorem 12 establishes a connection between the degrees of polynomials in orbits xjf(modg) and the occurrence of the window 0…0=0k (k consecutive zeros) in an LFSR sequence. In [30], this fact was used in one direction: known results for LFSR sequences were used to prove results on the degrees of the polynomials, which in turn yielded upper bounds on the burst-covering radius of cyclic codes (see the next subsection for the definition of the burst-covering radius). In the present work we will take advantage of this connection in the opposite direction: we will obtain new results on LFSR sequences by studying the corresponding polynomial orbits.
Theorem 12 admits a generalization that characterizes the occurrence of other window patterns besides 0k.
Theorem 13. Let g∈F2[x], deg(g)=2k, and consider the Galois-mode LFSR with connection polynomial g and initial load f=0. Denote by (aj)j≥0 the output sequence. For each w∈F2k, there exists a polynomial hw∈F2[x] of degree <2k, such that
(aj,…,aj+k−1)=w⟺xjf(modg)∈⟨1,x,…,xk−1⟩+hw,
that is, if and only if xjf(modg) belongs to a certain affine subspace of polynomials of dimension k.
Proof: Define the companion matrix A as in Remark 10. The states of the Galois-mode LFSR are A0f,A1f,A2f,…. As before, denote e=(0,0,…,0,1). Let f′=xjf(modg)=∑i=02k−1fi′xi. Thus, (aj,…,aj+k−1)=w if and only if
⎩⎨⎧eA0f′eA1f′⋮eAk−1f′=w0,=w1,=wk−1.
The vectors eA0,eA1,…,eAk−1 are linearly independent by the same argument as in Remark 10. Thus, the above system consists of k linearly independent equations on 2k unknowns f0′,…,f2k−1′. The solution is an affine space of dimension k. By Theorem 12, the solution to the homogeneous system is precisely ⟨1,x,…,xk−1⟩.
We make two comments regarding Theorem 13. First, we note that h0k=0 by Theorem 12. Second, by choosing an adequate representative, we may take hw to be a multiple of xk.
D. Melas codes and related concepts
An [n,n−r] binary linear code, C, is an (n−r)-dimensional subspace, C⊆F2n. We can specify the code C through a parity-check matrix H∈F2r×n, such that c∈C if and only if Hc=0, i.e., C=ker(H). Vectors of the form Hv,v∈F2n, are called syndromes. The dual code of C, denoted C⊥, is the linear code spanned by the rows of H.
Given a vector v=(v0,…,vn−1)∈F2n, a cyclic shift of v is the vector (vn−1,v0,v1,…,vn−2). A linear code C is said to be cyclic if c∈C implies the cyclic shift of c is also in C. With any vector v we associate the polynomial v(x)=∑i=0n−1vixi. It is well known [24] that for a cyclic code there exists a unique generator polynomial, g(x)∈F2[x], deg(g)=r, such that c∈C if and only if c(x)=u(x)g(x), for some u(x)∈F2[x], deg(u)⩽n−r−1.
A binary primitive Melas code of length 2k−1, which we denote by Melas(k), is defined in the following way: given α∈F2k primitive, the parity-check matrix is
Hk=(11αα−1α2α−2⋯⋯α2k−2α−(2k−2)),(2)
where each entry is actually a binary column vector with k entries, obtained by choosing a basis of F2k over F2. If k⩾3, the generator polynomial of Melas(k) is Mα(x)Mα−1(x) and has degree 2k, making Melas(k) a [2k−1,2k−2k−1] code.
By [24, Chapter 7], the codewords of the dual code, Melas (k)⊥, are precisely the LFSR sequences with connection polynomial MαMα−1. Thus, by Theorem 2, the codewords in Melas (k)⊥ are of the form
(Tr(βαj+γα−j))0⩽j⩽2k−2,
for some β,γ∈F2k. Additionally, by Remark 10, there is a one-to-one correspondence between codewords of Melas(k)⊥ (distinct up to cyclic shift) and the polynomial orbits defined by the relation ∼.
The binary primitive 2-error-correcting BCH code of length 2k−1 is defined in the following way: given α∈F2k primitive, the parity-check matrix is defined as
(11αα3α2α6⋯⋯α2k−2α3(2k−2)).
We denote these codes BCH(2, k). If k⩾3, the generator polynomial is Mα(x)Mα3(x) and has degree 2k, see [24, Chapter 9].
E. The b-symbol weight
Now we introduce the definition of b-symbol weight for binary vectors. Recall that the Hamming weight of a vector v=(v0,…,vn−1)∈F2n is defined as wt(v)≜#{0⩽i⩽n−1:vi=0}. For each 1⩽b⩽n−1, define the map πb:F2n→(F2b)n as
The b-symbol Hamming weight of v∈F2n is defined as the Hamming weight of πb(v). In particular, for b=1 we retrieve the regular Hamming weight of v. If we interpret (v0,…,vn−1) as a sequence, the b-symbol weight is equal to n minus the number of occurrences of the pattern 0b (a run of b zeros) in the sequence (where we consider the last symbol to be consecutive to the first).
F. Burst-covering radius and critical exponent
A new parameter on codes, the burst-covering radius, was introduced in [30]. In the particular case of linear codes, this parameter can be defined in the following way.
Definition 14. Let C be an [n,n−r] binary linear code, and H∈F2r×n a parity-check matrix for C. The burst-covering radius, b(C), is the least integer b satisfying that every column vector x∈F2r can be obtained as a linear combination of at most b (cyclically1) consecutive columns of H.
It was shown in [30] that b(C) is independent of the choice of parity-check matrix, H. For cyclic codes, there exists a useful characterization of the burst-covering radius in terms of polynomial orbits.
Theorem 15 ([30, Theorem 23]). Let C be an [n,n−r] binary cyclic linear code with generator polynomial g∈F2[x]. Then
1The last and first columns of H are also considered consecutive.
As a consequence of the last theorem, in the case C=Melas(k) we can use our previously introduced notation and write the burst-covering radius as,
b(C)=f∈F2[x]degf<r,f=0maxf′∈Ofmindegf′+1.
Finally, the critical exponent of a linear code is defined in the following way:
Definition 16 ([15]). The critical exponent of an [n,n−r] binary linear code C⊆F2n, denoted c(C), is the smallest integer c such that C contains c codewords whose supports cover all n coordinate positions. If C has a coordinate which is always zero, the critical exponent is defined to be ∞.
In [30], the following connection between the critical exponent and the burst-covering radius of a cyclic code was established:
Theorem 17. Given C a binary [n,n−r] cyclic code with burst-covering radius b, C=F2n, the critical exponent of its dual code satisfies:
c(C⊥)⩽r−b+1.
III. PATTERN FREQUENCIES AND k-SYMBOL WEIGHT
In this section we will show how the connection between LFSR sequences and polynomial orbits can be used to give improved bounds on the number of occurrences of patterns in Melas(k)⊥ codewords and their k-symbol weights. Throughout this section we fix some α∈F2k, k⩾3, α primitive, so that the equivalence relation ∼ is defined.
We will often abuse notation and use u∈U to indicate choosing one arbitrary representative from a pair in U.
Lemma 18. Let α∈F2k be primitive, k⩾3. Let P∈F2[x] with x∤P and deg(P)=d<k−s for some s⩾0. Suppose that P factors as product of irreducible polynomials in the following way,
P=h∈H∏hahu∈U∏ubuucu.
Then, the number of polynomials g∼P with deg(g)<k−s is
(k−s−d)u∈U∏(1+bu+cu).(4)
Proof: Since deg(P)<k, OP is non-degenerate. By Lemma 5, g∼P if and only if g(α)g(α−1)=P(α)P(α−1). Let g=xbQ, x∤Q, deg(g)<k−s. By Lemma 6, Claim 1), g belongs to the same orbit as P if and only if Q(x)Q(x)=P(x)P(x). If Q factors as
Q=h∈H∏hah′u∈U∏ubu′ucu′,
then by uniqueness of factorization this is equivalent to asking bu′+cu′=bu+cu for every u=u, and ah=ah′ for every h∈H. There are 1+bu+cu choices for (bu′,cu′) satisfying this condition. On the other hand, deg(Q)=deg(P), and deg(g)<k−s, thus 0⩽b<k−s−deg(P). Putting all these together yields the desired result.
Theorem 19. Consider any non-zero codeword c∈Melas(k)⊥, k⩾3. Suppose sk⩾0 are such that k−sk→∞. For the sake of simplicity of notation, we omit the dependency of s on k. Then the number of occurrences of the pattern 0k+s in c is upper bounded by 2log2(k−s)2(k−s)(1+o(1)). Furthermore, there exists a non-zero codeword of Melas(k)⊥ with at least 22log2(k−s)k−s(1−o(1)) occurrences of 0k+s.
Proof: As discussed in Section II, any codeword of Melas(k)⊥ is an LFSR sequence that is the output of a Galois-mode LFSR with connection polynomial MαMα−1 and an initial load f∈F2[x], deg(f)<2k, where α∈F2k is primitive. As the claim omits the all-zero codeword, f=0. By Theorem 12, a run of k+s zeros in this LFSR sequence corresponds to a polynomial of degree ⩽k−s−1 in Of. Thus, we need to count the number of these polynomials.
Assume P∈Of, deg(P)⩽k−s−1, and x∤P. Since f=0, and since deg(P)<k, Of is non-degenerate. Suppose P factors as in Lemma 18. We will now bound the value of (4). The first factor satisfies
k−s−deg(P)⩽k−s=2log2(k−s).
Let D≜⌊21log2(k−s)⌋. The number of irreducible factors u of degree less than D is at most 2D⩽k−s. These contribute at most
By multiplying together all three bounds we obtain the claimed result.
For the existence result, choose d odd such that 2log2(k−s)⩽d⩽2log2(k−s)+2. The number of binary irreducible polynomials of degree d is given by (see [21])
d1e∣d∑μ(e)2d/e⩾d2d−d2d/3,
where μ is the Möbius function, and the bound follows because every proper divisor of d odd is at most d/3. For large enough k−s, 2d−d2d/3>2(k−s−1)+d, and thus there are at least d2(k−1−s)+1 distinct irreducible polynomials of degree d. It is known that no odd-degree irreducible polynomial is self-reciprocal except for x+1 (e.g., see [27, Remark 2.1.50]), so we deduce that there exist at least r=⌊dk−s−1⌋ pairs of reciprocal irreducible polynomials of degree d, {u1,u1},…,{ur,ur}.
Consider the 2r⩾22log2(k−s)+2k−s−1−1 polynomials
i=1∏ruibiui1−bi,
with b1,…,br∈{0,1}. They all have degree r⋅d<k−s and they all belong to the same orbit by the proof of Lemma 18.
Corollary 20. The k-symbol weight of any non-zero codeword in Melas (k)⊥, k⩾3, is at least 2k−1−2log2k2k(1+o(1)).
The bounds in Theorem 19 and Corollary 20 are strictly better than the best known results in the literature. Theorem 30 in [30] (or alternatively, an adaptation of Theorem V.4 in [32]) implies an upper bound on the number of occurrences of 0k of the order 2k/2, in contrast to 2k/logk. The computation in the proof of [30, Theorem 27] shows that the number of occurrences N0k of 0k in the LFSR sequence (Tr(αj+c⋅α−j))0⩽j⩽2k−2, c∈F2k∗, is given by
N0k=2k1J⊆[k−1]∑φ(J),
where
φ(J)=x∈F2k∗∑χ(J(α)⋅x+c⋅J(α−1)⋅x−1),
χ is the additive character χ(x)=(−1)Tr(x), [k−1]={0,1,…,k−1}, and J⊆[k−1] is interpreted as being the non-zero coefficients of a polynomial of degree < k.
More generally, for any w∈F2k, the number of occurrences Nw is given by
Nw=2k1J⊆[k−1]∑(−1)∑j∈Jwjφ(J).(5)
It is known by the Weil-Carlitz-Uchiyama bound (see for example [26]), that ∣φ(J)∣⩽2+21+k/2 if J=∅. This yields the upper bound ∣N0k∣⩽1+21+k/2, which is strictly worse than Theorem 19. That means that there is significant cancellation in the computation of N0k, which a direct application of the Weil bound misses.
So far we have only focused on the all-zero pattern. Can we extend the previous results to others? The following theorem shows that the same techniques allow us to give an answer to this question to a somewhat unsatisfactory extent.
Theorem 21. Consider any codeword c∈Melas(k)⊥, k⩾3. There exist at least 2⌊log2kk⌋+1 patterns w∈F2k such that they occur at most 2log2k5k(1+o(1)) times in c.
Proof: Once again, any codeword of Melas(k)⊥ is an LFSR sequence that is the output of a Galois-mode LFSR with connection polynomial MαMα−1 and an initial load f∈F2[x], deg(f)<2k, where α∈F2k is primitive. The claim trivially holds for the all-zero sequence, so for the rest of the proof we assume f=0.
Let sk=⌊log2kk⌋. Consider w∈F2k such that its corresponding polynomial, hw, as defined in Theorem 13, has degree deg(hw)⩽k+sk. There are 2sk+1 such w, since the hw are multiples of xk and have degree ⩽k+sk. By Theorem 13, the number of occurrences of w is equal to the number of polynomials in the orbit which also belong to the affine space ⟨1,x,…,xk−1⟩+hw, i.e.,
#(Of∩⟨1,x,…,xk−1⟩+hw)⩽#{u∈Of:deg(u)⩽k+sk}.
Assume P∈Of, deg(P)⩽k+sk, x∤P, and P is of maximal degree among all valid choices. By Lemma 6, Claim 2), any other polynomial in Of, g=xbQ with x∤Q and degg⩽k+sk, has to satisfy one of the following equations:
with deg(R)⩽2sk and x2(degP−k)R(x−1)=R(x). Since P is fixed, for each of the possible 2sk+1 polynomials R we can compute the left-hand side of the above equation and compute its factorization,
where the left-hand side has degree at most 2(k+sk). These equations might or might not have a solution: all the exponents ah,R must be even and bu,R=cu,R has to hold for every u∈U for there to exist a valid Q. If there are solutions, by the same argument as in the proof of Lemma 18, the number of possible polynomials Q is ∏u∈U(1+bu,R). For each of the 2sk+1 equations, the exponent b can take at most k+sk+1 values, so the total number of solutions is upper bounded by
We conjecture that a similar bound on the number of occurrences should hold for every pattern w∈F2k, and evidence supporting this claim is discussed in Section V-D.
Conjecture 22. The number of occurrences of any w∈F2k in an arbitrary non-zero codeword of Melas(k)⊥ is at most 2log2kk(1+o(1)) for some constant ℓ.
It would seem that the techniques we used so far are incapable of proving this conjecture. While it might be tempting to attribute this to some deficiency in the proposed approach, in Section V-D we actually show that there really exists a fundamental difference between the behavior of the all-zero pattern 0k and other patterns.
To conclude this section, we show an analogous result to Theorem 19 for runs of zeros of length < k.
Theorem 23. Consider any non-zero codeword c∈Melas(k)⊥. Let sk⩾0 for each k. For the sake of simplicity of notation, we omit the dependency of s on k. The number of occurrences of the pattern 0k−s in c is upper bounded by 2s+log2(k+s)2(k+s)(1+o(1)). Furthermore, there exists a non-zero codeword of Melas(k)⊥ with at least 2log2(k+s)k+s(1−o(1)) occurrences of 0k−s.
Proof: c is an LFSR sequence that is the output of a Galois-mode LFSR with connection polynomial MαMα−1 and an initial load f∈F2[x],deg(f)<2k,f=0, where α∈F2k is primitive. By Theorem 12, the number of occurrences of 0k−s in c is equal to #{u∈Of:deg(u)⩽k+s−1}. The proof is now the same as the proof of Theorem 21, but the 2s+1 is not absorbed in the final bound.
For the existence result, the proof is the same as in Theorem 19. (This shows that the equation corresponding to R(x)=0 has enough solutions, while disregarding the rest of the equations).
As a final corollary for this subsection, we show that Theorem 23 implies Conjecture 22 for patterns of low linear complexity.
Corollary 24. Let w=(w0,…,wk−1)∈F2k be a binary pattern, and assume there exist 0⩽s<k and coefficients not all zero a0,…,as∈F2 such that for all 0⩽j<k−s, ∑i=0saiwj+i=0. Then the number of occurrences of w in any non-zero codeword c∈Melas(k)⊥ is upper bounded by 2s+log2(k+s)2(k+s)(1+o(1)). In particular, for patterns with s=O(log2kk), Conjecture 22 holds.
Proof: Let c∈Melas(k)⊥ be a non-zero codeword, c=(c0,…,c2k−2). Let E be the cyclic rotation operator, i.e., E(c)=(c1,…,c2k−2,c0). Note that any occurrence of w in c induces an occurrence of 0k−s in ∑i=0saiEi(c)=c′, where c′∈Melas(k)⊥. Since s<k, necessarily c′=0. The conclusion follows by Theorem 23.
B. Codewords with full k-symbol weight
Now we shift the focus from studying individual codewords in Melas(k)⊥ and the number of occurrences of 0k, to analyzing the number of codewords that have this pattern at least once. This will allow us to give asymptotics on the number of codewords with full k-symbol weight, and also give an improved lower bound on the burst-covering radius of Melas codes in the next section.
Recall the definition of H and U from (3). Consider the following set of tuples of natural numbers:
We define the degree of an element in S as ∑h∈Hahdeg(h)+∑u∈Unudeg(u). With each non-zero f∈F2[x], we associate an element ϕ(f)∈S in the following way:
Notice that deg(ϕ(f))+a=deg(f), so that deg(ϕ(f))⩽deg(f).
Lemma 25. Let α∈F2k be primitive, k⩾3. Let f,g∈F2[x], deg(f), deg(g)<2k, be such that f(α), f(α−1)=0. If ϕ(f)=ϕ(g), then f∼g. Whenever deg(f), deg(g)<k, the converse is also true.
Proof: Let ϕ(f)=((ah)h∈H,(nu){u,┌∈U}). Notice that f(x)f(x−1)=x−deg(ϕ(f))∏h∈Hh2ah∏u∈U(u┌u)nu is completely determined by ϕ(f), so f(x)f(x−1)=g(x)g(x−1), which clearly implies that f(α)f(α−1)=g(α)g(α−1), and thus f∼g, by Lemma 5.
If deg(f), deg(g)<k, and f∼g belong to a non-degenerate orbit, then by Lemma 6, f(x)f(x−1)=g(x)g(x−1), and thus ϕ(f)=ϕ(g).
Define
σ(d)≜#{s∈S:deg(s)=d},τ(d)≜#{h∈H:deg(h)=d}.
From Lemma 25 we immediately obtain the following theorem.
Theorem 26. Let k⩾3, and define θ(D) to be the number of distinct non-degenerate orbits of ∼ containing a polynomial of degree < D. Then,
θ(D)⩽d<D∑σ(d).
Furthermore, if D⩽k, then equality holds.
Proof: Given an orbit which contains an element f of degree <D, we can associate to it the element ϕ(f)∈S which has degree deg(ϕ(f))⩽deg(f)<D. Notice that there might be more than one choice for each such orbit, but given two distinct non-degenerate orbits, their associated elements in S will be different thanks to Lemma 25. This proves the desired inequality.
If D⩽k, define the mapping O↦ϕ(f). By Lemma 25, it is well defined and injective. Given s=((ah)h∈H,(nu)u∈U)∈S of degree d<D, the polynomial f=∏h∈Hhah∏u∈Uunu has degree d<D, ϕ(f)=s, and the orbit of f is non-degenerate since deg(f)<k. This shows that the map is also surjective.
Lemma 27. The previous generating functions satisfy,
a) H(z)U(z)=Σ(z),
b) H(z)U2(z)=(1−z)/(1−2z),
c) H(z) is analytic in ∣z∣<1/2 and has a singularity in z=1/2.
Proof: See the Appendix.
For λ∈C we can define the formal exponentiation by:
(1+F(z))λ=n⩾0∑(nλ)F(z)n
(see for example [33, Example 1.1.10]), which allows us to define the formal square root. Define
A(z)≜(1−z)H(z)=n⩾0∑anzn.
Theorem 28. We have
Σ(z)=1−2z(1−z)H(z)=(1−2z)−1/2A(z),
where we choose the branch of the square root such that Σ(0)=1.
Proof: The proof is immediate from Lemma 27.
Theorem 29.
σ(d)=A(1/2)πd2d(1+O(1/d))
Proof: See the Appendix.
Theorem 30.
d<D∑σ(d)=A(1/2)πD2D(1+O(1/D)).
Proof: See the Appendix.
Theorem 31. Let s⩾0 such that k−s→∞. The number of codewords in Melas(k)⊥ which do not have full (k+s)-symbol weight is
A(1/2)π(k−s)22k−s(1+O(k−s1)).
In particular, the number A2k−1(k+s) of full (k+s)-symbol weight codewords satisfies
22kA2k−1(k+s)=1−O(2sk−s1)⟶1.
Proof: By Theorem 12, a codeword in Melas (k)⊥ contains a run of k+s zeros (and thus, does not have full (k+s)-symbol weight) if and only if the corresponding polynomial orbit contains a polynomial of degree <2k−(k+s)=k−s. Combine the equality from Theorem 26 and Theorem 30. Since each non-degenerate orbit induces 2k−1 codewords (there are 2k−1 distinct rotations), we obtain the claimed result.
IV. BURST-COVERING RADIUS AND CRITICAL EXPONENT
In this section, we prove new bounds on the burst-covering radius of Melas (k) as well as the critical exponent of Melas (k)⊥. These improve upon known results by using tools from the previous section. We then also provide an improved algorithm for computing the exact burst-covering radius of Melas codes. We start with the burst-covering radius.
Theorem 32. The burst-covering radius of Melas(k) satisfies
Proof: By Lemma 4, the number of non-degenerate orbits is 2k−1. By Theorem 26, if D is such that ∑d<Dσ(d)⩽2k−2, then there exists an orbit whose elements all have degree ⩾D, and thus b(Melask)⩾D+1 by Theorem 15.
By Theorem 30, it suffices to ask
D⩽k+21log2D+log2(A(1/2)π)−o(1),
to guarantee ∑d<Dσ(d)⩽2k−2. For D>k we can choose D as big as
where log is the natural logarithm and logH(0.5)=∑d⩾1τ(d)log(1−0.5d1) was estimated by using the formula
τ(d)=d1j∣2d,jodd∑μ(j)22jd,
for d even (see [6]), τ(d)=0 for d odd greater than 1, τ(1)=1.
The previous bound [30, Theorem 38] gave only b(Melas(k))⩾k+2. Thanks to Theorem 17, we also obtain the following bound on the critical exponent of the dual Melas codes.
Corollary 33. The critical exponent of Melas (k)⊥ is upper bounded by
c(Melas(k)⊥)⩽k−21log2k+0.449041⋯+o(1).
As far as we are aware, this bound is strictly better than what could be obtained by known results, such as Bose-Burton's theorem [5].
A. An improved algorithm to compute the burst-covering radius
In [30] a general algorithm is given for computing the burst-covering radius of binary cyclic codes. In this section we propose an improved algorithm for the case of Melas codes. This algorithm also applies to primitive double-error-correcting BCH codes, and can be further generalized to any binary cyclic code with simple roots, although we do not give this generalization as it lies outside the scope of this paper.
Recall the parity-check matrix Hk of (2) for Melas(k). Consider the syndromes of Melas(k), (x1,x2)∈F2k2. Define an equivalence relation among syndromes as follows: (x1,x2)≈(y1,y2) if and only if y1=αjx1, y2=α−jx2 for some integer j. Besides {(0,0)}, there are two degenerate equivalence classes {(0,x2):x2∈F2k}, {(x1,0):x1∈F2k}. The rest of the equivalence classes have 2k−1 elements each. These can be identified by a single element in F2k: the product x1⋅x2 is constant throughout each equivalence class, and two distinct non-degenerate equivalence classes have distinct values of x1⋅x2.
Consider a linear combination within a window of width t starting at the first column of Hk. This linear combination can be represented with a polynomial f∈F2[x], deg(f)<t, and the syndrome is (f(α),f(α−1)). As we slide the window, we generate all the syndromes (αjf(α),α−jf(α−1)), that is, the equivalence class of the original syndrome.
Algorithm 1 computes the burst-covering radius of Melas (k) using the following strategy. The polynomials in F2[x] are listed using a binary reflected Gray code. In this way, all polynomials of degree j are listed before all polynomials of degree j+1, for every j. For each polynomial f we compute the corresponding syndrome (f(α),f(α−1)) and record that the corresponding syndrome equivalence class has been covered. To this end, we employ two boolean variables corresponding to the degenerate orbits degenerate_1, degenerate_2, and a boolean array non_degenerate_orbs indexed by the elements of F2k. In terms of implementation, the latter can be thought of as a boolean array of dimensions 2×2×⋯×2, indexed by the coefficients of the polynomial representation of the field elements. The algorithm finishes when all orbits have been covered, and outputs the current size of the window (which can be computed from the current index in the Gray code ordering of the polynomials).
The algorithm does not actually generate the full Gray code listing at the beginning, but instead employs the function GrayTransition(i), which given an index in the Gray code, computes the bit position which needs to be flipped in that step. In that way, the syndromes can be updated easily by adding (αj,α−j), where j is the bitflip position. The i-th vector in the reflected binary Gray code can be computed with bitwise operations as i⊕⌊i/2⌋ (the bitwise XOR of the binary representations), see [18, Eq. 7.2.1.1–(9)], and GrayTransition(i) can be computed from this. We can assume it requires at most O(k) time.
Now we analyze the time complexity of Algorithm 1. The initialization of variables requires O(2k)=O(n) time. The number of iterations is at most 2b(Melas(k))⩽223k+23=O(n1.5) by [30, Theorem 36]. In each iteration, all operations require constant time except for the finite field sum, multiplication and exponentiation operations. Addition requires time O(k)=O(logn). Even with a naive implementation, the cost of the finite field multiplication is O(k2)=O(log2n). The powers of α and α−1 can be computed the first time they are needed and then stored. Furthermore, αj is not needed until after all the powers α,α2,…,αj−1 have been computed, so it can be obtained with just one multiplication α⋅αj−1. Notice that the highest power needed αj has j⩽b(Melas(k))⩽23k+23. Thus, the total cost is O(n+n1.5⋅log2n+log2n⋅23logn)=O(n1.5⋅log2n). In comparison, Algorithm 1 in [30] requires O(n2logn) time.
Algorithm 1 was used to compute all possible values of the burst-covering radius of Melas (k) for 6⩽k⩽12, which can be found in Table I. For each value of b, the table indicates how many non-conjugate primitive roots yield a code with that value of b, and one possible Mα.
V. A POISSON RANDOMNESS POSTULATE
A. Introduction and definition
In the study of infinite sequences over finite alphabets, several different notions of what it means for a sequence to behave randomly have been given. Probably the first and most famous one is Borel's normality [12], which requires the frequencies of symbols to converge to the uniform distribution as we look at increasingly longer prefixes, as well as the frequencies of pairs of symbols, triplets, etc. If we only ask the frequencies of symbols to satisfy this requirement, the sequence is called simply normal.
Algorithm 1 Computation of the burst-covering radius of Melas(k)
1: Input: k⩾3,α∈F2k primitive
2: Output: b burst-covering radius of Melas(k) with generator polynomial MαMα−1
3: function BURST_RADIUS_MELAS(k, α)
4: non_degenerate_orbs ←2k−1[False,…,False]
5: degenerate_1 ← False
6: degenerate_2 ← False
7: covered_orbits ← 0
8: synd ←(1,1)
9: i ← 1
10: while True do
11: if synd[0]=0 and not degenerate_1 then
12: degenerate_1 ← True
13: covered_orbits++
14: else if synd[1]=0 and not degenerate_2 then
15: degenerate_2 ← True
16: covered_orbits++
17: else if synd[0] = 0 and synd[1] = 0 then
18: orbit ← synd[0] ⋅ synd[1]
19: if not non_degenerate_orbs[orbit] then
20: non_degenerate_orbs[orbit] ← True
21: covered_orbits++
22: end if
23: end if
24: if covered_orbits = 2k+1 then
25: return ⌊log2i⌋+1
26: end if
27: j ← GrayTransition(i)
28: synd ← (synd[0] + αj, synd[1] + α−j)
29: i++
30: end while
31: end function
TABLE I
ALL POSSIBLE BURST-COVERING RADII OF Melas(k)
k
Upper bound
b
M_α(x)
# of roots
6
10
9
x^6 + x + 1
2/6
10
x^6 + x^4 + x^3 + x + 1
4/6
7
12
11
x^7 + x + 1
18/18
8
13
12
x^8 + x^4 + x^3 + x^2 + 1
16/16
9
15
13
x^9 + x^6 + x^4 + x^3 + 1
26/48
14
x^9 + x^4 + 1
22/48
10
16
15
x^10 + x^6 + x^5 + x^3 + x^2 + x + 1
60/60
11
18
16
x^11 + x^2 + 1
170/176
17
x^11 + x^10 + x^9 + x^8 + x^3 + x + 1
6/176
12
19
17
x^12 + x^7 + x^6 + x^5 + x^3 + x + 1
132/144
18
x^12 + x^10 + x^8 + x^4 + x^3 + x^2 + 1
12/144
More recently, Zeev Rudnick proposed the definition of λ-Poisson generic sequences based on his work on lacunary sequences [29]. In particular, we will focus on the case λ=1. Let S∈F2n be an infinite binary sequence. Denote by Nw(k) the number of occurrences of w∈F2k in the prefix of S of length 2k. Consider the probability spaces Ωk=F2k with the uniform measure μk, and define the random variables Xk:Ωk→R as Xk(w)=Nw(k). Then S is said to be 1-Poisson generic if
Xkdk→∞P(1),
or equivalently, if
2k#{w∈F2k:Nw(k)=i}k→∞i!e−1
for every i⩾0.
Peres and Weiss proved that almost all sequences with respect to the product measure are Poisson generic, although they did not publish their result. The proof was later presented in [1], where it is also shown that there exist countably many computable Poisson generic sequences. An explicit construction of λ-Poisson generic sequences was given in [2] for alphabets of size 3 or larger, and in the binary case, the construction works for λ⩽ln(2).
In the context of finite (or periodic) binary sequences there has also been extensive work on the matter of randomness. For example, Golomb proposed three randomness postulates R1, R2 and R3 in his book on linear feedback shift register sequences [13]. R1 requires the number of ones and zeros in a period of the sequence to differ by at most 1. Notice that this resembles the notion of simple normality that we mentioned earlier, albeit somewhat stronger.
We propose a randomness postulate on a sequence of binary sequences, which extends the definition of 1-Poisson generic sequences. Loosely speaking, we are looking for a sequence of binary sequences that asymptotically approaches the 1-Poisson generic postulate.
Definition 34 (Poisson randomness postulate). Let S=(S(k))k∈N be a sequence of infinite binary sequences. Let Nw(S(k)) be the number of occurrences of w∈F2k whose first coordinate falls inside the prefix 2 of length 2k−1 of S(k). Consider the probability spaces Ωk=F2k with the uniform measure μk, and define the random variables Xk:Ωk→R as Xk(w)=Nw(S(k)). We say S is 1-Poisson generic if
Xkdk→∞P(1).
We comment that the length of the prefix, 2k−1, is somewhat arbitrary, and may be replaced with prefixes of length 2k(1+o(1)) without changing the essence of Poisson randomness.
For an intuition, we can think of this definition in terms of allocations of balls in bins. Given k∈N and a binary sequence of length 2k, we may think of each window of length k in the sequence as a ball, and each of the possible length- k binary patterns as a bin. Placing the ball corresponding to the i-th window inside a bin labeled w∈F2k means that the sequence has the pattern w at position i. If we ignore the dependencies between balls corresponding to overlapping windows, distributing 2k balls in 2k boxes uniformly at random should follow a Poisson occupancy law.
PN sequences satisfy all three of Golomb's randomness postulates. Thus, one might be tempted to think that choosing S=(S(k))k∈N with S(k) being an order- k PN sequence, provides a 1-Poisson generic family. However, this idea fails completely: in a PN sequence of order k, every non-zero window of length k appears exactly once, and thus the random variables Xk converge in distribution to the constant 1. (This is analogous to the fact that infinite de Bruijn sequences are not Poisson generic). Given the heuristic in the previous paragraph, this does not come as much of a surprise, since a PN sequence corresponds to an allocation in which all but one of the bins contain exactly one ball each.
As a remark, it is possible to give alternative definitions of the Poisson randomness postulate that apply to individual sequences rather than families of sequences, although we will not consider them in this work. For example, one may conceive a Poisson ε-generic sequence to be a periodic sequence, say of length 2k−1, such that dTV(Xk,P(1))<ε.
B. A candidate family of sequences
We will now present two families of sequences which empirically seem to satisfy the Poisson convergence condition. For each k, let αk∈F2k∗ be a primitive element. For ease of notation, we will omit the subscript k in αk and leave the dependency implicit. Define the two LFSR sequences S1(k),S2(k) as
Notice that S2(k) is the reverse of S1(k). When k⩾3, α,α−1 are both primitive, so it follows that both sequences are PN sequences of minimal period 2k−1.
For each c∈F2k, denote by Sc(k) the LFSR sequence
Sc(k)=(Tr(αi+c⋅α−i))0⩽i⩽2k−2,
which is the bitwise sum of S1(k) and a shift of S2(k). The sequences Sc(k) are codewords in the code Melas (k)⊥.
Technically, Definition 34 calls for infinite sequences, but since we are only interested in the (2k−1)-prefix, we may complete Sc(k) in any way to an infinite sequence, say, periodically. Computing the distribution of the random variables Xk for
2Notice that by our convention, the windows of length k that start in one of the last k-1 positions of the prefix are counted, even if they are not fully contained within the prefix of length 2k−1.
TABLE II
EMPIRICAL DISTRIBUTIONS P(X15=i) FOR Melas(15) ⊥ AND BCH(2,15) ⊥, i⩽8
the sequences Sc(k) as defined in the previous section, we observe that they indeed seem to converge to a P(1) distribution. Table II shows the point mass probabilities of the random variables Xk for two LFSR sequences, one in Melas(15) ⊥ and one in BCH(2,15) ⊥, and compares them to the P(1) distribution by means of the total variation distance dTV. The values are rounded to the fourth most significant digit.
Conjecture 35. For any choice of constants ck∈F2k∗, the family {Sck(k)} is Poisson generic.
We also conjecture that this holds for the codewords in the BCH(2, k) ⊥ code:
Conjecture 36. For any choice of constants ck∈F2k∗, the family {(Tr(αi+ck⋅α3i))0⩽i⩽2k−2} is Poisson generic.
We now give a heuristic in an attempt to explain intuitively why these sequences are somewhat natural candidates. Choose two PN sequences of length 2k−1, S1 and S2, independently at random and compute their bitwise addition S1⊕S2. If we disregard again the dependencies between overlapping windows, we may think of each PN sequence as a random permutation of the length-k windows 00…01,00…10,…,11…11. Fix a pattern w∈F2k. For each u∈F2k, there is exactly one v=u⊕w∈F2k∖{0k} such that u⊕v=w (this does not apply to u=w, but we can ignore it for the sake of the heuristic). The probability that w does not appear in S1⊕S2 is equal to the probability that none of the pairs (u,u⊕w) are aligned. This is equivalent to computing the probability that S2 is (as a sequence of k-length windows) a permutation of S1 with no fixed point (a derangement). This is known to be
i=0∑2k−1i!(−1)i⟶e1,
precisely the probability predicted by P(1). More generally, the probability that w appears exactly j times is given by
We point out that the heuristic is still not completely satisfactory: what does it mean for two PN sequences to be “independent”? Is the reverse of a PN sequence “independent” from the original one, which is what Conjecture 35 might seem to suggest? Also, when k is even, the sequence (Tr(α3i))0≤i≤2k−2 is not PN, since α3 is not primitive.
C. Study of Melas( k) ⊥
Let T1(k),T2(k):F2k→F2k be the F2-linear transformations given by
For convenience of notation, from now on we will avoid the superscript k unless we want to make the dependency explicit. Notice that T1(αi) and T2(α−i) are the i-th windows in S1 and S2 respectively. This implies that T1,T2 are both isomorphisms: since S1 and S2 are PN sequences, each non-zero window appears exactly once in each period. Let L be the F2-linear map defined as L=T2−1T1.
Define the probability spaces Ωk=F2k together with the uniform measure μk. Let Nw(Sc(k)) be the number of occurrences of w in the first period of Sc(k) (its length 2k−1 prefix). Define in each Ωk the random variables Xk,c:Ωk→N0 as,
Xk,c(w)=Nw(Sc(k)).
Conjecture 35 says that for every choice of constants c1,c2,…, with ck∈F2k∗ for every k,
Xk,ckdk→∞P(1).
For convenience, we will sometimes omit the dependency of c on k. To prove the conjecture, it would suffice to show that the factorial moments of Xk,c converge to 1 (see for example [4, Theorem 1.22]).
Define the falling factorial (x)t≜x(x−1)…(x−t+1). Let Mt(k,c)=E[(Xk,c)t]=E[Xk,c(Xk,c−1)…(Xk,c−t+1)] be the t-th factorial moment of Xk,c. Notice that the i-th window of Sc can be computed as
T1(αi)+T2(c⋅α−i)=T2(T2−1T1(αi)+c⋅α−i).
Since T2 is an isomorphism, studying the pattern frequencies in Sc is equivalent to studying the sizes of the fibers of the map
Given x=y in F2k∗, let a=x+y=0, b=xy=0. Notice that this means that x2+ax+b=0. The condition defining the set in the above equation is equivalent to
b=L(a)c⋅a.
Thus, for each value of a, b is completely determined, which implies that x can take zero or two values, depending on whether the quadratic equation
x2+ax+L(a)ca=0
has roots in F2k or not. Solving this equation is equivalent to solving
(x/a)2+(x/a)+aL(a)c=0.
It is known [21, Theorem 2.25] that this equation has two solutions if and only if Tr(aL(a)c)=0, and no solutions otherwise. Thus,
Notice that in the last sum above, the argument of the additive character is a rational function of a, since L is a linearized polynomial. Traditional Weil bounds are not relevant in this case due to the high degree of the polynomial. There are some known extensions of the bound for polynomials of low weight-degree, such as [17], but they are not useful in the previous computation.
First, let us compute the expected value of M2(k,c) when randomizing over c:
Let W(c)=∑u∈F2k∗N0k(Su)χ(cu−1). For convenience, let Nu=N0k(Su). Regard W(c) and M2(k,c) as random variables over F2k∗ considered with the uniform measure. Then
The result follows from the Borel-Cantelli lemma, since ∑kk3/2k<∞.
We will see now that if we average over c (that is, we average the frequency counts over all distinct rotationally non-equivalent LFSRs with connection polynomial MαMα−1), then we can prove convergence of the third moment.
Define the probability spaces Ωk=F2k∗×F2k together with the uniform measure μk. Define in each Ωk the random variables Xk:Ωk→N0 as:
Xk(c,w)=Nw(Sc(k)).
Let Mt(k)=E[(Xk)t]=E[Xk(Xk−1)…(Xk−t+1)] be the t-th factorial moment of Xk.
Theorem 38. The following factorial moment converges:
The two equalities x, y, z must satisfy are equivalent to
c=xyx+yL(x+y)=xzx+zL(x+z).
Let a=x+y=0, b=x+z=0. Now,
(x+a)aL(a)=(x+b)bL(b),
and thus
x(aL(a)+bL(b))=L(a)+L(b).(9)
The right-hand side must be non-zero since y=z, and thus we conclude there is a solution for x if and only if aL(a)+bL(b)=0.
Notice that (c,x,y,z) is uniquely determined by the triplet (a,b,x). In order to guarantee x,y,z=0 and that they are all distinct, a,b,x should satisfy a,b=0, a=b, x=0, x=a and x=b. It is easy to verify using (9) that the last three conditions are redundant. Thus, the third moment is equal to
We claim that dimEv=dimRv. On the one hand, a∈Ev if and only if Tr(a⋅(αj+vα−j))=0 for every 0⩽j⩽k−1, which happens if and only if a∈⟨1+v,α+vα−1,…,αk−1+vα−(k−1)⟩⊥. Thus, dimEv=k−dim⟨αj+vα−j⟩0⩽j⩽k−1. On the other hand, Rv is the kernel of the linear map ∑j=0k−1gjxj↦∑j=0k−1gj⋅(αj+vα−j), which is a surjection onto ⟨αj+vα−j⟩0⩽j⩽k−1, and thus has dimension dimRv=k−dim⟨αj+vα−j⟩0⩽j⩽k−1=dimEv.
and for k even we obtain an analogous result, which concludes the proof.
D. Connection to Section III
Let Nmax(Sc(k)) denote the maximum number of occurrences of any pattern w∈F2k in Sc(k). If it were true that all moments of the variables Xk,c converged to those of P(1), this would imply that they all remain bounded as k→∞. In particular, we should have that for every t⩾1, the following remains bounded:
2k(Nmax(Sc(k)))t.
In particular, the function 2logkk satisfies this requirement, which is coherent with Theorem 19 and Conjecture 22.
So far, our analysis has fallen into one of the following two categories: we either fixed an LFSR sequence and randomized over the patterns, or we randomized over both sequences and patterns. In both cases, we observe a Poisson behavior. But what if we fix a pattern and randomize over the sequences instead? More precisely, given a fixed wk∈F2k, define the random
TABLE III
EMPIRICAL DISTRIBUTION P(Xw=i) FOR Melas(8) ⊥, w FIXED, i⩽3
variables Xwk over F2k∗ with the uniform measure as Xwk(c)=Nwk(Sc). Is it true that for every choice of w1,w2,…, we have Xwkddk→∞P(1)? The answer is no! For w=0k, Theorem 31 with s=0 implies that X0kddk→∞0.
Nonetheless, we conjecture that for almost every choice of (w1,w2,…,wk,…)∈∏k≥1F2k with respect to the product of uniform measures, the distribution does indeed approach the P(1) distribution. Table III shows the empirical point mass distributions rounded to 4 significant digits, for k=8 and six possible values of w. We can observe that indeed for w=08 (and w=07 as well), the distributions are far away from P(1), while for the remaining four patterns the distance is much smaller.
E. Another relaxation
Given our previous observation that studying the pattern frequencies in Sc is equivalent to studying fibers of the map (6), a natural relaxation of the problem would be to randomize over all possible F2-linear transformations L∈L(F2k). We could also randomize over all invertible linear transformations, although the arguments become a bit more involved.
Theorem 39. For each k⩾1 consider the space Ωk′=F2k×L(F2k) together with the uniform measure μk′. Define the random variables Xk′:Ωk′→N0 as:
Let us separate the counting into different cases.
Case 1: {αj1,…,αjt} is linearly independent. There are ∏i=0t−1(2k−2i) choices of j1,…,jt that correspond to this case. For each such choice and for each value of u∈F2k, the equations L(αji)=u+α−ji,1⩽i⩽t, can be extended in 2k(k−t) ways to define a linear transformation L∈L(F2k). Thus, the contribution of these elements to the sum is:
Case 2: {αj1,…,αjt} is linearly dependent. Let d=dim(⟨αj1,…,αjt⟩)<t and let s be the size of some linearly dependent subset {αjσ1,…,αjσs} satisfying ∑i=1sαjσi=0. Then L has to satisfy ∑i=1sL(αjσi)=∑i=1sα−jσi+s⋅u=0. We separate into two sub-cases:
Case 2.a.: s is odd for some linearly dependent subset. Then, u=∑i=1sα−jσi and there is at most one possible value of u∈F2k given a choice for j1,…,jt, and L can be extended in 2k(k−d) ways. By the dimension assumption, the number of choices for j1,…,jt is at most t!∏i=0d−1(2k−2i)∏i=0t−d−1(2d−d−i)⩽t!2kd2d(t−d). Hence, this case contributes at most:
Case 2.b.: For every possible choice of j1,…,js such that ∑i=1sαjσi=0, s is even. In this case, ∑i=1sα−jσi=0 and there is possibly no restriction on u. Choose {jσ1,…,jσs} in particular as a minimal linearly dependent set. Note that d⩾s−1.
Let αjσi=xi for 1⩽i⩽s. We deduce that x1−1+⋯+xs−1−1+(x1+⋯+xs−1)−1=0, which implies that
1⩽i,j⩽s−1i=j∑xi21⩽ℓ⩽s−1ℓ=i,j∏xℓ=0.
The above polynomial has total degree s−1. By the Schwartz-Zippel lemma [31], [39], the number of solutions (x1,…,xs−1)∈F2ks−1 is at most (s−1)2k(s−2).
Once {jσ1,…,jσs} is chosen, we need to choose d−(s−1)=d−s+1 additional linearly independent elements, of which there are at most (2k)d−s+1 options, and we need to choose the remaining t−s−(d−s+1)=t−d−1 elements, which have to belong to the d-dimensional subspace of the previously chosen elements, and thus there are at most (2d)t−d−1 options. As we mentioned before, u could take 2k values.
Now, there are 2k(k−d) possible extensions for L. All in all, we get the following upper bound on the contribution for this case:
Notice that Theorem 39 does not shed light on our original problem. Out of the 2k2 choices of linear transformation L, only 2k of these actually correspond to a binary LFSR sequence. However, it does give information on the average distribution of values of LFSR sequences over F2k with connection polynomial MαMα−1. Since MαMα−1 factorizes linearly as (x+α)(x+α2)…(x+α2k−1)(x+α−1)…(x+α−2k−1) over F2k, such a sequence is equal to
for some choice of a0,…,ak−1,b0,…,bk−1. If we let L1(x)=∑i=0k−1aix2i and L2(x)=∑i=0k−1bix2i, L1 and L2 are linearized polynomials, and thus, linear transformations. The sequence is equal to (L1(αi)+L2(α−i))0≤i≤2k−2, so in the case L2 is invertible, the distribution of values of the sequence is the same as the distribution of values of the map L2−1L1(x)+x−1.
It is worth noting that if we instead wished to study the distribution of values of the map f(x), where f is a random polynomial over F2k, there are similar results available in the literature. For example, the number of roots that lie in F2k of a polynomial of degree <2k over F2k chosen uniformly at random, converges in distribution to a P(1) random variable [19].
VI. CONCLUSION
In order to shed a different light on the results of this work, we now give some concluding remarks addressing its contents in the opposite order to the one they were presented in.
In this work we introduced a new randomness postulate on families of binary sequences, motivated by the empirical observation that codewords in the dual Melas codes exhibit a very clear Poisson behavior of pattern frequencies. Proving that this is indeed the case seems to be an extremely hard problem, and we began by proving the convergence of the first three factorial moments, as well as a relaxed version of the conjecture.
One of the implications of the conjecture that all factorial moments converge to those of the P(1) distribution, is that patterns of length k cannot appear too many times in a codeword of the dual Melas code, Melas(k)⊥. More precisely, for every t, the maximum number of occurrences of a pattern Nmax should satisfy that (Nmax)t2−k remains bounded. To put into perspective how far away previous results were from this, the best known bounds were of the order of 2k/2, which only satisfy this property for t⩽2.
By translating the original pattern counting problem in LFSRs into a question of polynomial orbits, we managed to prove that the 0k pattern does indeed satisfy the above property for every t: it appears at most (approximately) 2k/log2k times in any codeword of Melas(k)⊥. This is strictly better than any previously available result. We employed a similar approach to study bounds on the number of full k-symbol weight codewords in Melas(k)⊥ and to give an improvement on known bounds for the burst-covering radius of Melas codes and the critical exponent of dual Melas codes.
We note that there is an alternative way of thinking about the counting problem in LFSRs. By Equation (5), the number of occurrences Nw of patterns w∈F2k are the coefficients of the Walsh-Hadamard transform of the function φ:F2k→R. Bounding the maximum number of occurrences means finding a bound for the infinity norm of the transform, while the Poisson moment estimates deal with the L1,L2,L3,… norms.
Many questions remain. We have presented multiple conjectures throughout this work, many of which seem unapproachable by current techniques, and which we hope will motivate fruitful future research.
AI use disclosure: The idea of exploiting the connection between LFSR sequences and polynomial orbits in order to improve the known bounds on the b-symbol weight was the authors', as well as the idea and intuitions behind the definition and conjectures of the Poisson randomness postulate. Proofs in this paper were conceived with both human and AI input (ChatGPT 6.1 and Claude Opus 5). The paper was written by the authors in its entirety.
REFERENCES
[1] N. Álvarez, V. Becher, and M. Mereb, “Poisson generic sequences,” International Mathematics Research Notices, vol. 2023, no. 24, pp. 20970–20987, 2023.
[2] V. Becher and G. Sac Himelfarb, “A construction of a λ-Poisson generic sequence,” Mathematics of Computation, vol. 92, no. 341, pp. 1453–1466, 2023.
[3] A. T. Benjamin and C. D. Bennett, “The probability of relatively prime polynomials,” Mathematics Magazine, vol. 80, no. 3, pp. 196–202, 2007.
[4] B. Bollobás, Random Graphs (2nd Edition). Cambridge University Press, 2001.
[5] R. C. Bose and R. C. Burton, “A characterization of flat spaces in a finite geometry and the uniqueness of the Hamming and the MacDonald codes,” J. Combin. Theory Ser. A, vol. 1, no. 1, pp. 96–104, 1966.
[6] L. Carlitz, “Some theorems on irreducible reciprocal polynomials over a finite field,” Journal für die reine und angewandte Mathematik, vol. 1967, no. 227, pp. 212–220, 1967.
[7] Y. Cassuto and M. Blaum, “Codes for symbol-pair read channel,” in Proceedings of the 2010 IEEE International Symposium on Information Theory (ISIT2010), Austin, TX, USA, Jun. 2010, pp. 988–992.
[8] Y. Cassuto and S. Litsyn, “Symbol-pair codes: algebraic constructions and asymptotic bounds,” in Proceedings of the 2011 IEEE International Symposium on Information Theory (ISIT2011), St. Petersburg, Russia, Aug. 2011, pp. 2348–2352.
[9] Y. Cassuto and M. Blaum, “Codes for symbol-pair read channels,” IEEE Trans. Inform. Theory, vol. 57, no. 12, pp. 8011–8020, 2011.
[10] B. Ding, G. Ge, J. Zhang, T. Zhang, and Y. Zhang, “New constructions of MDS symbol-pair codes,” Designs, Codes and Cryptography, vol. 86, no. 4, pp. 841–859, 2018.
[11] B. Ding, T. Zhang, and G. Ge, “Maximum distance separable codes for b-symbol read channels,” Finite Fields and Their Applications, vol. 49, pp. 180–197, 2018.
[12] M. Émile Borel, “Les probabilités dénombrables et leurs applications arithmétiques,” Rendiconti del Circolo Matematico di Palermo (1884-1940), vol. 27, no. 1, pp. 247–271, 1909.
[13] S. W. Golomb, Shift Register Sequences. Holden-Day, San Francisco, 1967.
[14] M. Goresky and A. Klapper, Algebraic Shift Register Sequences. Cambridge University Press, 2012.
[15] C. Greene, “Weight enumeration and the geometry of linear codes,” Studies in Applied Mathematics, vol. 55, no. 2, pp. 119–128, 1976.
[16] M. D. Hirschhorn, “Wallis's product and the central binomial coefficient,” The American Mathematical Monthly, vol. 122, no. 7, pp. 689–689, 2015.
[17] T. Kaufman and S. Lovett, “New extension of the Weil bound for character sums with applications to coding,” in 2011 IEEE 52nd Annual Symposium on Foundations of Computer Science. IEEE, 2011, pp. 788–796.
[18] D. E. Knuth, The Art of Computer Programming Volume 4a: Combinatorial Algorithms. Addison Wesley, 2011.
[19] V. K. Leont'ev, “Roots of random polynomials over a finite field.” Mathematical Notes, vol. 80, no. 1/2, p. 300, 2006.
[20] S. Li and G. Ge, “Constructions of maximum distance separable symbol-pair codes using cyclic and constacyclic codes,” Designs, Codes and Cryptography, vol. 84, no. 3, pp. 359–372, 2017.
[21] R. Lidl and H. Niederreiter, Finite Fields. Cambridge University Press, 1997.
[22] G. Luo, M. F. Ezerman, S. Ling, and X. Pan, “New families of MDS symbol-pair codes from matrix-product codes,” IEEE Trans. Inform. Theory, vol. 69, no. 3, pp. 1567–1587, 2023.
[23] J. Ma and J. Luo, “MDS symbol-pair codes from repeated-root cyclic codes,” Designs, Codes and Cryptography, vol. 90, no. 1, pp. 121–137, 2022.
[24] F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes. Amsterdam: North-Holland, 1978.
[25] H. Meyn, “On the construction of irreducible self-reciprocal polynomials over finite fields,” Applicable algebra in engineering, communication and computing, vol. 1, no. 1, pp. 43–53, 1990.
[26] C. J. Moreno and O. Moreno, “Exponential sums and Goppa codes. I,” Proc. Amer. Math. Soc., vol. 111, no. 2, pp. 523–531, 1991.
[27] G. L. Mullen and D. Panario, Handbook of Finite Fields. CRC press, 2013.
[28] H. Niederreiter, “Distribution properties of feedback shift register sequences,” Problems of control and information theory- Problemy upravleniya i teorii informatsii, vol. 15, no. 1, pp. 19–34, 1986.
[29] Z. Rudnick and A. Zaharescu, “The distribution of spacings between fractional parts of lacunary sequences,” arXiv preprint math/9912013, 1999.
[30] G. Sac Himelfarb and M. Schwartz, “On the burst-covering radius of binary cyclic codes,” arXiv preprint arXiv:2601.00435, 2026.
[31] J. T. Schwartz, “Fast probabilistic algorithms for verification of polynomial identities,” Journal of the ACM, vol. 27, no. 4, pp. 701–717, 1980.
[32] M. Shi, F. Özbudak, and P. Solé, “Geometric approach to b-symbol Hamming weights of cyclic codes,” IEEE Trans. Inform. Theory, vol. 67, no. 6, pp. 3735–3751, 2021.
[33] R. P. Stanley, Enumerative Combinatorics Volume 1 Second Edition. Cambridge studies in advanced mathematics, 2011.
[34] E. Yaakobi, J. Bruck, and P. H. Siegel, “Decoding of cyclic codes over symbol-pair read channels,” in 2012 IEEE International Symposium on Information Theory Proceedings. IEEE, 2012, pp. 2891–2895.
[35] —, “Constructions and decoding of cyclic codes over b-symbol read channels,” IEEE Trans. Inform. Theory, vol. 62, no. 4, pp. 1541–1551, 2016.
[36] H. Zhu, X. Li, M. Shi, S.-T. Xia, and T. Helleseth, “The b-symbol Hamming weight spectra of quaternary Kerdock codes and related codes,” IEEE Trans. Inform. Theory, vol. 71, no. 9, pp. 6727–6742, 2025.
[37] H. Zhu and M. Shi, “The b-symbol weight hierarchy of the Kasami codes,” Discrete Math., vol. 347, no. 2, p. 113774, 2024.
[38] H. Zhu, M. Shi, and F. Özbudak, “Complete b-symbol weight distribution of some irreducible cyclic codes,” Designs, Codes and Cryptography, vol. 90, no. 5, pp. 1113–1125, 2012.
[39] R. Zippel, “Probabilistic algorithms for sparse polynomials,” in International Symposium on Symbolic and Algebraic Manipulation, 1979, pp. 216–226.
APPENDIX
Proof of Lemma 27: a) H(z)U(z)=∏h∈H(1+zdegh+z2degh+…)∏u∈U(1+zdegu+z2degu+…). The coefficient of zd in this product is equal to the number of choices of ((ah)h∈H,(nu)u∈U) such that ∑ahdeg(h)+∑nudeg(u)=d, which is exactly σ(d).
The next-to-last equality holds because by the uniqueness of polynomial factorization, the coefficient of zd is exactly the number of polynomials of degree d.
c) Recall that τ(d) is the number of elements of H of degree d. Then
τ(d)is⎩⎨⎧=1=0⩽2d/2+1ford=1if2∤d,d>1,otherwise,
where the last inequality is due to the elements of H being self-reciprocal. Taking logarithm in the definition of H(z),
and thus we have absolute convergence when ∣z∣<1/2. The convergence is uniform in each disc ∣z∣⩽1/δ, δ>2. Furthermore, it can be verified that z=1/2 is a singularity: by [6], for d even we have
τ(d)=d1j∣2d,jodd∑μ(j)22jd⩾d2d/2−2d/6,
so for n=1 the sum in d is divergent when z=1/2.
Proof of Theorem 29: First, we have that
(1−2z)−1/2=n⩾0∑(n−1/2)(−2z)n=n⩾0∑2n1(n2n)zn.
Let bn=2n1(n2n). By [16], we have that
bn=πn2n(1−δn),
with 0⩽δn⩽4n1.
By the proof of Lemma 27, Claim c), logH(z) is finite in ∣z∣<1/2, so (1−z)H(z) has no zeros in this disc. Thus, A(z)≜e2d(log(1−z)+logH(z)) is holomorphic in ∣z∣<1/2 and satisfies A2(z)=(1−z)H(z), A(0)=1. Since the formal power series (1−z)H(z) has a unique formal square root which is 1 at z=0, then the coefficients of the Taylor expansion at 0 of A(z) are the an given by the binomial expansion.
By Lemma 27, Claim c), the smallest modulus of a singularity of A(z) is 1/2. Fix some 1/2<r<1/2. By Cauchy's estimate, there exists a constant Cr such that
∣an∣⩽rnCr.
By Theorem 28.
σ(d)=j=0∑dajbd−j.
We split the analysis of the sum into the two intervals [0,d/2) and [d/2,d].
An analysis almost identical to that of (10) in the proof of Theorem 29 reveals that the last sum is 1+O(1/D) in the range d<D/2. For d⩾D/2, the sum is bounded by
C⋅Dd=D/2∑∞2d1,
where C is a constant. This value is exponentially smaller than 1/D.
Proof of Lemma 7: 1) Let us show there is a bijection
Let f,g∈F2[x] be both non-zero and deg(f),deg(g)<k. Let h=gcd(f,g), so that f=hu,g=hv with gcd(u,v)=1. By Lemma 6, Claim 3), the condition g(α)f(α−1)=f(α)g(α−1) is equivalent to g(x)f(x−1)=f(x)g(x−1), which in turn is equivalent to u(x)v(x−1)=u(x−1)v(x). Let d=max(deg(u),deg(v)). Multiplying by xd, we obtain
(xdu(x−1))⋅v(x)=(xdv(x−1))⋅u(x).
By coprimality of u and v, we deduce that there exists a polynomial w such that
{xdu(x−1)xdv(x−1)=u(x)w(x),=v(x)w(x).
Since gcd(u,v)=1, at least one of u,v evaluates to 1 at 0. Without loss of generality, suppose u(0)=1. Then deg(xdu(x−1))=d=deg(u)+deg(w), and deg(v)+deg(w)=deg(xdv(x−1))⩽d. Since d is equal to deg(u) or deg(v), we deduce in either case from the two previous equations that deg(w)=0, so w=1. Hence,
{xdu(x−1)xdv(x−1)=u(x),=v(x),
which means that ui=ud−i, vi=vd−i for 0⩽i⩽d. Notice that if d were odd, then the number of non-zero coefficients in u and v would be even in both cases, so u(1)=v(1)=0, a contradiction. Thus, d=2r for some r⩾0.
Notice that {xr,xr(x+x−1),xr(x+x−1)2,…,xr(x+x−1)r} is a basis of the linear subspace {z∈F2[x],degz⩽2r:x2rz(x−1)=z(x)}. To see it, first note that the subspace has dimension r+1. All r+1 polynomials in the list are linearly independent, as they have degrees r,r+1,…,2r, and they all belong to the subspace. Thus, there exist A,B∈F2[x] of degrees ⩽r such that
{u(x)v(x)=xrA(x+x−1),=xrB(x+x−1),
and at least one of A,B has degree exactly r (since at least one of u,v has degree 2r). As a side note, the operation f↦xdegf(x+x−1) is known as the Q-transform [25].
We claim that gcd(A,B)=1. Indeed, suppose β were a common root of A and B in some extension field. If γ is a root of x2+βx+1=0, then γ would be a common root of u and v, which is a contradiction.
Thus, we have shown that a valid pair (f,g) defines a choice of (h,r,A,B) with deg(h)⩽k−1−2r, 0⩽r⩽⌊2k−1⌋, A,B coprime, max(deg(A),deg(B))=r. The converse is also true: given a valid choice of A and B it is not hard to see that defining u=xrA(x+x−1) and v=xrB(x+x−1) yields two coprime polynomials.
Let Cr=#{(A,B):A,B=0,gcd(A,B)=1,max(deg(A),deg(B))=r}. Then,
#N=r=0∑⌊2k−1⌋Cr(2k−2r−1),
since once r, A and B are chosen, h can be any polynomial of degree at most k - 2r - 1.
Notice that C0=1. There are many results in the literature on computing the probability that two polynomials of a given degree chosen uniformly at random are coprime. In particular, [3, Corollary 2] implies that
i=0∑r−1Ci=22r−1−1.
It is not hard to show by induction that this implies Cr=3⋅22r−1 for r⩾1. Plugging this result into the formula for #N we obtain the claimed result.
Let us see how many ways of choosing f,g satisfying f(α)f(α−1)=g(α)g(α−1) there are. Let h=gcd(f,g), and f=hF, g=hG with gcd(F,G)=1. Only one of F,G can be divisible by x (possibly neither).
Suppose x∤F,G. Since f(α)f(α−1)=g(α)g(α−1), we have that F(α)F(α−1)=G(α)G(α−1), which by Lemma 6, Claim 1), is equivalent to F(x)F(x)=G(x)G(x). Since F and G need to be coprime, we must have necessarily that G=F and that gcd(F,F)=1. Let us denote by rt the number of polynomials P of degree t such that P(0)=1 and gcd(P,P)=1. Then, for each 0⩽d⩽k−1, the number of valid choices of F, G such that deg(F)=d is rd. For each choice, there are 2k−d−1 possible non-zero polynomials h of degree at most k - d - 1.
Suppose now that F=xaP, P(0)=1. Since f(α)f(α−1)=g(α)g(α−1), we have that P(α)P(α−1)=G(α)G(α−1). By the same argument as before, G=P and gcd(P,P)=1. Now, the number of options for F,G is given by ∑i=0d−1ri, where the i-th term corresponds to choosing a=d−i. Again, once F,G have been selected, the number of options for h is 2k−d−1.
The case when x∣G is completely analogous. In summary, the counting is equal to:
d=0∑k−1(2k−d−1)(2a=0∑d−1ra+rd),(11)
Let sd=2∑a=0d−1ra+rd. Notice that sd−sd−1=rd+rd−1. Observe that any polynomial A(x), with A(0)=1, is decomposed in a unique way as a product H(x)B(x), where H=H, B(0)=1 and gcd(B,B)=1. Since the number of self-reciprocal polynomials of degree t is 2⌊2t⌋, we deduce that
t=0∑drd−t2⌊2t⌋=2d−1,
for d⩾1. Subtracting twice this equation instantiated in d−2, all terms cancel except for the first two, so rd+rd−1=2d−2 for d⩾3. Then, sd−sd−1=rd+rd−1=2d−2, and using r0=1, r1=r2=0 we can show by induction that s0=1, s1=2, sd=2d−1 for d⩾2. Substituting this into (11), we obtain the desired result.