First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello,

Indeed there is a bug

sage: u = C((0, 0, 0, 0, 0, 0, 0))
sage: v = C((1, 0, 0, a + 1, 0, 1, 0))
sage: u in C and v in C
True

And the hamming weight of v = v-u is 3... Actually there are two algorithms in Sage and both of them fail

sage: LinearCode(G).minimum_distance(algorithm="guava")
5
sage: LinearCode(G).minimum_distance(algorithm="gap")
5

One possible reason is that it is not over a prime field.

Vincent

click to hide/show revision 2
No.2 Revision

Hello,

Indeed there is a bug

sage: u = C((0, 0, 0, 0, 0, 0, 0))
sage: v = C((1, 0, 0, a + 1, 0, 1, 0))
sage: u in C and v in C
True

And the hamming weight of v = v-u is 3... Actually there are two algorithms in Sage and both of them fail

sage: LinearCode(G).minimum_distance(algorithm="guava")
5
sage: LinearCode(G).minimum_distance(algorithm="gap")
5

(edit: here I am wrong, the argument "guava" is considered only if the cardinality of the field is 2 or 3)

One possible reason is that it is not over a prime field.

Vincent

click to hide/show revision 3
No.3 Revision

Hello,

Indeed there is a bug

sage: u = C((0, 0, 0, 0, 0, 0, 0))
sage: v = C((1, 0, 0, a + 1, 0, 1, 0))
sage: u in C and v in C
True

And the hamming weight of v = v-u is 3... Actually there are two algorithms in Sage and both of them fail

sage: LinearCode(G).minimum_distance(algorithm="guava")
5
sage: LinearCode(G).minimum_distance(algorithm="gap")
5

(edit: here I am wrong, the argument "guava" is considered only if the cardinality of the field is 2 or 3)

One possible reason is that it is not over a prime field.

Vincent

click to hide/show revision 4
No.4 Revision

Hello,

Indeed there is The problem comes from the fact that your matrix does not have full rank (indeed it has rank 3 and 7 rows). If you use a bugfull rank matrix then you are done

sage: u C1 = C((0, 0, 0, 0, 0, 0, 0))
LinearCode(G)
sage: v C2 = C((1, 0, 0, a + 1, 0, 1, 0))
LinearCode(G[:3])
sage: u in C and v in C
C1 == C2
True
sage: C1.minimum_distance()
5
sage: C2.minimum_distance()
3

And I opened a trac ticket for that problem. It will be modified in the hamming weight of v = v-u is 3... Actually there are two algorithms in Sage and both of them failnext stable release. Thanks for your report!

sage: LinearCode(G).minimum_distance(algorithm="guava")
5
sage: LinearCode(G).minimum_distance(algorithm="gap")
5

One possible reason is that it is If you want to contribute to Sage, do not over hesitate to open a prime field.trac account and participate in the resolution of this problem.

Vincent

click to hide/show revision 5
No.5 Revision

Hello,

The problem comes from the fact that your matrix does not have full rank (indeed it has rank 3 and 7 rows). If you use a full rank matrix then you are done

sage: C1 = LinearCode(G)
sage: C2 = LinearCode(G[:3])
sage: C1 == C2
True
sage: C1.minimum_distance()
5
sage: C2.minimum_distance()
3

I opened a the trac ticketticket #17452 for that problem. It will be modified in the next stable release. Thanks for your report!

If you want to contribute to Sage, do not hesitate to open a trac account and participate in the resolution of this problem.

Vincent