Content deleted Content added
m Undid revision 1167656412 by 50.209.116.228 (talk) |
m Reverted edits by 2603:8001:4500:1199:D4A5:3404:C186:3731 (talk) (AV) |
||
(11 intermediate revisions by 7 users not shown) | |||
Line 1:
{{Short description|Check digit algorithm}}
In [[error detection]], the '''Damm algorithm''' is a [[check digit]] [[algorithm]] that detects all [[Transcription error|single-digit errors]] and all [[Transcription error#Transposition error|adjacent transposition errors]]. It was presented by H. Michael Damm in 2004
== Strengths and weaknesses ==
Line 42 ⟶ 43:
== Example ==
The following operation table will be used.<ref name="fenwick2014" /> It may be obtained from the totally anti-symmetric quasigroup {{math|''x'' ∗ ''y''}} in Damm's doctoral dissertation page 111<ref name="dhmd" /> by rearranging the rows and changing the entries with the permutation {{math|1=''φ'' = (1 2 9 5 4 8 6 7 3)}} and defining {{math|1=''x'' ⋅ ''y'' = ''φ''<sup>−1</sup>(''φ''(''x'') ∗ ''y'')}}.
{| class="skin-invert wikitable" style="text-align:center
|- style="color:#00A000"
|style="width:1.5em"| {{math|1=⋅}}
Line 89 ⟶ 90:
=== Calculating the check digit ===
{| class="skin-invert wikitable" style="text-align:center
|- style="color:#00A000"
!style="color:black"| <span style="color:#00A000">digit to be processed</span> → column index
Line 109 ⟶ 110:
=== Validating a number against the included check digit ===
{| class="skin-invert wikitable" style="text-align:center
|- style="color:#00A000"
!style="color:black"| <span style="color:#00A000">digit to be processed</span> → column index
Line 115 ⟶ 116:
|style="width:1.5em"| 7
|style="width:1.5em"| 2
|style="width:1.5em"| 4
|-
Line 122:
| 9
| 7
| 4
|-
Line 129 ⟶ 128:
| 7
| 4
| '''0'''
|}
Line 157 ⟶ 155:
{{Wikibooks|Algorithm Implementation/Checksums/Damm Algorithm}}
*[[b:Algorithm Implementation/Checksums/Damm Algorithm|Damm validation & generation code in several programming languages]]
*[
*[http://www.md-software.de/math/DAMM_Quasigruppen.txt Quasigroups for the Damm algorithm up to order 64]
*[https://rosettacode.org/wiki/Damm_algorithm At RosettaCode.org, Implementations of the Damm algorithm in many programming languages]
|