How to list all codewords of C ?

82 views
Skip to first unread message

GUSTAVO TERRA BASTOS

unread,
Jan 25, 2022, 9:36:43 AM1/25/22
to sage-support
Hey guys. Hope everyone is fine.
I am sage beginner, I´d like to know how to describe all the codewords from my linear code C. Best, Gustavo.

 

David Joyner

unread,
Jan 25, 2022, 9:54:14 AM1/25/22
to SAGE support
Welcome Gustavo!

Here's an example:

sage: C = codes.HammingCode(GF(2),3); C
[7, 4] Hamming Code over GF(2)
sage: C.list()
[(0, 0, 0, 0, 0, 0, 0),
(1, 0, 0, 0, 0, 1, 1),
(0, 1, 0, 0, 1, 0, 1),
(1, 1, 0, 0, 1, 1, 0),
(0, 0, 1, 0, 1, 1, 0),
(1, 0, 1, 0, 1, 0, 1),
(0, 1, 1, 0, 0, 1, 1),
(1, 1, 1, 0, 0, 0, 0),
(0, 0, 0, 1, 1, 1, 1),
(1, 0, 0, 1, 1, 0, 0),
(0, 1, 0, 1, 0, 1, 0),
(1, 1, 0, 1, 0, 0, 1),
(0, 0, 1, 1, 0, 0, 1),
(1, 0, 1, 1, 0, 1, 0),
(0, 1, 1, 1, 1, 0, 0),
(1, 1, 1, 1, 1, 1, 1)]

More info is here
https://wiki.sagemath.org/Coding_Theory
and here
https://groups.google.com/g/sage-coding-theory

- David

>
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/69f3b64e-e0e7-49c0-8daa-224e18603c40n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages