#19422: A new structure for Punctured Codes
-------------------------------------+-------------------------------------
       Reporter:  dlucas             |        Owner:
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-7.2
      Component:  coding theory      |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  David Lucas        |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/dlucas/punctured_codes           |  69da167f0a9d4a0fc68e0846416577a5ddb44eba
   Dependencies:  #19653             |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jlavauzelle):

 * status:  needs_review => needs_work


Comment:

 *** src/sage/coding/punctured_code.py ***
 --- function `puncture` ---
 - same strange way to compute the non-punctured positions than in grs.py.
 For example, it doesn't work with:
 {{{
 C = codes.RandomLinearCode(11, 5, GF(7))
 Cp = codes.PuncturedCode(C, [4,3])
 v = vector(GF(7), (2,3,0,2,1,5,1,5,6,5,3))
 sage.coding.punctured_code.puncture(v, [4,3], Cp)
 }}}

 --- class `PuncturedCode` ---
 - constructor:
 `positions = list(set(positions))` is a short (maybe dirty) way to do:
 {{{
 unique_positions = set()
 for i in positions:
     unique_positions.add(i)
 positions = []
 for i in unique_positions:
    positions.append(i)
 }}}
 and it looks to sort the elements as well =) Also remark that you don't
 have this "multiplicity" issue when using Python sets (instead of lists)
 for storing puncturing points.
 - in encode() method, you missed parentheses after
 `self.punctured_positions` in `return puncture(c,
 self.punctured_positions, self)`
 - in structured_representation(self) method: in the doc, you wrote "A
 punctured GRS code is still a punctured code" but I think you meant "still
 a GRS code". Moreover, I don't understand what you mean by "Which is not
 the case for generic linear codes": punctured linear codes are still
 linear codes.
 - still in structured_representation(self) method, I tried this:
 {{{
 sage: C = codes.GeneralizedReedSolomonCode(GF(7).list(), 4)
 sage: P = codes.PuncturedCode(C, [1,3])
 sage: Q = codes.PuncturedCode(P, [1,3])
 sage: P.length()
 5
 sage: Q.length()
 3
 sage: P.structured_representation()
 [5, 4, 2] Generalized Reed-Solomon Code over Finite Field of size 7
 sage: Q.structured_representation()
 [5, 3, 3] Generalized Reed-Solomon Code over Finite Field of size 7
 }}}
 So, double puncturing works well (`Q` seems to be the right code), but
 `structured_representation()` doesn't build the right Reed-Solomon code.

 --- class `PuncturedCodePuncturedMatrixEncoder` ---
 - in `GeneratorMatrix`: same comment as in linear_code.py, I think
 echelon_form()do the job and you just need to keep the `k` first rows.

 --- class `PuncturedCodeOriginalCodeDecoder` ---
 - sage is stuck (infinite loop ?) when I run this:
 {{{
 sage: R = codes.RandomLinearCode(11, 5, GF(7))
 sage: P = codes.PuncturedCode(R, [1,3])
 sage: P.decoder()
 }}}
 - l.444: you wrote ``'random_values'`` instead of ``'random-values'``
 - in the constructor: you have a test variable `error_erasure` to which
 you assign `0` and `1`. Maybe `True` and `False` are more explicit.
 - in `decode_to_code`: l.600, I think you forgot to increment `shift`
 (otherwise I misunderstood the use of `shift`)
 - maybe add an `elif self._strategy == 'try-all'` at line 643.
 - l.670: `ValueError("The number of erasures exceed decoding capability")`
 --> exceeds
 - l.672: decoding capability must be:
 {{{
     return (diff - punctured -1) // 2
 }}}
 - l.665; you could have negative radius with:
 {{{
 if self._strategy != 'try-all' and "error-erasure" not in
 D.decoder_type():
     return D.decoding_radius() - punctured
 }}}
 - I don't understand the last `return D.decoding_radius()`, line 675. To
 which case does it apply ?

--
Ticket URL: <http://trac.sagemath.org/ticket/19422#comment:21>
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.

Reply via email to