A huge amount of research has been done on binary error correcting codes, but much less has been done on base 10. There's the Verhoeff error detecting code and a few other things similar.
For decimal, we would like the error-correcting code to be optimized against digit mistakes that humans especially make, e.g., transposition, as Verhoeff is.
Simple but not very efficient: Base-64 Reed-Solomon. Message digits use only values 0-9 of the 0-63 range. Check digits in chunks of 2, because they can range 00-63. Transpositions are two errors, so we need at least 4 chunks or 8 check digits appended to each message. (We've made no attempt to optimize for transposition.) (8 check digits is a lot for something like a credit card number of ZIP code.) Reed-Solomon can use any prime power, so anything from base 11 to 97, including 16 and 81, could also work, though I haven't seen any non-binary implementations. For smaller bases, it might be worthwhile to prefer smaller digits in the check digits.
For base 26, i.e., letters of the alphabet, any prime power between 27 to 673 (including 5^4=625 and 2^9=512). Same as decimal: at least 8 check letters.
No comments :
Post a Comment