Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
0

convert a cyclic code C of length n over a field Fqm to a code D of length mn over Fq

asked 6 years ago

TWJ gravatar image

say i have a cyclic code C of length n over a field Fqm . is it possible to have construct a code D of length mn over Fq

it's mathematically possible since Fqm is a vector space of degree m over Fq

but i didn't find how to-do it in sage

thanks in advance

Preview: (hide)

Comments

Please give an example of an explicit C.

dan_fulea gravatar imagedan_fulea ( 6 years ago )

thank for your respond . this is the smallest non trivial example i cam with C is a BCH code over GF(4) `K.= GF(4);

R.<x>=K[]; V=x^3+x^2+a*x+a+1; V.is_primitive(); #yes L. = K.extension(V); g=1 #juse inisialzation for i in [1..28]: #the biggest delta(=28 here) the biggest g ==> the smallest our code c=b^(i) g=lcm(g,c.minpoly()) C = codes.CyclicCode(generator_pol = g, length = 63) C;`
TWJ gravatar imageTWJ ( 6 years ago )

1 Answer

Sort by » oldest newest most voted
0

answered 6 years ago

dan_fulea gravatar image

If i correctly understood the task, than the following is a possibility.

First of all, let us generate the given code in sage, and print some information on its basis. Adapted sage code:

S.<A> = PolynomialRing( GF(2) )
K.<a> = GF(2^2, modulus=A^2+A+1)
R.<x> = PolynomialRing( K )

V = x^3 + x^2 + a*x + a + 1;
L.<b> = K.extension( V )

delta = 28
# the bigger this delta (=28 here), the bigger g, so the smaller our code
g = lcm( [ (b^k).minpoly() for k in [1..28] ] )
# note that g divides x^63-1 since each minimal poly in the list above does it
C = codes.CyclicCode( generator_pol = g, length = 2^6-1 )

print "The code C is:\n%s\n" % C
print "The basis of C is...\n"
for v in C.basis():
    print v

Results:

The code C is:
[63, 14] Cyclic Code over GF(4)

The basis of C is...

(1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1, a + 1, 0, 1, 1, a + 1, a,  ...
(0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1, a + 1, 0, 1, 1, a + 1,  ...
(0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1, a + 1, 0, 1, 1,      ...
(0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1, a + 1, 0, 1, 1,   ...
(0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1, a + 1, 0, 1,   ...
(0, 0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1, a + 1, 0,   ...
(0, 0, 0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1, a + 1,   ...
(0, 0, 0, 0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1,       ...
(0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1, a  ...
(0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, 1, ...
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, 1, ...
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, 0, ...
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, a, ...
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, a + 1, a + 1, a, a, a, 0, 1, ...

The results for the basis vectors were manually truncated.

Now, if i understand the construction of the new code from this one, we build a new basis, replacing the above entries as follows:

  • 0 by (0,0)
  • 1 by (1,0)
  • a by (0,1)
  • a+1 by (1,1).

For this, we construct the matrix E from the above list of vectors, as rows, using the natural lift. Code:

def get_lift(c):
    """
    for an element c in K, lift it to GF(2)^2
    """
    lift = S(c).coefficients(sparse=False)
    return lift + (2-len(lift))*[ GF(2)(0) ]

MS = MatrixSpace( GF(2), 14, 2*63 )
E  = []    # and we append
for v in C.basis():
    w = []    # and we append
    for entry in v:
        w += get_lift( entry )
    E.append( w )

D = LinearCode( MS( E ) )
print D

I think, D is the needed code.

Preview: (hide)
link

Comments

thank you sir although i still trying to understand what the last loop dose , i have tow observation

the lifted of the generator matrix of a code isn't always the generator matrix of the lifted code. for example the code C=(0,0)(1,α)(α,α+1)(α+1,1) is generated by (1,α) " a 1*1 matrix by the lifted code D=(0,0,0,0)(1,0,0,1)(0,1,1,1)(1,1,1,0) is not generated by (1,0,0,1) the lift of (1,α)

my second observation is that C and D should have the same cardinal since we are replacing every codeword by a codeword with twice it length

however, i believe i can use the function get_lift() that you defined and apply it t every codeword in C and store the result somehow in D .

i again ...(more)

TWJ gravatar imageTWJ ( 6 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 325 times

Last updated: May 10 '18