Quote:
Originally Posted by furyshade
the last section of my linear algebra class is on error correcting codes. I think i get it but the homework doesn't quite make sense give my interpretation
Given the vectors:
a = 000 000 111
b = 000 111 000
c = 111 000 000
d = 001 001 001
e = 010 010 010
A)
i) what is the word length n? 9 seems pretty obvious
ii) how many information bits? from what we learned it seems this is equal k where 2^k=number of code words (5). all the examples we did were codes with some even power of 2 number of code words. not sure how to do this here
iii) how many check bits? its just 9-k, but need to figure out k
B) how many errors can the code correct? hamming weight is 3 so 1 error
C) how many code words are there? i think 5 but maybe this is where my misunderstanding is
D) write the H matrix for this code. I think i can do this if i figure out how many info bits there are.
A)
9
5 information bits. Basically, we can tell 32 messages using linear combinations of the 5 generating codewords.
That means there are 4 check bits.
The idea behind check bits is like ok, I want to send you either YES (1) or NO (0), but my channel is noisy, and there's a chance my bit gets flipped (assume p(0-->1) = p(1-->0) for your cartoon model, but note that this might be a bad assumption). So instead, I send you
00000000000000000000000000000000 for NO, or
11111111111111111111111111111111 for YES.
Now if one or two of my bits get flipped, you might receive something like
00000000001000000000100000000000
which you'd obviously decode as NO.
So there's only 1 bit of info being transmitted (0 or 1; i.e., 2 valid codewords), but there are 31 bits of "check" on your message.
B) You're right that the number of errors corrected is 1. That's because we check between all pairs of codewords, and the minimal Hamming distance is 3. For linear codes only, this is equivalent to the minimal nonzero Hamming weight (ducy? Let w = hamming weight, and d(a,b) = w(a-b) = Hamming distance from a to b. Then since the code is linear, for all a,b in C (the code), a-b in C. So if D is the min_dist of the code, then some a,b have d(a,b)=D, but then a-b is a codeword with weight D.)
Of course, before you conclude that d=3, you should check that no linear combination of those 5 codewords has smaller weight.
C) 32
D) The typical notation is G = generator matrix = rowspan of the matrix with a,b,c,d,e as its rows.
H = "parity check matrix", which has as its rows a basis for the nullspace of G. There should be n-k independent such vectors. The parity-check matrix is useful for decoding (see "syndrome decoding") and is the generator for the "dual code" of C.