FA-72799 / Check-digit algorithms / Member archive
Missing-digit recovery ignores the doubling at the unknown position · case 04
Unknown digits in doubled positions are recovered incorrectly.
Case contract
Recover the single unknown digit (marked "?") in a Luhn-protected number: input must be at least two characters, ASCII digits and exactly one "?" (else None). Return the digit 0-9 that makes the whole number Luhn-valid; when the unknown sits in a doubled position the needed contribution must be mapped back through the doubling map.
Why this case matters
Customer-service tools reconstruct a smudged or misheard digit of an account number.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ["6?0334555"] | 6 | 3 | 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 ↗