FAILURE MAP
← Case archive

FA-72392 / Check-digit algorithms / Member archive

Verhoeff walks digits left to right · case 02

Only palindromic payloads produce correct check digits.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Verhoeff dihedral-group scheme. mode "generate" returns the check digit for a nonempty ASCII digit payload; mode "validate" returns whether a nonempty digit string ending in its check digit is correct. Digits are processed from the right with permutation P[(i + offset) % 8], offset 1 when generating and 0 when validating; the check digit is the dihedral inverse of the final state. Empty or non-digit input returns None.

Why this case matters

National identity and ticketing numbers use Verhoeff to catch all single-digit and adjacent transposition errors.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression ["07668886", "generate"]82Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗