FA-72598 / Check-digit algorithms / Member archive
Second control digit uses the supplied first control digit · case 03
When the first control digit is mistyped, the reported expected second control digit is also wrong.
Case contract
Norwegian-style 11-digit national identity number with two mod-11 control digits. k1 uses weights 3,7,6,1,8,9,4,5,2 on digits 1-9; k2 uses 5,4,3,2,7,6,5,4,3,2 on digits 1-9 followed by the computed k1. Each is 11 - (sum mod 11) with 11 mapped to 0; a value of 10 means the base number is "unassignable". Non-11-digit input is "malformed". Return [k1, k2, whether digits 10 and 11 equal k1 and k2].
Why this case matters
Population registers validate national identity numbers and report which control digit disagrees.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ["12060326049"] | [0, 3, false] | [0, 0, false] | Failed |
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 ↗