#20705: Classes for Reed Muller Codes
-------------------------------------+-------------------------------------
Reporter: panda314 | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-7.3
Component: coding theory | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/panda314/classes_for_reed_muller_codes|
9fb9b697ceb1e21ee450809a3447695d46f075bb
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by panda314):
* commit: => 9fb9b697ceb1e21ee450809a3447695d46f075bb
Old description:
> 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 description:
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
I used the following code snippets to test them,
{{{
#for q>2
code=ReedMullerCode(3, 2, 2)
print code.dimension()
E1=ReedMullerVectorEncoder(code)
E2=ReedMullerPolynomialEncoder(code)
R=PolynomialRing(code.base_field(),code.numberOfVariable,"x")
x0=R.gen(0)
x1=R.gen(1)
c1=E1.encode(vector(GF(3),[1,1,1,1,1,1]))
print c1
c2=E2.encode(1+x0+x1+x1^2+x1*x0)
print c2
D=LinearCodeSyndromeDecoder(code)
c=D.decode_to_code(vector(GF(3),[1, 2, 0, 0, 2, 0, 1, 1, 1]))
print c
print E2.unencode_nocheck(c)
print D.decode_to_message(vector(GF(3),[1,2,1,0,0,2,1,2,2]))
}}}
The output of which was,
{{{
6
(1, 0, 1, 0, 0, 2, 1, 2, 2)
(1, 2, 0, 0, 2, 1, 1, 1, 1)
(1, 2, 0, 0, 2, 1, 1, 1, 1)
x0*x1 + x1^2 + x0 + x1 + 1
(1, 1, 1, 1, 1, 1)
}}}
{{{
#for q=2
code=ReedMullerCode(2, 2, 4)
print code.dimension()
E1=ReedMullerVectorEncoder(code)
E2=ReedMullerPolynomialEncoder(code)
R=PolynomialRing(code.base_field(),code.numberOfVariable,"x")
x0=R.gen(0)
x1=R.gen(1)
x2=R.gen(2)
x3=R.gen(3)
c1=E1.encode(vector(GF(2),[1,1,1,1,1,0,0,0,1,0,0]))
print c1
c2=E2.encode(1+x0+x1+x2+x3*x2)
print c2
D=LinearCodeSyndromeDecoder(code)
c=D.decode_to_code(vector(GF(2),[1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0,
0, 0]))
print c
print E2.unencode_nocheck(c)
print D.decode_to_message(vector(GF(2),[0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1,
0, 1, 0, 1, 0]))
}}}
This gave the output as:
{{{
11
(1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0)
(1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1)
(1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1)
x2*x3 + x0 + x1 + x2 + 1
(1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0)
}}}
--
Comment:
Replying to [ticket:20705 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:
||[http://git.sagemath.org/sage.git/commit/?id=0ffd780234a19321ad2cee7676ebbef26bdc8bdf
0ffd780]||{{{adding ReedMullerCode.py containing support for encoding of
Reed Muller Codes}}}||
||[http://git.sagemath.org/sage.git/commit/?id=9fb9b697ceb1e21ee450809a3447695d46f075bb
9fb9b69]||{{{Merge branch 'RMCode' into
t/20705/classes_for_reed_muller_codes}}}||
--
Ticket URL: <http://trac.sagemath.org/ticket/20705#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.