2
$\begingroup$
  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.

$\endgroup$
2
$\begingroup$

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.

$\endgroup$
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.