Content deleted Content added
Ref. corrected |
m Do general fixes and cleanup using AWB (8843) |
||
Line 6:
== Algorithm ==
The validity of a digit sequence containing a check digit is defined over a quasigroup. A quasigroup table ready for use can be taken from Damm's dissertation (pages 98, 106, 111).<ref name=dhmd />
=== Validating a number against the included check digit ===
Line 20:
== Example ==
The TA-quasigroup is taken from Damm's doctoral dissertation page 111.<ref name=dhmd />
{| class="wikitable" style="text-align:center;background:none;color:#E000E0"
|- style="color:#00A000"
Line 111:
== Graphical illustration ==
[[File:Check digit TA quasigroup dhmd111rr illustration eg5724.svg]]
== Source code ==
===
<source lang="c">
char Taq(char* number)
Line 145:
== Strengths and weaknesses ==
The Damm algorithm is similar to the [[Verhoeff algorithm]]. It too will detect ''all'' occurrences of altering one single digit and ''all'' occurrences of transposing two adjacent digits. (These are the two most frequently appearing types of [[transcription error]]s.<ref name=dhmd />). But the Damm algorithm has the benefit that it makes do without the dedicatedly constructed [[permutation]]s and its position specific [[Exponentiation#In_abstract_algebra|powers]] being inherent in the [[Verhoeff algorithm|Verhoeff scheme]]. Furthermore, a table of [[
The Damm algorithm does not suffer from exceeding the number of 10 possible values, resulting in the need for using a non-digit character (as the [[X]] in the [[ISBN#ISBN-10_check_digit_calculation|ISBN-10]] [[Check_digit#ISBN_10|check digit]] scheme).
|