#14973: New functions for binary linear codes
---------------------------------+--------------------------
Reporter: veronica | Owner:
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.12
Component: coding theory | Resolution:
Keywords: binary codes | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Dependencies:
Stopgaps: |
---------------------------------+--------------------------
Comment (by veronica):
Here is the patch with the last details fixed. And I added the GDDA
algorithm. This algorithm with Hamming Codes and Random linear codes seems
to be faster.
For example I have tested(among others):
{{{
sage: C = HammingCode(5,GF(2))
sage: v = random_vector(GF(2),C.length())
sage: v
(1,1,0,1,0,1,0,0,0,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1)
#using syndrome algorithm
sage: %time C.decode(v)
CPU times: user 847.37 s, sys: 4.45 s, total: 851.82 s
Wall time: 868.36 s
(1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1)
#using nearest neighbor algorithm
sage: %time C.decode(v,"nearest neighbor")
CPU times: user 879.19 s, sys: 1.61 s, total: 880.80 s
Wall time: 880.80 s
(1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1)
#using guava algorithm
sage: %time C.decode(v,"guava")
CPU times: user 0.07 s, sys: 0.02 s, total: 0.08 s
Wall time: 1.00 s
(1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1)
#using GDDA algorithm (first time compute grobner representation)
sage: %time C.decode_gdda(v)
CPU times: user 0.73 s, sys: 0.06 s, total: 0.78 s
Wall time: 0.84 s
(1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1)
#using GDDA algorithm (with grobner representation computed)
sage: %time C.decode_gdda(v)
CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s
Wall time: 0.00 s
(1,1,0,0,0,1,0,0,0,0,1,0,1,0,1,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,1)
}}}
I've been suggeste to use `timeit` instead of `time` for benchmarking, so
that's next. But with this results of time we can appreciate the
differences among the differents decoding algorithms
--
Ticket URL: <http://trac.sagemath.org/ticket/14973#comment:11>
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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.