Opened 9 years ago

Closed 8 years ago

#13136 closed defect (worksforme)

The Equivalence of Linear Codes

Reported by: okazymyrov Owned by: wdj
Priority: minor Milestone: sage-duplicate/invalid/wontfix
Component: coding theory Keywords: is_permutation_equivalent
Cc: Merged in:
Authors: Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

The are exist bug in is_permutation_equivalent for LinearCode?. If dimension of code not equals to rank of a generating matrix over GF(2), then

Traceback (most recent call last):
  File "./Main.py", line 26, in <module>
    cr_is_CCZ_equivalent(F='(a^5 + a^4 + a^3 + a^2)*y^32 + a^4*y^16 + (a^3 + 1)*y^8 + (a^5 + a^4 + a^2 + a)*y^4 + (a^5 + a^4 + a^3 + 1)*y^2 + (a^3 + a^2)*y',G='a^4*y^32 + (a^5 + a^4 + a^3 + a^2)*y^16 + (a^5 + a^4 + a^3 + 1)*y^8 + (a^3 + a^2 + 1)*y^4 + (a^4 + a^3 + a)*y^2 + (a^5 + a^3 + a^2 + a + 1)*y')
  File "./Main.py", line 19, in cr_is_CCZ_equivalent
    return CF.is_permutation_equivalent(CG)
  File "/home/hamsin/bin/sage/local/lib/python2.7/site-packages/sage/misc/decorators.py", line 687, in wrapper
    return func(*args, **kwds)
  File "/home/hamsin/bin/sage/local/lib/python2.7/site-packages/sage/coding/linear_code.py", line 1575, in is_permutation_equivalent
    CW1 = MS(self.list())
  File "/home/hamsin/bin/sage/local/lib/python2.7/site-packages/sage/matrix/matrix_space.py", line 543, in __call__
    return self.matrix(entries, copy=copy, coerce=coerce, rows=rows)
  File "/home/hamsin/bin/sage/local/lib/python2.7/site-packages/sage/matrix/matrix_space.py", line 1372, in matrix
    return self.__matrix_class(self, entries=x, copy=copy, coerce=coerce) 
  File "matrix_mod2_dense.pyx", line 257, in sage.matrix.matrix_mod2_dense.Matrix_mod2_dense.__init__ (sage/matrix/matrix_mod2_dense.c:3141)
IndexError: The vector of entries has the wrong length.

The example in the attachments.

Attachments (1)

Main.sage (1.1 KB) - added by okazymyrov 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by okazymyrov

comment:1 Changed 8 years ago by okazymyrov

  • Status changed from new to needs_review

Looks like a bug has been resolved. The previous code works fine on Mac OS X 10.8.4 with Sage 5.10.

comment:2 Changed 8 years ago by chapoton

  • Milestone changed from sage-5.11 to sage-duplicate/invalid/wontfix

comment:3 Changed 8 years ago by chapoton

  • Status changed from needs_review to positive_review

comment:4 Changed 8 years ago by jdemeyer

  • Resolution set to worksforme
  • Reviewers set to Frédéric Chapoton
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.