Magma

70 Reputation

4 Badges

6 years, 202 days

MaplePrimes Activity


These are questions asked by Magma

An n*n matrix A is called an MDS matrix over an arbitrary field if all determinant of square sub-matrices of A are non-zero over the field. It is not difficult to prove that the number of all square sub-matrices of A is binomial(2*n, n)-1. The code that I use to check whether A is an MDS matrix is in the following form 

 u := 1;
 for k to n do
 P := choose(n, k);
   for i to nops(P) do
    for j to nops(P) do
         F := A(P[i], P[j]);
         r := Determinant(F);
        if r = 0 then

           u := 0; k:=n+1;

            i := nops(P)+1; j := nops(P)+1;

        end if;

    end do;

      end do; 
   if u = 1 then

      print(A is an MDS Matrix) 

   end if; 
  end do:

When I run the mentioned code for n=16, it takes long time since we need to check binomial(32, 16)-1=601080389 cases to verify that A is an MDS matrix or not. 

My Question: Is there a modified procedure which can be used to check that an n*n matrix is  whether an MDS matrix for n>=16. 


 

Assume that a[1],a[2],..a[k] are positive integer numbers. Let n be a positive integer number. 

Suppose that igcd(a[1],a[2],..a[k])=1. 

My question: Is there a command in Maple such that the output of the this command be true provided that there are "non-negative integer numbers" x[1],x[2],..x[k] which satisfy the following condition:

a1*x1+a2*x2+...+ak*xk=n

Thanks in advance

Suppose that n is a positive integer number and [k1,k2,...,kn] is a list of non-negative integer numbers. 

My Question: How to create the procedure proc([k1,k2,...,kn]) such that the output of this procedure is in the following form:

For i1 from 0 to k1 do

for i2 from 0 to k2 do

......................

for in from 0 to kn do

i1+i2+...+in

end do; end do;...end do;

1 2 3 Page 3 of 3