views:

94

answers:

2

Hi Guys,

I was reading about horizontal and vertical parity check codes. One of the properties of these codes is that the final parity check (the lower right bit) is equal to modulo 2 sum of horizontal parity checks and also equal to modulo 2 of sum of vertical parity checks.

I did not understand, why this is true. I can see them in the examples but i really cant come up with any formal/intuitive proof about the same.

Any help/hints will be appreciated.

Thanks, Chander

+1  A: 

Each row and column is sum modulo 2. And result is sum of all numbers mod 2. It does not matter how you count.

Rule is:
((a mod c) + (b mod c)) mod c == (a+b) mod c

ralu
+1  A: 

This is because every wrong bit propagates the parity either horizontally either vertically..

think about having your matrix of bits:

A B C D
E F G H
I J K L
M N O P

now some of these bits are wrongly transmitted, so you have a total of y errors that are layed around but you don't know where inside the matrix.

If you go by rows (so you calculate horizontal parity) you will be sure that the sum of every row parity modulo 2 will be 0 if you have an even number of errors in that row, 1 otherwise. You will be also sure of the fact that you are considering all of them since you do this work for every row.

Finally if you suppose to correct a bit from a row and alter another one in another one the final result won't change, since you basically remove 1 from a rows to add it elsewhere.

Then think about doing it by columns, you will end up with the same exact behaviour, the only difference is that errors can be distribuited in a different way but adding vertical parity together modulo 2 will take into account same considerations. Since the number of total errors is the same it will be an even number or an odd number either for rows and columns.

Jack