Generating a check matrix includes defining a set of column vectors. A
matrix operable to have a plurality of entries is initiated. Each entry has a submatrix
that includes a function of a subset of the set of column vectors. The following
is repeated until a last entry of the matrix is reached. Subsets of the set of
column vectors are generated from the set of column vectors, and an entry is generated
from each subset. A weight associated with each entry is calculated, and an entry
having a minimum weight is selected. The selected entry is added to the matrix,
and the subset of column vectors associated with the selected entry is removed
from the set of column vectors. The matrix is reported.