修复缺少数字的代码编号
我最近一直在阅读有关求职面试的纠错信息,并编写了许多使用 n 元 BCH(Bose、Chaudhuri、Hocquenghem)循环码的程序,现在编写了一个脚本,一旦给定“区域”,该脚本将生成电话号码给定用户的“code”(编码),并将对其进行解码并修复最多两个错误(并检测更多)。
我现在希望能够修复其中一个缺少某些数字的电话号码(两个似乎可行)。研究 ISBN 代码后,似乎可以修复 ISBN 代码,如果两个随机数字已被删除。
I have recently been reading about Error Correction for a job interview and have written a number of programs that use n-ary BCH (Bose, Chaudhuri, Hocquenghem) cyclic codes and have now written a script that will generate phone numbers once given an "area code" for a given user (encoding) and will decode it and will repair up to two errors (and detect more).
I would like to now be able to repair one of the phone numbers given if it is missing some digits (two seems doable). After researching ISBN codes it appears that it is possible to repair a ISBN code if two random digits have been removed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在您的解码课程中,您声明综合症数字确定是否存在错误。为什么不用 x 和 y 替换这两个缺失的数字,并在整个数字中更改它们,以找到每个可能的空间,其中每个校正数数字都是 0?
问题是找到这些错误的位置。正如您所说,仅在左侧、右侧和中间输入数字并没有多大作用,因为它会返回错误的代码。
In your Decoding class you state that the syndrome digit determine whether there is an error or not. Why not replace the two missing digits with
x
andy
and change them throughout the number to find every possible space for them where each syndrome digit is 0?The problem is finding the location of these errors. As you've stated, just sticking in digits left, right and centre won't really do much as it'll return the wrong codes.
我不认为电话号码符合限制,因此更难找到正确的号码。
另外,我相信 ISBN 编号只有模数检查,只能检测到一位数字错误(多个数字可能会相互抵消)。
换句话说,你根本无法可靠地做你想做的事。
I do not believe phone numbers confirm to a restriction making it harder to get the wrong number right.
Also I belive ISBN-numbers only have a modulus check which only can detect that one digit is wrong (more than one may cancel each other out).
In other words, you simply cannot do reliably what you want to do.