ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 08 May 2018 12:17:21 -0500convert a cyclic code $C$ of length $n$ over a field $\mathbb{F}_{q^m}$ to a code $D$ of length $mn$ over $\mathbb{F_q}$http://ask.sagemath.org/question/42295/convert-a-cyclic-code-c-of-length-n-over-a-field-mathbbf_qm-to-a-code-d-of-length-mn-over-mathbbf_q/say i have a cyclic code $C$ of length $n$ over a field $\mathbb{F}_{q^m}$ . is it possible to have construct a code $D$ of length $mn$ over $\mathbb{F_q}$
it's mathematically possible since $\mathbb{F}_{q^m}$ is a vector space of degree $m$ over $\mathbb{F}_q$
but i didn't find how to-do it in sage
thanks in advance TWJTue, 08 May 2018 12:17:21 -0500http://ask.sagemath.org/question/42295/What is the meaning of string index out of range?http://ask.sagemath.org/question/35909/what-is-the-meaning-of-string-index-out-of-range/ I am dealing with [35,6] linear code over finite filed with 2 elements. I am able to get an output of its generator matrix as 6x35 matrix, but while computing parity check matrix which will be of size 29x35, I am getting following output:
IndexError:string index out of range
Does it mean that its size is two large? If still it is so, how to get that matrix in sage??NileshSun, 04 Dec 2016 06:45:49 -0600http://ask.sagemath.org/question/35909/What is the meaning of :IndexError:string index out of rangehttp://ask.sagemath.org/question/35910/what-is-the-meaning-of-indexerrorstring-index-out-of-range/I am dealing with [35,6] linear code over finite filed with 2 elements. I am able to get an output of its generator matrix as 6x35 matrix, but while computing parity check matrix which will be of size 29x35, I am getting following output:
IndexError:string index out of range
Does it mean that its size is too large? If still it is so, how to get that matrix in sage??NileshSun, 04 Dec 2016 06:46:45 -0600http://ask.sagemath.org/question/35910/Computing minimum_distance of a code on non-prime fields fails ... sometimes.http://ask.sagemath.org/question/26283/computing-minimum_distance-of-a-code-on-non-prime-fields-fails-sometimes/ Consider the following piece of code:
C=codes.RandomLinearCode(4,2,GF(16,'b'))
C.minimum_distance()
About half of the time, it fails with error
TypeError: unable to coerce from a finite field other than the prime subfield
I'd understand if SAGE could only compute the minimum distance for codes over primes fields, what has me confused is the fact that sometimes it can, sometimes it can't. Any clues as to what is going on here?KojiMon, 23 Mar 2015 09:54:25 -0500http://ask.sagemath.org/question/26283/a bug in computing minimum distance, coding theoryhttp://ask.sagemath.org/question/24504/a-bug-in-computing-minimum-distance-coding-theory/ For anyone who is familiar with coding theory, we build codes as a subspace of the vector space F_q^n from generating matrices, with all linear combinations of rows of this matrix. For any generating matrix defined over a Finite Field, SAGE has spesific attributes "C =LinearCode(G)" which constructs the code from generating matrix and "C.minimum_distance()" which computes the minimum distance of the code.
However, there is probably a bug or something which I couldn't find out.
For example see this:
This code is a [7,3] linear code over the field GF(4,"a"), which has min. distance 3,(as computed with MAGMA), but SAGE computes its min. distance as 5, which is above upper bound!
This is the SAGE input-output:
K = GF(4,"a"); a = K.gen(); G = Matrix([[a, a + 1, 1, a + 1, 1, 0, 0], [0, a, a + 1, 1, a + 1, 1, 0], [0, 0, a, a + 1, 1, a + 1, 1], [a + 1, 0, 1, 0, a + 1, 1, a + 1], [a, a + 1, a + 1, 0, 0, a + 1, 1], [a + 1, a, a, 1, 0, 0, a + 1], [a, a + 1, 1, a + 1, 1, 0, 0]]); C=LinearCode(G); C; C.minimum_distance();
gives the output:
︡"Linear code of length 7, dimension 3 over Finite Field in a of size 2^2" "5"
However for the same conditions MAGMA says this:
︡> G6 := LinearCode <F,7|[[a, a + 1, 1, a + 1, 1, 0, 0], [0, a, a + 1, 1, a + 1, 1, 0], [0, 0, a, a + 1, 1, a + 1, 1], [a + 1, 0, 1, 0, a + 1, 1, a + 1], [a, a + 1, a + 1, 0, 0, a + 1, 1], [a + 1, a, a, 1, 0, 0, a + 1], [a, a + 1, 1, a + 1, 1, 0, 0]]>; G6;
[7, 3, 3] Linear Code over GF(2^2)
I don't understand where SAGE fails..
Do you have any idea?
algebraicallyclosedThu, 16 Oct 2014 12:14:26 -0500http://ask.sagemath.org/question/24504/