Ask Your Question
0

convert 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}$

asked 2018-05-08 19:17:21 +0200

TWJ gravatar image

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

edit retag flag offensive close merge delete

Comments

Please give an example of an explicit $C$.

dan_fulea gravatar imagedan_fulea ( 2018-05-09 10:16:37 +0200 )edit

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 ( 2018-05-09 12:35:02 +0200 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-10 06:26:47 +0200

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.

edit flag offensive delete link more

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,\alpha)(\alpha,\alpha+1)(\alpha+1,1)$ is generated by $(1,\alpha)$ " 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,\alpha)$

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 ( 2018-05-10 13:31:13 +0200 )edit

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: 2018-05-08 19:17:21 +0200

Seen: 244 times

Last updated: May 10 '18