Path: blob/main/course-contents/notebooks/2024-03-13--ReedSolomon-class.ipynb
469 views
Kernel: SageMath 10.2
In [2]:
Out[2]:
Reed Solomon code with q = 19 and k = 5
Can correct t = 7 errors.
test decoding of 10 random vectors in C each with <=7 random errors
all passed? True
------
sent/received/error:
[10 1 6 13 12 14 13 5 7 0 5 7 12 9 8 2 5 14 9]
[ 3 1 6 13 12 3 13 5 7 0 5 4 14 7 8 2 5 12 9]
[12 0 0 0 0 8 0 0 0 0 0 16 2 17 0 0 0 17 0]
decoded correctly? True
-----
sent/received/error:
[ 1 17 9 13 14 3 15 15 12 2 6 13 18 3 13 4 14 11 7]
[13 17 9 13 14 3 15 15 12 2 17 13 18 9 2 4 11 11 5]
[12 0 0 0 0 0 0 0 0 0 11 0 0 6 8 0 16 0 17]
decoded correctly? True
-----
sent/received/error:
[ 5 0 13 16 5 0 7 18 11 7 13 3 13 8 15 9 8 16 4]
[ 5 1 13 16 5 0 7 10 11 7 13 3 9 8 3 9 8 1 14]
[ 0 1 0 0 0 0 0 11 0 0 0 0 15 0 7 0 0 4 10]
decoded correctly? True
-----
sent/received/error:
[ 3 9 5 4 17 15 5 11 17 5 12 16 12 12 7 5 12 13 10]
[ 3 14 10 4 17 15 14 11 17 5 12 16 12 12 7 5 5 13 1]
[ 0 5 5 0 0 0 9 0 0 0 0 0 0 0 0 0 12 0 10]
decoded correctly? True
-----
sent/received/error:
[18 15 1 11 11 12 13 1 8 16 14 17 9 0 7 16 1 0 1]
[18 15 10 11 12 12 13 1 8 18 17 17 9 0 7 16 17 10 1]
[ 0 0 9 0 1 0 0 0 0 2 3 0 0 0 0 0 16 10 0]
decoded correctly? True
-----
sent/received/error:
[ 2 7 7 14 3 7 3 7 17 13 14 2 17 5 8 12 4 10 0]
[ 2 7 7 14 3 7 17 7 7 13 14 18 17 6 8 13 4 10 0]
[ 0 0 0 0 0 0 14 0 9 0 0 16 0 1 0 1 0 0 0]
decoded correctly? True
-----
sent/received/error:
[ 4 3 3 13 15 2 16 15 6 7 9 14 16 1 4 14 12 9 8]
[ 9 3 3 13 15 2 16 15 6 6 9 14 16 1 4 9 12 9 8]
[ 5 0 0 0 0 0 0 0 0 18 0 0 0 0 0 14 0 0 0]
decoded correctly? True
-----
sent/received/error:
[14 17 1 11 1 5 4 2 7 12 14 14 17 13 15 2 14 0 8]
[11 17 9 11 1 7 4 8 15 12 14 14 17 13 15 2 14 14 8]
[16 0 8 0 0 2 0 6 8 0 0 0 0 0 0 0 0 14 0]
decoded correctly? True
-----
sent/received/error:
[ 6 3 13 10 15 1 7 5 14 5 15 14 0 18 8 14 13 10 0]
[ 6 13 13 11 15 1 7 5 14 9 15 11 0 18 1 4 13 14 0]
[ 0 10 0 1 0 0 0 0 0 4 0 16 0 0 12 9 0 4 0]
decoded correctly? True
-----
sent/received/error:
[15 0 14 15 7 2 1 13 17 0 14 5 3 8 9 3 14 17 14]
[15 0 13 15 7 2 12 13 7 0 11 18 12 8 17 3 14 17 14]
[ 0 0 18 0 0 0 11 0 9 0 16 13 9 0 8 0 0 0 0]
decoded correctly? True
-----
In [ ]: