{"abstract":"Codes correct fewer errors than requested.","category":"Error-correcting codes","checks":8,"contract":"Design a binary narrow-sense BCH code of length n = 2^m - 1 correcting t errors: its generator has as roots the union of the 2-cyclotomic cosets mod n of 1..2t. Return [distinct cosets in order of first representative, each sorted, number of parity bits n - k = size of the union]. Invalid n or t < 1 returns None.","contract_signature":"n, t","evaluation_group":"w2-error_correcting_codes-bch-cyclotomic-cosets","failed_approach":"Stopping the loop at 2t - 2 drops the coset of the largest odd representative 2t - 1.","family":"w2-error_correcting_codes-bch-cyclotomic-cosets-designed-distance","id":"FA-72321","implementations":{"attempt":{"sha256":"b3965f0f046741d483ca6e3c9070795be9f9daac56cfed049b071540187a4fba","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(n, t):\n    if n < 3 or n & (n + 1) or t < 1:\n        return None\n    seen, cosets = set(), []\n    for s in range(1, 2 * t - 1):\n        if s % n in seen:\n            continue\n        c, x = [], s % n\n        while x not in c:\n            c.append(x)\n            x = x * 2 % n\n        seen.update(c)\n        cosets.append(sorted(c))\n    return [cosets, len(seen)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [7, 2]', [7, 2], [[[1, 2, 4], [3, 5, 6]], 6]], ['regression [15, 2]', [15, 2], [[[1, 2, 4, 8], [3, 6, 9, 12]], 8]], ['partial-repair [7, 1]', [7, 1], [[[1, 2, 4]], 3]], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [12, 2]', [12, 2], None], ['control [15, 0]', [15, 0], None], ['control [15, 3]', [15, 3], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10]], 10]], ['control [15, 4]', [15, 4], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]]], [['regression [15, 4]', [15, 4], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['regression [31, 2]', [31, 2], [[[1, 2, 4, 8, 16], [3, 6, 12, 17, 24]], 10]], ['partial-repair [15, 2]', [15, 2], [[[1, 2, 4, 8], [3, 6, 9, 12]], 8]], ['partial-repair [15, 3]', [15, 3], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10]], 10]], ['control [15, 0]', [15, 0], None], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [12, 2]', [12, 2], None], ['control [31, 3]', [31, 3], [[[1, 2, 4, 8, 16], [3, 6, 12, 17, 24], [5, 9, 10, 18, 20]], 15]]], [['regression [63, 2]', [63, 2], [[[1, 2, 4, 8, 16, 32], [3, 6, 12, 24, 33, 48]], 12]], ['regression [63, 3]', [63, 3], [[[1, 2, 4, 8, 16, 32], [3, 6, 12, 24, 33, 48], [5, 10, 17, 20, 34, 40]], 18]], ['partial-repair [31, 1]', [31, 1], [[[1, 2, 4, 8, 16]], 5]], ['partial-repair [31, 2]', [31, 2], [[[1, 2, 4, 8, 16], [3, 6, 12, 17, 24]], 10]], ['control [12, 2]', [12, 2], None], ['control [15, 0]', [15, 0], None], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [3, 1]', [3, 1], [[[1, 2]], 2]]], [['regression [31, 5]', [31, 5], [[[1, 2, 4, 8, 16], [3, 6, 12, 17, 24], [5, 9, 10, 18, 20], [7, 14, 19, 25, 28]], 20]], ['regression [127, 2]', [127, 2], [[[1, 2, 4, 8, 16, 32, 64], [3, 6, 12, 24, 48, 65, 96]], 14]], ['partial-repair [63, 2]', [63, 2], [[[1, 2, 4, 8, 16, 32], [3, 6, 12, 24, 33, 48]], 12]], ['partial-repair [63, 3]', [63, 3], [[[1, 2, 4, 8, 16, 32], [3, 6, 12, 24, 33, 48], [5, 10, 17, 20, 34, 40]], 18]], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [12, 2]', [12, 2], None], ['control [15, 0]', [15, 0], None], ['control [7, 1]', [7, 1], [[[1, 2, 4]], 3]]], [['regression [15, 2]', [15, 2], [[[1, 2, 4, 8], [3, 6, 9, 12]], 8]], ['regression [15, 3]', [15, 3], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10]], 10]], ['partial-repair [3, 1]', [3, 1], [[[1, 2]], 2]], ['partial-repair [127, 2]', [127, 2], [[[1, 2, 4, 8, 16, 32, 64], [3, 6, 12, 24, 48, 65, 96]], 14]], ['control [15, 0]', [15, 0], None], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [12, 2]', [12, 2], None], ['control [15, 4]', [15, 4], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]]]]\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":"a29ecb7f475eb9094bd7b09f413a05e0813290088d778a17da1b845abd6462df","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(n, t):\n    if n < 3 or n & (n + 1) or t < 1:\n        return None\n    seen, cosets = set(), []\n    for s in range(1, t + 1):\n        if s % n in seen:\n            continue\n        c, x = [], s % n\n        while x not in c:\n            c.append(x)\n            x = x * 2 % n\n        seen.update(c)\n        cosets.append(sorted(c))\n    return [cosets, len(seen)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [7, 2]', [7, 2], [[[1, 2, 4], [3, 5, 6]], 6]], ['regression [15, 2]', [15, 2], [[[1, 2, 4, 8], [3, 6, 9, 12]], 8]], ['partial-repair [7, 1]', [7, 1], [[[1, 2, 4]], 3]], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [12, 2]', [12, 2], None], ['control [15, 0]', [15, 0], None], ['control [15, 3]', [15, 3], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10]], 10]], ['control [15, 4]', [15, 4], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]]], [['regression [15, 4]', [15, 4], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['regression [31, 2]', [31, 2], [[[1, 2, 4, 8, 16], [3, 6, 12, 17, 24]], 10]], ['partial-repair [15, 2]', [15, 2], [[[1, 2, 4, 8], [3, 6, 9, 12]], 8]], ['partial-repair [15, 3]', [15, 3], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10]], 10]], ['control [15, 0]', [15, 0], None], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [12, 2]', [12, 2], None], ['control [31, 3]', [31, 3], [[[1, 2, 4, 8, 16], [3, 6, 12, 17, 24], [5, 9, 10, 18, 20]], 15]]], [['regression [63, 2]', [63, 2], [[[1, 2, 4, 8, 16, 32], [3, 6, 12, 24, 33, 48]], 12]], ['regression [63, 3]', [63, 3], [[[1, 2, 4, 8, 16, 32], [3, 6, 12, 24, 33, 48], [5, 10, 17, 20, 34, 40]], 18]], ['partial-repair [31, 1]', [31, 1], [[[1, 2, 4, 8, 16]], 5]], ['partial-repair [31, 2]', [31, 2], [[[1, 2, 4, 8, 16], [3, 6, 12, 17, 24]], 10]], ['control [12, 2]', [12, 2], None], ['control [15, 0]', [15, 0], None], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [3, 1]', [3, 1], [[[1, 2]], 2]]], [['regression [31, 5]', [31, 5], [[[1, 2, 4, 8, 16], [3, 6, 12, 17, 24], [5, 9, 10, 18, 20], [7, 14, 19, 25, 28]], 20]], ['regression [127, 2]', [127, 2], [[[1, 2, 4, 8, 16, 32, 64], [3, 6, 12, 24, 48, 65, 96]], 14]], ['partial-repair [63, 2]', [63, 2], [[[1, 2, 4, 8, 16, 32], [3, 6, 12, 24, 33, 48]], 12]], ['partial-repair [63, 3]', [63, 3], [[[1, 2, 4, 8, 16, 32], [3, 6, 12, 24, 33, 48], [5, 10, 17, 20, 34, 40]], 18]], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [12, 2]', [12, 2], None], ['control [15, 0]', [15, 0], None], ['control [7, 1]', [7, 1], [[[1, 2, 4]], 3]]], [['regression [15, 2]', [15, 2], [[[1, 2, 4, 8], [3, 6, 9, 12]], 8]], ['regression [15, 3]', [15, 3], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10]], 10]], ['partial-repair [3, 1]', [3, 1], [[[1, 2]], 2]], ['partial-repair [127, 2]', [127, 2], [[[1, 2, 4, 8, 16, 32, 64], [3, 6, 12, 24, 48, 65, 96]], 14]], ['control [15, 0]', [15, 0], None], ['control [15, 7]', [15, 7], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]], ['control [12, 2]', [12, 2], None], ['control [15, 4]', [15, 4], [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14]]]]\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 code under the stated contract; not a production codec. 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-error_correcting_codes-bch-cyclotomic-cosets-designed-distance","generated_at":"2026-09-29T14:48:37.473025+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"BCH codes in flash memory and satellite links are specified by their cyclotomic cosets.","root_cause":"Roots are gathered for 1..t instead of 1..2t (designed distance 2t + 1).","sha256":"0f70ec10ca3734e77684548d78004af7882deb83dc157c7bc830c70a22e8a8c8","title":"BCH cosets cover only 1..t · 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.998,"exit_code":1,"observations":[{"actual":[[[1,2,4]],3],"check":"regression [7, 2]","expected":[[[1,2,4],[3,5,6]],6],"passed":false},{"actual":[[[1,2,4,8]],4],"check":"regression [15, 2]","expected":[[[1,2,4,8],[3,6,9,12]],8],"passed":false},{"actual":[[],0],"check":"partial-repair [7, 1]","expected":[[[1,2,4]],3],"passed":false},{"actual":[[[1,2,4,8],[3,6,9,12],[5,10],[7,11,13,14]],14],"check":"control [15, 7]","expected":[[[1,2,4,8],[3,6,9,12],[5,10],[7,11,13,14]],14],"passed":true},{"actual":null,"check":"control [12, 2]","expected":null,"passed":true},{"actual":null,"check":"control [15, 0]","expected":null,"passed":true},{"actual":[[[1,2,4,8],[3,6,9,12]],8],"check":"control [15, 3]","expected":[[[1,2,4,8],[3,6,9,12],[5,10]],10],"passed":false},{"actual":[[[1,2,4,8],[3,6,9,12],[5,10]],10],"check":"control [15, 4]","expected":[[[1,2,4,8],[3,6,9,12],[5,10],[7,11,13,14]],14],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [7, 2]\", \"actual\": [[[1, 2, 4]], 3], \"expected\": [[[1, 2, 4], [3, 5, 6]], 6], \"passed\": false}, {\"check\": \"regression [15, 2]\", \"actual\": [[[1, 2, 4, 8]], 4], \"expected\": [[[1, 2, 4, 8], [3, 6, 9, 12]], 8], \"passed\": false}, {\"check\": \"partial-repair [7, 1]\", \"actual\": [[], 0], \"expected\": [[[1, 2, 4]], 3], \"passed\": false}, {\"check\": \"control [15, 7]\", \"actual\": [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14], \"expected\": [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14], \"passed\": true}, {\"check\": \"control [12, 2]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [15, 0]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [15, 3]\", \"actual\": [[[1, 2, 4, 8], [3, 6, 9, 12]], 8], \"expected\": [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10]], 10], \"passed\": false}, {\"check\": \"control [15, 4]\", \"actual\": [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10]], 10], \"expected\": [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.27,"exit_code":1,"observations":[{"actual":[[[1,2,4]],3],"check":"regression [7, 2]","expected":[[[1,2,4],[3,5,6]],6],"passed":false},{"actual":[[[1,2,4,8]],4],"check":"regression [15, 2]","expected":[[[1,2,4,8],[3,6,9,12]],8],"passed":false},{"actual":[[[1,2,4]],3],"check":"partial-repair [7, 1]","expected":[[[1,2,4]],3],"passed":true},{"actual":[[[1,2,4,8],[3,6,9,12],[5,10],[7,11,13,14]],14],"check":"control [15, 7]","expected":[[[1,2,4,8],[3,6,9,12],[5,10],[7,11,13,14]],14],"passed":true},{"actual":null,"check":"control [12, 2]","expected":null,"passed":true},{"actual":null,"check":"control [15, 0]","expected":null,"passed":true},{"actual":[[[1,2,4,8],[3,6,9,12]],8],"check":"control [15, 3]","expected":[[[1,2,4,8],[3,6,9,12],[5,10]],10],"passed":false},{"actual":[[[1,2,4,8],[3,6,9,12]],8],"check":"control [15, 4]","expected":[[[1,2,4,8],[3,6,9,12],[5,10],[7,11,13,14]],14],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [7, 2]\", \"actual\": [[[1, 2, 4]], 3], \"expected\": [[[1, 2, 4], [3, 5, 6]], 6], \"passed\": false}, {\"check\": \"regression [15, 2]\", \"actual\": [[[1, 2, 4, 8]], 4], \"expected\": [[[1, 2, 4, 8], [3, 6, 9, 12]], 8], \"passed\": false}, {\"check\": \"partial-repair [7, 1]\", \"actual\": [[[1, 2, 4]], 3], \"expected\": [[[1, 2, 4]], 3], \"passed\": true}, {\"check\": \"control [15, 7]\", \"actual\": [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14], \"expected\": [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14], \"passed\": true}, {\"check\": \"control [12, 2]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [15, 0]\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"control [15, 3]\", \"actual\": [[[1, 2, 4, 8], [3, 6, 9, 12]], 8], \"expected\": [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10]], 10], \"passed\": false}, {\"check\": \"control [15, 4]\", \"actual\": [[[1, 2, 4, 8], [3, 6, 9, 12]], 8], \"expected\": [[[1, 2, 4, 8], [3, 6, 9, 12], [5, 10], [7, 11, 13, 14]], 14], \"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."}}