Misplaced Pages

Block Wiedemann algorithm

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

The block Wiedemann algorithm for computing kernel vectors of a matrix over a finite field is a generalization by Don Coppersmith of an algorithm due to Doug Wiedemann.

Wiedemann's algorithm

Let M {\displaystyle M} be an n × n {\displaystyle n\times n} square matrix over some finite field F, let x b a s e {\displaystyle x_{\mathrm {base} }} be a random vector of length n {\displaystyle n} , and let x = M x b a s e {\displaystyle x=Mx_{\mathrm {base} }} . Consider the sequence of vectors S = [ x , M x , M 2 x , ] {\displaystyle S=\left} obtained by repeatedly multiplying the vector by the matrix M {\displaystyle M} ; let y {\displaystyle y} be any other vector of length n {\displaystyle n} , and consider the sequence of finite-field elements S y = [ y x , y M x , y M 2 x ] {\displaystyle S_{y}=\left}

We know that the matrix M {\displaystyle M} has a minimal polynomial; by the Cayley–Hamilton theorem we know that this polynomial is of degree (which we will call n 0 {\displaystyle n_{0}} ) no more than n {\displaystyle n} . Say r = 0 n 0 p r M r = 0 {\displaystyle \sum _{r=0}^{n_{0}}p_{r}M^{r}=0} . Then r = 0 n 0 y ( p r ( M r x ) ) = 0 {\displaystyle \sum _{r=0}^{n_{0}}y\cdot (p_{r}(M^{r}x))=0} ; so the minimal polynomial of the matrix annihilates the sequence S {\displaystyle S} and hence S y {\displaystyle S_{y}} .

But the Berlekamp–Massey algorithm allows us to calculate relatively efficiently some sequence q 0 q L {\displaystyle q_{0}\ldots q_{L}} with i = 0 L q i S y [ i + r ] = 0 r {\displaystyle \sum _{i=0}^{L}q_{i}S_{y}=0\;\forall \;r} . Our hope is that this sequence, which by construction annihilates y S {\displaystyle y\cdot S} , actually annihilates S {\displaystyle S} ; so we have i = 0 L q i M i x = 0 {\displaystyle \sum _{i=0}^{L}q_{i}M^{i}x=0} . We then take advantage of the initial definition of x {\displaystyle x} to say M i = 0 L q i M i x b a s e = 0 {\displaystyle M\sum _{i=0}^{L}q_{i}M^{i}x_{\mathrm {base} }=0} and so i = 0 L q i M i x b a s e {\displaystyle \sum _{i=0}^{L}q_{i}M^{i}x_{\mathrm {base} }} is a hopefully non-zero kernel vector of M {\displaystyle M} .

The block Wiedemann (or Coppersmith-Wiedemann) algorithm

The natural implementation of sparse matrix arithmetic on a computer makes it easy to compute the sequence S in parallel for a number of vectors equal to the width of a machine word – indeed, it will normally take no longer to compute for that many vectors than for one. If you have several processors, you can compute the sequence S for a different set of random vectors in parallel on all the computers.

It turns out, by a generalization of the Berlekamp–Massey algorithm to provide a sequence of small matrices, that you can take the sequence produced for a large number of vectors and generate a kernel vector of the original large matrix. You need to compute y i M t x j {\displaystyle y_{i}\cdot M^{t}x_{j}} for some i = 0 i max , j = 0 j max , t = 0 t max {\displaystyle i=0\ldots i_{\max },j=0\ldots j_{\max },t=0\ldots t_{\max }} where i max , j max , t max {\displaystyle i_{\max },j_{\max },t_{\max }} need to satisfy t max > d i max + d j max + O ( 1 ) {\displaystyle t_{\max }>{\frac {d}{i_{\max }}}+{\frac {d}{j_{\max }}}+O(1)} and y i {\displaystyle y_{i}} are a series of vectors of length n; but in practice you can take y i {\displaystyle y_{i}} as a sequence of unit vectors and simply write out the first i max {\displaystyle i_{\max }} entries in your vectors at each time t.

Invariant Factor Calculation

The block Wiedemann algorithm can be used to calculate the leading invariant factors of the matrix, ie, the largest blocks of the Frobenius normal form. Given M F q n × n {\displaystyle M\in F_{q}^{n\times n}} and U , V F q b × n {\displaystyle U,V\in F_{q}^{b\times n}} where F q {\displaystyle F_{q}} is a finite field of size q {\displaystyle q} , the probability p {\displaystyle p} that the leading k < b {\displaystyle k<b} invariant factors of M {\displaystyle M} are preserved in i = 0 2 n 1 U M i V T x i {\displaystyle \sum _{i=0}^{2n-1}UM^{i}V^{T}x^{i}} is

p { 1 / 64 , if  b = k + 1  and  q = 2 ( 1 3 2 b k ) 2 1 / 16 if  b k + 2  and  q = 2 ( 1 2 q b k ) 2 1 / 9 if  b k + 1  and  q > 2 {\displaystyle p\geq {\begin{cases}1/64,&{\text{if }}b=k+1{\text{ and }}q=2\\\left(1-{\frac {3}{2^{b-k}}}\right)^{2}\geq 1/16&{\text{if }}b\geq k+2{\text{ and }}q=2\\\left(1-{\frac {2}{q^{b-k}}}\right)^{2}\geq 1/9&{\text{if }}b\geq k+1{\text{ and }}q>2\end{cases}}} .

References

  1. Harrison, Gavin; Johnson, Jeremy; Saunders, B. David (2022-01-01). "Probabilistic analysis of block Wiedemann for leading invariant factors". Journal of Symbolic Computation. 108: 98–116. arXiv:1803.03864. doi:10.1016/j.jsc.2021.06.005. ISSN 0747-7171.
  • Wiedemann, D., "Solving sparse linear equations over finite fields," IEEE Trans. Inf. Theory IT-32, pp. 54-62, 1986.
  • D. Coppersmith, Solving homogeneous linear equations over GF(2) via block Wiedemann algorithm, Math. Comp. 62 (1994), 333-350.
Numerical linear algebra
Key concepts
Problems
Hardware
Software
Category: