| FazBrowse Wikipedia Viewer | Main Page | | |
| Viewing: https://en.wikipedia.org/wiki/Verhoeff_algorithm |
| Contents |
|---|
| Description |
| Examples |
| External links |
The Verhoeff algorithm is a checksum for error detection first published by Dutch mathematician Jacobus Verhoeff in 1969. It was the first decimal check digit algorithm that detects all single-digit errors, and all transposition errors involving two adjacent digits, which was at the time thought impossible with such a code.
The method was independently discovered by H. Peter Gumm in 1985, this time including a formal proof and an extension to any base.
aa → bb), jump transpositions (aba → cbc). Additionally there are omitted and added digits. Although the frequencies of some of these kinds of errors might be small, some codes might be immune to them in addition to the primary goals of detecting all singles and transpositions.The phonetic errors in particular showed linguistic effects, because in Dutch, numbers are typically read in pairs; and also while 50 sounds similar to 15 in Dutch, 80 does not sound like 18.
Taking six-digit numbers as an example, Verhoeff reported the following classification of the errors:.
| Digits in error | Classification | Count | Frequency |
|---|---|---|---|
| 1 | Transcription | 9,574 | 79.05% |
| 2 | Transpositions | 1,237 | 10.21% |
| Twins | 67 | 0.55% | |
| Phonetic | 59 | 0.49% | |
| Other adjacent | 232 | 1.92% | |
| Jump transpositions | 99 | 0.82% | |
| Jump Twins | 35 | 0.29% | |
| Other jump errors | 43 | 0.36% | |
| Other | 98 | 0.81% | |
| 3 | 169 | 1.40% | |
| 4 | 118 | 0.97% | |
| 5 | 219 | 1.81% | |
| 6 | 162 | 1.34% | |
| Total | 12,112 | ||
The general idea of the algorithm is to represent each of the digits (0 through 9) as elements of the dihedral group D5. That is, map digits to D5, manipulate these, then map back into digits. Let this mapping be 5</sub>"}},"i":0}}]}'>m : [0, 9] → D5
For example the check digit for 942 is 7. To verify this, use the mapping to D5 and insert into the LHS of the previous equation
This is the same reflection being iteratively multiplied. Use that reflections are their own inverse.
|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The first table, d, is based on multiplication in the dihedral group D5. and is simply the Cayley table of the group. Note that this group is not commutative, that is, for some values of j and k, d(j, inv(j)) = 0.
The permutation table p applies a permutation to each digit based on its position in the number. This is actually a single permutation p(i + j, n) = p(i, p(j, n)).
The Verhoeff checksum calculation is performed as follows:
To generate a check digit, append a 0, perform the calculation: the correct check digit is inv(c).
| View original on Wikipedia | Back | FazBrowse Home |