Repairing Code Number with missing digits

1k views Asked by At

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.

2

There are 2 answers

0
Mike B On BEST ANSWER

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 and y 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.

2
Thorbjørn Ravn Andersen On

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.