FAILURE MAP
← Case archive

FA-72400 / Check-digit algorithms / Member archive

Verhoeff returns the final state instead of its inverse · case 05

Payloads ending in states 1-4 get a check digit that does not validate.

Member previewVariant 5 · 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 ["0", "generate"]14Failed

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 ↗