{"abstract":"When the first control digit is mistyped, the reported expected second control digit is also wrong.","category":"Check-digit algorithms","checks":8,"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].","contract_signature":"s","evaluation_group":"w2-check_digit_algorithms-no-national-id","failed_approach":"Omitting digit 10 from the k2 sum drops the weight-2 term entirely.","family":"w2-check_digit_algorithms-no-national-id-second-control-input","id":"FA-72596","implementations":{"attempt":{"sha256":"b73b02548b543ab06395b9d6a591b6f3f34e2e54c702fe609556233308044473","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    if len(s) != 11 or not s.isascii() or not s.isdigit():\n        return 'malformed'\n    d = [int(ch) for ch in s]\n    def ctrl(ws, ds):\n        r = 11 - sum(w * x for w, x in zip(ws, ds)) % 11\n        return 0 if r == 11 else r\n    k1 = ctrl([3, 7, 6, 1, 8, 9, 4, 5, 2], d[:9])\n    if k1 == 10:\n        return 'unassignable'\n    k2 = ctrl([5, 4, 3, 2, 7, 6, 5, 4, 3, 2], d[:9])\n    if k2 == 10:\n        return 'unassignable'\n    return [k1, k2, d[9] == k1 and d[10] == k2]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"15068218891\"]', ['15068218891'], [1, 8, False]], ['regression [\"12026119886\"]', ['12026119886'], [2, 9, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed'], ['control [\"00000000000\"]', ['00000000000'], [0, 0, True]], ['control [\"08042619712\"]', ['08042619712'], [5, 3, False]]], [['regression [\"26096688213\"]', ['26096688213'], [7, 9, False]], ['regression [\"08042619712\"]', ['08042619712'], [5, 3, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed'], ['control [\"00000000000\"]', ['00000000000'], [0, 0, True]], ['control [\"07030971548\"]', ['07030971548'], [0, 1, False]]], [['regression [\"12060326049\"]', ['12060326049'], [0, 0, False]], ['regression [\"20127609775\"]', ['20127609775'], [4, 9, False]], ['partial-repair [\"23057551053\"]', ['23057551053'], [7, 0, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed'], ['control [\"00000000000\"]', ['00000000000'], [0, 0, True]]], [['regression [\"23057551053\"]', ['23057551053'], [7, 0, False]], ['regression [\"13128514961\"]', ['13128514961'], 'unassignable'], ['partial-repair [\"13094093660\"]', ['13094093660'], [4, 8, False]], ['partial-repair [\"27043193556\"]', ['27043193556'], [1, 7, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed']], [['regression [\"15013338686\"]', ['15013338686'], [0, 1, False]], ['regression [\"27043193556\"]', ['27043193556'], [1, 7, False]], ['partial-repair [\"10122564665\"]', ['10122564665'], [4, 4, False]], ['partial-repair [\"23021493559\"]', ['23021493559'], [9, 7, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed']]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"47d81c30dab55ef5a3530e8521f69ae634d5b41028aed21ea9b2544a8a4b4eb0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(s):\n    if len(s) != 11 or not s.isascii() or not s.isdigit():\n        return 'malformed'\n    d = [int(ch) for ch in s]\n    def ctrl(ws, ds):\n        r = 11 - sum(w * x for w, x in zip(ws, ds)) % 11\n        return 0 if r == 11 else r\n    k1 = ctrl([3, 7, 6, 1, 8, 9, 4, 5, 2], d[:9])\n    if k1 == 10:\n        return 'unassignable'\n    k2 = ctrl([5, 4, 3, 2, 7, 6, 5, 4, 3, 2], d[:10])\n    if k2 == 10:\n        return 'unassignable'\n    return [k1, k2, d[9] == k1 and d[10] == k2]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"15068218891\"]', ['15068218891'], [1, 8, False]], ['regression [\"12026119886\"]', ['12026119886'], [2, 9, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed'], ['control [\"00000000000\"]', ['00000000000'], [0, 0, True]], ['control [\"08042619712\"]', ['08042619712'], [5, 3, False]]], [['regression [\"26096688213\"]', ['26096688213'], [7, 9, False]], ['regression [\"08042619712\"]', ['08042619712'], [5, 3, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed'], ['control [\"00000000000\"]', ['00000000000'], [0, 0, True]], ['control [\"07030971548\"]', ['07030971548'], [0, 1, False]]], [['regression [\"12060326049\"]', ['12060326049'], [0, 0, False]], ['regression [\"20127609775\"]', ['20127609775'], [4, 9, False]], ['partial-repair [\"23057551053\"]', ['23057551053'], [7, 0, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed'], ['control [\"00000000000\"]', ['00000000000'], [0, 0, True]]], [['regression [\"23057551053\"]', ['23057551053'], [7, 0, False]], ['regression [\"13128514961\"]', ['13128514961'], 'unassignable'], ['partial-repair [\"13094093660\"]', ['13094093660'], [4, 8, False]], ['partial-repair [\"27043193556\"]', ['27043193556'], [1, 7, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed']], [['regression [\"15013338686\"]', ['15013338686'], [0, 1, False]], ['regression [\"27043193556\"]', ['27043193556'], [1, 7, False]], ['partial-repair [\"10122564665\"]', ['10122564665'], [4, 4, False]], ['partial-repair [\"23021493559\"]', ['23021493559'], [9, 7, False]], ['control [\"05077807892\"]', ['05077807892'], 'unassignable'], ['control [\"09117682532\"]', ['09117682532'], 'unassignable'], ['control [\"1507650056\"]', ['1507650056'], 'malformed'], ['control [\"1507650056a\"]', ['1507650056a'], 'malformed']]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"A deterministic, bounded teaching model of the named scheme under the stated contract; not a certified validator. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-check_digit_algorithms-no-national-id-second-control-input","generated_at":"2026-09-29T14:48:39.859464+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Population registers validate national identity numbers and report which control digit disagrees.","root_cause":"k2 is computed over the ten supplied digits, trusting digit 10 instead of the computed k1.","sha256":"680c95a73f24eaec19e0dcbd538eb69fce69857e8c2aab41a3a6ebddcb249531","title":"Second control digit uses the supplied first control digit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.234,"exit_code":1,"observations":[{"actual":"unassignable","check":"regression [\"15068218891\"]","expected":[1,8,false],"passed":false},{"actual":[2,2,false],"check":"regression [\"12026119886\"]","expected":[2,9,false],"passed":false},{"actual":"unassignable","check":"control [\"05077807892\"]","expected":"unassignable","passed":true},{"actual":"unassignable","check":"control [\"09117682532\"]","expected":"unassignable","passed":true},{"actual":"malformed","check":"control [\"1507650056\"]","expected":"malformed","passed":true},{"actual":"malformed","check":"control [\"1507650056a\"]","expected":"malformed","passed":true},{"actual":[0,0,true],"check":"control [\"00000000000\"]","expected":[0,0,true],"passed":true},{"actual":[5,2,false],"check":"control [\"08042619712\"]","expected":[5,3,false],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"15068218891\\\"]\", \"actual\": \"unassignable\", \"expected\": [1, 8, false], \"passed\": false}, {\"check\": \"regression [\\\"12026119886\\\"]\", \"actual\": [2, 2, false], \"expected\": [2, 9, false], \"passed\": false}, {\"check\": \"control [\\\"05077807892\\\"]\", \"actual\": \"unassignable\", \"expected\": \"unassignable\", \"passed\": true}, {\"check\": \"control [\\\"09117682532\\\"]\", \"actual\": \"unassignable\", \"expected\": \"unassignable\", \"passed\": true}, {\"check\": \"control [\\\"1507650056\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"1507650056a\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"00000000000\\\"]\", \"actual\": [0, 0, true], \"expected\": [0, 0, true], \"passed\": true}, {\"check\": \"control [\\\"08042619712\\\"]\", \"actual\": [5, 2, false], \"expected\": [5, 3, false], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.975,"exit_code":1,"observations":[{"actual":[1,3,false],"check":"regression [\"15068218891\"]","expected":[1,8,false],"passed":false},{"actual":[2,8,false],"check":"regression [\"12026119886\"]","expected":[2,9,false],"passed":false},{"actual":"unassignable","check":"control [\"05077807892\"]","expected":"unassignable","passed":true},{"actual":"unassignable","check":"control [\"09117682532\"]","expected":"unassignable","passed":true},{"actual":"malformed","check":"control [\"1507650056\"]","expected":"malformed","passed":true},{"actual":"malformed","check":"control [\"1507650056a\"]","expected":"malformed","passed":true},{"actual":[0,0,true],"check":"control [\"00000000000\"]","expected":[0,0,true],"passed":true},{"actual":[5,0,false],"check":"control [\"08042619712\"]","expected":[5,3,false],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"15068218891\\\"]\", \"actual\": [1, 3, false], \"expected\": [1, 8, false], \"passed\": false}, {\"check\": \"regression [\\\"12026119886\\\"]\", \"actual\": [2, 8, false], \"expected\": [2, 9, false], \"passed\": false}, {\"check\": \"control [\\\"05077807892\\\"]\", \"actual\": \"unassignable\", \"expected\": \"unassignable\", \"passed\": true}, {\"check\": \"control [\\\"09117682532\\\"]\", \"actual\": \"unassignable\", \"expected\": \"unassignable\", \"passed\": true}, {\"check\": \"control [\\\"1507650056\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"1507650056a\\\"]\", \"actual\": \"malformed\", \"expected\": \"malformed\", \"passed\": true}, {\"check\": \"control [\\\"00000000000\\\"]\", \"actual\": [0, 0, true], \"expected\": [0, 0, true], \"passed\": true}, {\"check\": \"control [\\\"08042619712\\\"]\", \"actual\": [5, 0, false], \"expected\": [5, 3, false], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}