Top
Back: encode
Forward: sysQE
FastBack:
FastForward:
Up: decodegb_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.10.2.6 syndrome

Procedure from library decodegb.lib (see decodegb_lib).

Usage:
syndrome (h, c); h a check matrix, c a row vector (codeword)

Return:
corresponding syndrome

Example:
 
LIB "decodegb.lib";
ring r=2,x,dp;
matrix x[1][4]=1,0,1,0;
matrix g[4][7]=1,0,0,0,0,1,1,
0,1,0,0,1,0,1,
0,0,1,0,1,1,1,
0,0,0,1,1,1,0;
//encode x with the generator matrix g
matrix c=encode(x,g);
// disturb
c[1,3]=0;
//compute syndrome
//corresponding check matrix
matrix check[3][7]=1,0,0,1,1,0,1,0,1,0,1,0,1,1,0,0,1,0,1,1,1;
print(syndrome(check,c));
==> 0,
==> 0,
==> 1 
c[1,3]=1;
//now c is a codeword
print(syndrome(check,c));
==> 0,
==> 0,
==> 0 


Top Back: encode Forward: sysQE FastBack: FastForward: Up: decodegb_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.1, 2022, generated by texi2html.