Score:0

Can the Berlekamp-Massey algorithm falsely detect an LFSR?

cn flag

Is it possible that the BMA detects an irreducible polynomial from a sequence that was not generated by an LFSR? I am feeding a sequence into the BMA under the assumption that it was generated by an LFSR. It detects a polynomial of a certain length, but the sequence can’t be reconstructed from that polynomial. I don’t want to assume that the implementation of the BMA has a bug. If the question above cannot be answered with yes in any case, the implementation must be incorrect.

Score:4
sa flag

No.

Given an arbitrarily long sequence $(x_1,\ldots,x_t,\ldots)$ consider its initial segments.

Any (finite) sequence $$x^{(n)}:=(x_1,\ldots,x_n)$$can be generated by a circulating LFSR of the same length. Just cycle the bits, no taps.

BMA will detect this if no shorter LFSR exists that generates $x^{(n)}$. And will converge to correctly detect the shortest LFSR that uniquely generates $x^{(n)}$ if you feed it twice as many initial bits $x^{(2n)}.$

Fix your code.

neolith avatar
cn flag
Thanks. At least I don’t have to work on assumptions now
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.