Score:2

Sage code for finding generator matrix of MDS code

in flag
  1. Let $L$ be an $[n,k]$ code. A $k\times n$ matrix $G$ whose rows form a basis for $L$ is called a generator matrix for $L$.

  2. A linear $[n,k,d]$ code with largest possible minimum distance is called maximum distance $d$ separable or MDS code.

I want to find a generator matrix for MDS code using SageMath or in another way, is there any SageMath code to check a matrix is a generator matrix for the MDS code. Any help with the SageMath code for the generator matrix will be appreciated.

Score:2
in flag

You can use LinearCode (with the generator matrix as the argument):

sage: C = LinearCode(random_matrix(GF(11), 3, 7))                                                                                                                                                                                              
sage: C.minimum_distance()                                                                                                                                                                                                                     
4

However, for general codes (e.g. random codes), finding the minimum distance (and checking if it's MDS) is a hard problem. Therefore, you can only do it for small matrices.

To generate an MDS matrix, you can use concrete constructions, such as the Cauchy matrix. The generator matrix of the associated linear code can be obtained by concatenating it with the identity matrix.

kelalaka avatar
in flag
Could you provide a paper for the hardness of the problem?
Fractalice avatar
in flag
@kelalaka See e.g. https://madhu.seas.harvard.edu/papers/1999/dms-journ.pdf , even approximating the minimum distance up to a constant factor is hard
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.