Test swapped-digit detection.
Initialising algorithm engine for Transposition Error Simulator...
How Transposition Error Simulator Works?
The Transposition Error Simulator works by swapping every pair of adjacent different digits in a payload, recomputing the check character, and counting the swaps that change the result.
- 1Enter a test payload and select algorithms.
- 2Generate every adjacent swap ab → ba with a ≠ b.
- 3Recompute the check character for each swapped payload.
- 4Count swaps that change the check character as detected.
- 5List the digit pairs each algorithm misses.
Transposition Error Simulator Formula
The transposition rate formula is Rate = detected adjacent swaps ÷ all adjacent swaps × 100%.
Swaps = { payload with positions i, i+1 exchanged | dᵢ ≠ dᵢ₊₁ }
Rate = |{ s : f(s) ≠ f(original) }| ÷ |Swaps| × 100%Swapscovers all 90 ordered pairs of different digits at each position.
Luhn(1090) = 0 Luhn(1900) = 0 Same check digit → swap undetected GS1(1160) = 0, GS1(1610) = 0 → pairs differing by 5 go undetected
Transposition Error Simulator Conversion Table
The simulator table shows measured adjacent-swap detection for 9 algorithms.
| Algorithm | Swaps tested | Detected | Missed | Detection rate |
|---|---|---|---|---|
| Luhn (Mod 10) | 630 | 616 | 14 | 97.8% |
| GS1 Mod 10 | 630 | 560 | 70 | 88.9% |
| Verhoeff | 630 | 630 | 0 | 100.0% |
| Damm | 630 | 630 | 0 | 100.0% |
| Weighted Mod 11 (2–7) | 630 | 630 | 0 | 100.0% |
| ISO 7064 MOD 11-2 | 630 | 630 | 0 | 100.0% |
| ISO 7064 MOD 11,10 | 630 | 616 | 14 | 97.8% |
| ISO 7064 MOD 97-10 | 630 | 630 | 0 | 100.0% |
| ABA 3-7-1 | 630 | 560 | 70 | 88.9% |
Measured over 7 positions × 90 digit pairs of the test string 31415926.
What is Transposition Error Simulator?
A Transposition Error Simulator is a tool that measures the rate at which a check digit algorithm catches 2 swapped neighbouring digits. Adjacent transpositions are the second most common typing error after single substitutions.
Luhn misses only the 09/90 pair, GS1 and ABA miss pairs that differ by 5, and Verhoeff, Damm, weighted Mod 11, ISO 7064 MOD 11-2, and MOD 97-10 miss none.
What are the uses of Transposition Error Simulator?
There are 3 main uses of the Transposition Error Simulator, including algorithm selection, risk assessment, and teaching.
- Algorithm selection: Teams choose schemes with 100% swap detection for manual entry.
- Risk assessment: Analysts quantify the share of swap errors that pass unnoticed.
- Teaching: Instructors show why Verhoeff and Damm were invented.