We derive an explicit count for the number of singular
Hankel (Toeplitz) matrices whose entries range over a finite field with elements by observing the execution of the Berlekamp/Massey algorithm on its elements. Our method yields explicit counts also when some entries above or on the anti-diagonal (diagonal) are fixed. For example, the number of singular Toeplitz matrices with 0鈥檚 on the diagonal is .
We also derive the count for all Hankel matrices of rank with generic rank profile, i.e., whose first leading principal submatrices are non-singular and the rest are singular, namely in the case and in the case . This result generalizes to block-Hankel matrices as well.