Score:4

Multiplication of two LFSR

cn flag

Let $a_n$, and $b_n$ two sequences generated by two LFSR with connection polynomials $P$, and $Q$. How to show the sequence $(a_n \cdot b_n)$ can be generated by a LFSR wit connection polynomial of degree upper bounded by $\deg(P)\cdot \deg(Q)$?

fgrieu avatar
ng flag
If $a_n$ and $b_n$ are approximately unbiased (e.g. maximum-length) and of coprime period, then $(a_n \cdot b_n)$ is heavily biased. That makes _"can be generated by a LFSR"_ slightly surprising. On the other hand, LFSRs can generate very biased sequences, and $\deg(P)\cdot\deg(Q)$ is a lot.
kelalaka avatar
in flag
This question missing some important details about LFSRs. The connection polynomial must be primitive so that we can talk about the upper bound more precisely. Also, multiplication ( AND here) is not a good idea. on average 3/4 will be zero!
Ievgeni avatar
cn flag
I do not care about the most precise upper bound, I just want this one.
Score:4
sa flag

TL;DR: It's complicated.

Intuitively, the idea that all roots of the two polynomials contribute to the linear complexity of the product sequence, which can sometimes result in very high linear complexity goes back to Key, I believe.

I provide a few relevant pointers below.

In Eurocrypt 93, Gottfert and Niederreiter (On the Linear Complexity of the Products of Shift-Register Sequences) proved the following result. The notation $\sigma \in M(f)$ means that the sequence $\sigma$ has minimal polynomial $f.$

enter image description here

The presentation is quite technical, and sometimes such product sequences can be zero! In the other direction, the linear complexity can be as high as the product of the linear complexities, instead of the sum:

enter image description here

So, the linear complexity can be as high as the product of the linear complexities (take $a=b=1$ below):

enter image description here

A version of this is due to Rueppel and Staffelbach, see here (a later version of this appeared in the IEEE transactions on information theory).

Daniel S avatar
ru flag
I agree that computing the exact degree in any given case is quite complex, but the upper bound is pretty straightforward as the formal expressions for the product sequence in terms of products of pairs of initial fill elements clearly lie in a linear space of dimension of at most $(\deg P)(\deg Q)$.
kodlu avatar
sa flag
Agree, I just tried to bring out the complexity a bit. And the collapse to the all zero sequence in some cases is amazing.
Daniel S avatar
ru flag
Agreed on the zero sequence; I'm trying to figure out minimal examples with $a=b=2$. I think it can only be for some initial fills, but I'm thinking it through.
Score:3
ru flag

Suppose that we take the oldest component from our LFSRs as output so that our factor LFSRs can be expressed via $$\mathbf a_n:=\begin{pmatrix}a_n\\a_{n+1}\\\vdots\\a_{n+\deg P-1}\end{pmatrix}=A^n\begin{pmatrix}a_0\\a_{1}\\\vdots\\a_{\deg P-1}\end{pmatrix}$$ and $$\mathbf b_n:=\begin{pmatrix}b_n\\b_{n+1}\\\vdots\\b_{n+\deg Q-1}\end{pmatrix}=B^n\begin{pmatrix}b_0\\b_{1}\\\vdots\\b_{\deg Q-1}\end{pmatrix}$$ for the usual Fibonacci matrices $A$ and $B$ and the outputs at time $n$ are $(1,0,0\ldots,0)\cdot \mathbf a_n$ and $(1,0,0\ldots,0)\cdot \mathbf b_n$ respectively.

Then $$\mathbf a_n\otimes\mathbf b_n=(A\otimes B)^n (\mathbf a_0\otimes\mathbf b_0)$$ where $\otimes$ is the Kronecker product. Note that $a_n\cdot b_n$ is the output of the product register at time $n$. By systematising $A\otimes B$ to a Fibonacci matrix by change of basis we can therefore write $a_n\cdot b_n$ as the output of an LSFR of degree at most $(\deg P)(\deg Q)$. The systematisation uses column operations to put $A\otimes B$ into a Fibonacci form $$\begin{pmatrix}0&1&0&0&\ldots&0&0&0&\ldots &0\\ 0&0&1&0&\ldots &0&0&0&\ldots &0\\ 0&0&0&1&\ldots &0&0&0&\ldots &0\\ \vdots&\vdots&\vdots&&\ddots&\vdots&\vdots&\vdots &&0\\ 0&0&0&0&\ldots&1&0&0&\ldots &0\\ R_0&R_1&R_2&R_3&\ldots&R_{d-1}&0&0&\ldots&0\\ \vdots&\vdots&\vdots&\vdots&&\vdots&\vdots&\vdots &&\vdots\\ \end{pmatrix}$$ (the precise non-zero values after the $d$th row are unimportant provided that the right hand columns are zero). This is equivalent to noting that $a_n$ can be written as a linear combination of $a_0,\ldots, a_{\deg P-1}$ via Galois equations and $b_n$ can be written as a linear combination of $b_0,\ldots, b_{\deg Q-1}$ so that $a_nb_n$ can be written as a linear combination of $a_0b_0, a_1b_0,\ldots a_{\deg P-2}b_{\deg Q-1},a_{\deg P-1}b_{\deg Q-1}$. If $d$ is the rank of these linear combinations over all values of $n$ then we perform a change of basis and write $a_nb_n$ as a linear combination of $a_0b_0, a_1b_1,\ldots a_{d-1}b_{d-1}$.

Ievgeni avatar
cn flag
Can you argue more about why the equality with the Kronecker product is true?
Daniel S avatar
ru flag
It's the [mixed product property](https://en.wikipedia.org/wiki/Kronecker_product#Relations_to_other_matrix_operations).
Ievgeni avatar
cn flag
Okay, and can you give more details about Fibonacci matrix and change of basis?
Daniel S avatar
ru flag
I've added some words; hope that they help.
Ievgeni avatar
cn flag
No Sorry, I do not see why how you arrive to achieve to write a such matrix.
kelalaka avatar
in flag
This answer only provides the upper bound. The lower bound is 0 when the two sequences are identical.
Daniel S avatar
ru flag
@kelalaka The question only asks for the upper bound.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.