Changes between Initial Version and Version 2 of Ticket #20705


Ignore:
Timestamp:
05/29/16 16:22:19 (5 years ago)
Author:
panda314
Comment:

Replying to panda314:

This ticket proposes a implementation of Reed Muller Codes. It contains:

two new code classes, QAryReedMullerCode and BinaryReedMullerCode?, which implements the two classes of reed muller codes two encoder classes, ReedMullerVectorEncoder? and ReedMullerPolynomialEncoder? which are used by both the code classes some additional functions to assist in computations related to the polynomials.

NOTE: Both the classes are implemented separately since they would have different decoders


New commits:

0ffd780adding ReedMullerCode.py containing support for encoding of Reed Muller Codes
9fb9b69Merge branch 'RMCode' into t/20705/classes_for_reed_muller_codes

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #20705

    • Property Commit changed from to 9fb9b697ceb1e21ee450809a3447695d46f075bb
    • Property Branch changed from to u/panda314/classes_for_reed_muller_codes
  • Ticket #20705 – Description

    initial v2  
    55
    66NOTE: Both the classes are implemented separately since they would have different decoders
     7
     8I used the following code snippets to test them,
     9
     10{{{
     11#for q>2
     12code=ReedMullerCode(3, 2, 2)
     13print code.dimension()
     14E1=ReedMullerVectorEncoder(code)
     15E2=ReedMullerPolynomialEncoder(code)
     16R=PolynomialRing(code.base_field(),code.numberOfVariable,"x")
     17x0=R.gen(0)
     18x1=R.gen(1)
     19c1=E1.encode(vector(GF(3),[1,1,1,1,1,1]))
     20print c1
     21c2=E2.encode(1+x0+x1+x1^2+x1*x0)
     22print c2
     23D=LinearCodeSyndromeDecoder(code)
     24c=D.decode_to_code(vector(GF(3),[1, 2, 0, 0, 2, 0, 1, 1, 1]))
     25print c
     26print E2.unencode_nocheck(c)
     27print D.decode_to_message(vector(GF(3),[1,2,1,0,0,2,1,2,2]))
     28}}}
     29The output of which was,
     30
     31{{{
     326
     33(1, 0, 1, 0, 0, 2, 1, 2, 2)
     34(1, 2, 0, 0, 2, 1, 1, 1, 1)
     35(1, 2, 0, 0, 2, 1, 1, 1, 1)
     36x0*x1 + x1^2 + x0 + x1 + 1
     37(1, 1, 1, 1, 1, 1)
     38}}}
     39
     40{{{
     41#for q=2
     42code=ReedMullerCode(2, 2, 4)
     43print code.dimension()
     44E1=ReedMullerVectorEncoder(code)
     45E2=ReedMullerPolynomialEncoder(code)
     46R=PolynomialRing(code.base_field(),code.numberOfVariable,"x")
     47x0=R.gen(0)
     48x1=R.gen(1)
     49x2=R.gen(2)
     50x3=R.gen(3)
     51c1=E1.encode(vector(GF(2),[1,1,1,1,1,0,0,0,1,0,0]))
     52print c1
     53c2=E2.encode(1+x0+x1+x2+x3*x2)
     54print c2
     55D=LinearCodeSyndromeDecoder(code)
     56c=D.decode_to_code(vector(GF(2),[1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0]))
     57print c
     58print E2.unencode_nocheck(c)
     59print D.decode_to_message(vector(GF(2),[0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0]))
     60}}}
     61This gave the output as:
     62
     63{{{
     6411
     65(1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0)
     66(1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1)
     67(1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1)
     68x2*x3 + x0 + x1 + x2 + 1
     69(1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0)
     70}}}