All published worksheets from http://sagenb.org
Image: ubuntu2004
Code Construction
On the last worksheet we learned how to contruct linear codes by entering in a generator matrix. Sage will make a random linear code with the length and dimension you specify over the finite field you specify.
Hamming Codes
As we learned in class, Hamming Codes are defined by their parity check matrices. Sage will create Hamming Codes for us, and if we ask for them, will give us the parity check matrix. We can check that the code having this parity check matrix is the same as the code defined. To construct the binary Hamming Code with check matrix the syntax is C=HammingCode(r,GF(2)), and for -ary codes it is C=HammingCode(r,GF(q)).
Golay Codes
Sage also has constructions for the Binary Golay Code, the Extended Binary Golay Code, the Ternary Golay Code, and the Extended Ternary Golay Code.
Homework
1. Construct an SDA for the Extended Hamming code , and use it to decode 110101101010101010111111.
2. Construct an example code to show the shortening process can change the rank, and another in which the rank remains unchanged.
3.The dual of the extended Hamming code is called the first order Reed-Muller code, and is denoted .
a) Find a generator matrix and a praity check matrix for .
b) Determine the parameters for this code.
c) Let denote the repetition code of length . Construct a generator matrix for the code which is obtained by using the construction on the codes and .
d) What is the relation between the codes and ?
4. Consider the codes with generator matrices . We will construct a code of dimension 16. Here we describe the endoing process. Take a bianry message of length 16, and break it into 4 words of length 4 each. Arrange the four words as four rows in a matrix (watch the order). Now, encode each row using code to obtains rows of length . You now have a matrix of size . Now use code to encode each column of this matrix. You should obtain a matrix. Now write the rows of this matrix into on large row of length 49. This is the enceded word. We have constructed an example of a Product Code, in this case of length 49 and dismension 16.
Produce a generator matrix for this code.
5. Choose two of the following three problems
a)Prove the result about minimal distances of extended codes (see lecture notes from 2/7/12).
b) Exercise 5.23 from the text
c) Exercise 5.31 from the text
If you are taking math 527 do the following additional problems:
6. Prove the result about minimal distances for the construction in the special case that .
7. Let be a binary linear code with minimal distance . Show that there is a coset of that contains at least two words of weight .