Changeset 00142a in git
- Timestamp:
- Sep 23, 2008, 1:58:38 PM (15 years ago)
- Branches:
- (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
- Children:
- e7f5accafb5b697c1d13934f2dc0051f5c316603
- Parents:
- 8ce2d8c9b01fefc3a524b3cb741ea4e8d4505f51
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/decodegb.lib
r8ce2d8c r00142a 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: decodegb.lib,v 1. 2 2008-08-21 14:06:56bulygin Exp $";2 version="$Id: decodegb.lib,v 1.3 2008-09-23 11:58:38 bulygin Exp $"; 3 3 category="Coding theory"; 4 4 info=" … … 14 14 For an overview of the methods mentioned above, cf. Stanislav Bulygin, Ruud Pellikaan: 'Decoding and finding the minimum distance with 15 15 Groebner bases: history and new insights', in 'Selected Topics in Information and Coding Theory', World Scientific (2008) (to appear) (*). 16 For the vanishing ideal computation the algorithm of Farr and Gao is implemented. 16 17 17 18 MAIN PROCEDURES: 18 sysCRHT(n,defset,e,q,m,#); generates the CRHT-ideal that follows Cooper's philosophy , Sala's extentions are available19 sysCRHTMindistBinary(n,defset,w); generates the ideal from Cooper's philosophyto find the minimum distance in the binary case19 sysCRHT(n,defset,e,q,m,#); generates the CRHT-ideal that follows Cooper's philosophy 20 sysCRHTMindistBinary(n,defset,w); generates the CRHT-ideal to find the minimum distance in the binary case 20 21 sysNewton(n,defset,t,q,m,#); generates the ideal with the Generalized Newton identities 21 22 sysBin(v,Q,n,#); generates Bin system as in the work of Augot et.al, cf. [*] for the reference 22 23 encode(x,g); encodes given message with the given generator matrix 23 24 syndrome(h, c); computes a syndrome w.r.t. the given check matrix 24 sysQE(check,y,t,fieldeq,formal); generates the system of quadratic equations as in the method of Pellikaan and Bulygin25 error (y,pos,val); inserts errors in a word25 sysQE(check,y,t,fieldeq,formal); generates the system of quadratic equations as in [*] 26 errorInsert(y,pos,val); inserts errors in a word 26 27 errorRand(y,num,e); inserts random errors in a word 27 28 randomCheck(m,n,e); generates a random check matrix 28 29 genMDSMat(n,a); generates an MDS (actually an RS) matrix 29 mindist(check); computes the minimum distance of the code via solving the system of quadratic equations30 mindist(check); computes the minimum distance of a code 30 31 decode(rec); decoding of a word using the system of quadratic equations 31 32 solveForRandom(redun,ncodes,ntrials,#); a procedure for manipulation with random codes 32 33 solveForCode(check,ntrials,#); a procedure for manipulation with the given codes 33 vanishId(points); computes the vanishing ideal for the given set of points . The algorithm of Farr and Gao is implemented34 vanishId(points); computes the vanishing ideal for the given set of points 34 35 sysFL(check,y,t,e,s); generates the Fitzgerald-Lax system 35 36 solveForRandomFL(n,redun,p,e,t,ncodes,ntrials,minpol); a procedure for manipulation with random codes via Fitzgerald-Lax … … 731 732 matrix y[1][7]=encode(x,g); 732 733 //disturb with 2 errors 733 matrix rec[1][7]=error (y,list(2,4),list(1,a));734 matrix rec[1][7]=errorInsert(y,list(2,4),list(1,a)); 734 735 //generate the system 735 736 def A=sysQE(h,rec,t,0,0); … … 742 743 } 743 744 744 proc error (matrix y, list pos, list val)745 "USAGE: error (y, pos, val); y is a (code) word, pos = positions where errors occured, val = their corresponding values745 proc errorInsert(matrix y, list pos, list val) 746 "USAGE: errorInsert(y, pos, val); y is a (code) word, pos = positions where errors occured, val = their corresponding values 746 747 RETURN: corresponding received word 747 748 EXAMPLE: example error; shows an example … … 769 770 770 771 //disturb with 2 errors 771 matrix rec[1][7]=error (y,list(2,4),list(1,a));772 matrix rec[1][7]=errorInsert(y,list(2,4),list(1,a)); 772 773 print(rec); 773 774 print(rec-y); … … 871 872 872 873 proc genMDSMat(int n, number a) 873 "USAGE: genMDSMat(n, a); n x n are dimensions of the matrix, a is a primitive element of the field. 874 874 "USAGE: genMDSMat(n, a); n x n are dimensions of the matrix, a is a primitive element of the field. 875 NOTE: An MDS matrix is constructed in the following way. We take a to be a generator of the multiplicative group of the field. 875 876 Then we construct the Vandermonde matrix with this a. 876 877 ASSUME: extension field should already be defined … … 1576 1577 matrix y[1][11]=encode(x,g); 1577 1578 //disturb with 2 errors 1578 matrix rec[1][11]=error (y,list(2,4),list(1,-1));1579 matrix rec[1][11]=errorInsert(y,list(2,4),list(1,-1)); 1579 1580 1580 1581 //the Fitzgerald-Lax system … … 1789 1790 1790 1791 /* 1792 ////////////// SOME RELATIVELY EASY EXAMPLES ////////////// 1793 /////////////////// THAT RUN AROUND ONE MINUTE //////////////// 1794 1795 "EXAMPLE:"; echo = 2; 1796 int q=128; int n=120; int redun=n-30; 1797 ring r=(q,a),x,dp; 1798 solveForRandom(n,redun,1,1,6); 1799 1800 int q=128; int n=120; int redun=n-20; 1801 ring r=(q,a),x,dp; 1802 solveForRandom(n,redun,1,1,9); 1803 1804 int q=128; int n=120; int redun=n-10; 1805 ring r=(q,a),x,dp; 1806 solveForRandom(n,redun,1,1,19); 1807 1808 int q=256; int n=150; int redun=n-10; 1809 ring r=(q,a),x,dp; 1810 solveForRandom(n,redun,1,1,22); 1811 1791 1812 ////////////// SOME HARD EXAMPLES ////////////////////// 1792 1813 ////// THAT MAYBE WILL BE DOABLE LATER ///////////////
Note: See TracChangeset
for help on using the changeset viewer.