[EM] Rank Codes

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[EM] Rank Codes

Forest Simmons
A simple error correcting digital code:

Replace every numeral 1 with 1A, every 2 with 2B, .... 
3 with 3C,
4 with 4D,
5 with 5E
... that completes one hand.

The other hand uses the other end of the alphabet:
6V, 7W, 8X, 9Y, 0Z

So you would encode 57 as 5E7W,
392 as 3C9Y2B
806 as 8X0Z6V,

If you cannot quite make out either character, see which ranks are missing ... if 37 is one of them, then which code word looks most like 3C7W, etc. It would take pretty bad handwriting to make a word unrecoverable.

The error correction power is enhanced if you transpose the alpha and numeric characters for even numerals: 1A, B2, 3C, D4, 5E, V6, 7W, X8, 9Y, Z0. 

Suppose you see something that looks like 2F ... the 2 cannot be correct because even digits come after letters, not before. So which odd digit looks most like a 2? Probably the 5. In that case the F should be an E, which makes sense because E is the code letter tha looks most like F.  Therefore 2F gets corrected to 5E.

Another slightly more complicated but more economical code (based on "casting out nines") uses one of the nine letters A,B,C,D,E, F, G, H, Z for a check character appended to a number depending on whether the respective "digital root" of the number is 1, 2, 3, 4, 5, 6, 7, 8, or 0, respectively. The digital root is obtained by adding the digits repeatedly (in any order) until there is only one digit left, while throwing away 9's at every opportunity. The result is equal to the original number mod 9, in other words, the remainder you get when dividing the original by 9.

So for example the number 5738 has a digital root of 5 because 57 can be replaced by 5 + 7 = 12, which can be replaced by 1 + 2 = 3, and 3 + 3 = 6, and 6 + 8 is 14, and 1 + 4 = 5.  So the check character is E: the code word for 5738 is 5738E.  If the check character doesn't match the digital root, then an error has been made. This is analogous to the parity bit in base two (binary) arithmetic.

If we added the digits in the order  7 + 3 + 8 + 5, we would get 10 + 8 = 18, and 1 + 8 is 9, which we cast out, leaving only the 5, same as before... magic!

Election-Methods mailing list - see https://electorama.com/em for list info