|
AG Codes - An Example
LIB "brnoeth.lib"; |
ring s=2,(x,y),lp; |
// char 2 |
poly f=x3y+y3+x; |
// the Klein quartic
|
list KLEIN=Adj_div(f); |
// compute the conductor
|
KLEIN=NSplaces(2,KLEIN);
| // computes places up to degree 3=1+2
|
KLEIN=extcurve(3,KLEIN);
| // construct Klein quartic over F_8
|
|
==>
|
// Total number
of rational places : NrRatPl = 24
|
KLEIN[3];
| // display places (each: degree, number)
|
|
==>
|
[1]: 1,1
[2]: 1,2
[3]: 1,3
[4]: 2,1
[5]: 3,1
[6]: 3,2
[7]: 3,3
[8]: 3,4
[9]: 3,5
[10]: 3,6
[11]: 3,7
|
intvec G=6,0,0,4,0,0,0,0,0,0,0;
| // Input: multiplicities for G
|
| // divisor of degree 14=6*1+4*2
|
Computation of the evaluating code
(Evaluation at all rational places outside of supp(G)):
def ER=KLEIN[1][4];
| // change to ring extension F_8[x,y,z]
|
setring ER;
|
|
matrix C=AGcode_L(G,D,KLEIN);
| // 12 x 23 matrix in F_8
|
| // 12 fctns evaluated at 23 places
|
Computation of the residual code (orthogonal complement of C):
matrix CO=AGcode_Omega(G,D,KLEIN);
| // 11 x 23 matrix in F_8
|
Preparation for decoding:
intvec F=6,0,0;
| // divisor F of degree >= 6 needed
|
list K=prepSV(G,D,F,KLEIN);
|
|
K[size(K)][1];
| // error correcting capacity
|
Coding:
matrix word[1][11];
| // words of length 11 are coded
|
word = 1,1,1,1,1,1,1,1,1,1,1;
|
|
def y=word*CO;
| // the code word (length: 23)
|
Error correcting:
matrix disturb[1][23];
|
|
disturb[1,1]=1;
|
|
disturb[1,10]=a;
|
|
disturb[1,12]=1+a;
|
|
y=y+disturb;
| // disturb the code word
|
def yy=decodeSV(y,K);
| // error correction
|
yy-y;
| // returns the error
|
|
==>
|
_[1,1]=1
_[1,2]=0
_[1,3]=0
_[1,4]=0
_[1,5]=0
_[1,6]=0
_[1,7]=0
_[1,8]=0
_[1,9]=0
_[1,10]=(a)
_[1,11]=0
_[1,12]=(a+1)
_[1,13]=0
_[1,14]=0
_[1,15]=0
_[1,16]=0
_[1,17]=0
_[1,18]=0
_[1,19]=0
_[1,20]=0
_[1,21]=0
_[1,22]=0
_[1,23]=0
|
|