Skip to main content
Check Digit Calculator
Diagnostic

Transposition Error Simulator

Explore adjacent-digit swap detection under a checksum scheme. Compare swaps that change the check character with undetected cases.

Last updated:

Diagnostic, Analysis & Utilities

Test swapped-digit detection.

Length: 10 chars
Calculated Check Character / Checksum
--Ready
Complete Validated Sequence:
--
Arithmetic Steps & Mathematical Specification

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.

  1. 1Enter a test payload and select algorithms.
  2. 2Generate every adjacent swap ab → ba with a ≠ b.
  3. 3Recompute the check character for each swapped payload.
  4. 4Count swaps that change the check character as detected.
  5. 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%
  • Swaps covers all 90 ordered pairs of different digits at each position.
Worked example: Luhn misses 09 ↔ 90
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.

AlgorithmSwaps testedDetectedMissedDetection rate
Luhn (Mod 10)6306161497.8%
GS1 Mod 106305607088.9%
Verhoeff6306300100.0%
Damm6306300100.0%
Weighted Mod 11 (2–7)6306300100.0%
ISO 7064 MOD 11-26306300100.0%
ISO 7064 MOD 11,106306161497.8%
ISO 7064 MOD 97-106306300100.0%
ABA 3-7-16305607088.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.