水平和垂直奇偶校验码
我正在阅读有关水平和垂直奇偶校验码的内容。这些代码的特性之一是最终奇偶校验(右下位)等于水平奇偶校验和的模 2,也等于垂直奇偶校验和的模 2。
我不明白为什么这是真的。我可以在示例中看到它们,但我真的无法提出任何正式/直观的证据。
任何帮助/提示将不胜感激。
谢谢, 钱德
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
每行和每列都对模 2 求和。结果是所有数字的和模 2。无论您如何计数。
规则是:
((a mod c) + (b mod c)) mod c == (a+b) mod c
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
这是因为每个错误的位都会水平或垂直地传播奇偶校验。
考虑一下您的位矩阵:
现在其中一些位被错误地传输,因此总共有 y 个错误被放置周围,但你不知道矩阵内部的位置。
如果按行进行(因此计算水平奇偶校验),如果该行中有偶数个错误,则可以确保每行奇偶校验模 2 的总和将为 0,否则为 1。您还将确信您正在考虑所有这些,因为您对每一行都进行了这项工作。
最后,如果您想从一行中纠正一点并在另一行中更改另一行,则最终结果不会改变,因为您基本上从一行中删除 1 以将其添加到其他位置。
然后考虑按列进行操作,您最终会得到相同的行为,唯一的区别是错误可以以不同的方式分布,但将垂直奇偶校验加在一起模 2 将考虑相同的考虑因素。由于总错误数相同,因此行和列的错误总数将是偶数或奇数。
This is because every wrong bit propagates the parity either horizontally either vertically..
think about having your matrix of bits:
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.