{"abstract":"The exact josephus elimination order result violates the stated contract at counted removal position.","category":"Numerics","checks":8,"contract":"Input [n,k,start], n>0 k>0 0<=start<n; return removal order counting current position as one.","evaluation_group":"s3-numerics-josephus-elimination-order","failed_approach":"The partial repair (k-1)%len(ring) still violates the counted removal position invariant.","family":"s3-numerics-josephus-elimination-order-counted-removal-position","id":"FA-15306","implementations":{"attempt":{"sha256":"530dd0986788f857637662259dffac111645d5e03601d993622c81ea05fd234d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    n,k,start=x\n    ring=list(range(n));index=start;out=[]\n    for _ in range(n):\n     if not ring:break\n     index=(k-1)%len(ring)\n     out.append(ring.pop(index))\n     index=index\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 1, 0], [0, 1]), ([2, 1, 1], [1, 0]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([1, 2, 0], [0]), ([1, 3, 0], [0]), ([1, 4, 0], [0]), ([1, 5, 0], [0])], [([2, 1, 1], [1, 0]), ([2, 4, 1], [0, 1]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([2, 5, 1], [1, 0]), ([2, 6, 0], [1, 0]), ([2, 6, 1], [0, 1]), ([2, 7, 0], [0, 1])], [([2, 2, 0], [1, 0]), ([2, 7, 1], [1, 0]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([3, 4, 1], [1, 0, 2]), ([3, 4, 2], [2, 1, 0]), ([3, 5, 0], [1, 2, 0]), ([3, 5, 1], [2, 0, 1])], [([2, 2, 1], [0, 1]), ([3, 1, 2], [2, 0, 1]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([4, 1, 3], [3, 0, 1, 2]), ([4, 2, 0], [1, 3, 2, 0]), ([4, 2, 1], [2, 0, 3, 1]), ([4, 2, 2], [3, 1, 0, 2])], [([2, 3, 0], [0, 1]), ([3, 2, 2], [0, 2, 1]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([4, 6, 0], [1, 0, 3, 2]), ([4, 6, 1], [2, 1, 0, 3]), ([4, 6, 2], [3, 2, 1, 0]), ([4, 6, 3], [0, 3, 2, 1])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, 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":"a5b4d9de9948d0ed7fcc49890c5e24208e73e920950491b5cb5776e44ce234fd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    n,k,start=x\n    ring=list(range(n));index=start;out=[]\n    for _ in range(n):\n     if not ring:break\n     index=(index+k)%len(ring)\n     out.append(ring.pop(index))\n     index=index\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 1, 0], [0, 1]), ([2, 1, 1], [1, 0]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([1, 2, 0], [0]), ([1, 3, 0], [0]), ([1, 4, 0], [0]), ([1, 5, 0], [0])], [([2, 1, 1], [1, 0]), ([2, 4, 1], [0, 1]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([2, 5, 1], [1, 0]), ([2, 6, 0], [1, 0]), ([2, 6, 1], [0, 1]), ([2, 7, 0], [0, 1])], [([2, 2, 0], [1, 0]), ([2, 7, 1], [1, 0]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([3, 4, 1], [1, 0, 2]), ([3, 4, 2], [2, 1, 0]), ([3, 5, 0], [1, 2, 0]), ([3, 5, 1], [2, 0, 1])], [([2, 2, 1], [0, 1]), ([3, 1, 2], [2, 0, 1]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([4, 1, 3], [3, 0, 1, 2]), ([4, 2, 0], [1, 3, 2, 0]), ([4, 2, 1], [2, 0, 3, 1]), ([4, 2, 2], [3, 1, 0, 2])], [([2, 3, 0], [0, 1]), ([3, 2, 2], [0, 2, 1]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([4, 6, 0], [1, 0, 3, 2]), ([4, 6, 1], [2, 1, 0, 3]), ([4, 6, 2], [3, 2, 1, 0]), ([4, 6, 3], [0, 3, 2, 1])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, 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"},"fixed":{"sha256":"bbedcb1c1bd24dcecee6e10f84e3b1f9ad78fbf62a21e684aafe11ab799d9079","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport itertools\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(x):\n    n,k,start=x\n    ring=list(range(n));index=start;out=[]\n    for _ in range(n):\n     if not ring:break\n     index=(index+k-1)%len(ring)\n     out.append(ring.pop(index))\n     index=index\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 1, 0], [0, 1]), ([2, 1, 1], [1, 0]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([1, 2, 0], [0]), ([1, 3, 0], [0]), ([1, 4, 0], [0]), ([1, 5, 0], [0])], [([2, 1, 1], [1, 0]), ([2, 4, 1], [0, 1]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([2, 5, 1], [1, 0]), ([2, 6, 0], [1, 0]), ([2, 6, 1], [0, 1]), ([2, 7, 0], [0, 1])], [([2, 2, 0], [1, 0]), ([2, 7, 1], [1, 0]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([3, 4, 1], [1, 0, 2]), ([3, 4, 2], [2, 1, 0]), ([3, 5, 0], [1, 2, 0]), ([3, 5, 1], [2, 0, 1])], [([2, 2, 1], [0, 1]), ([3, 1, 2], [2, 0, 1]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([4, 1, 3], [3, 0, 1, 2]), ([4, 2, 0], [1, 3, 2, 0]), ([4, 2, 1], [2, 0, 3, 1]), ([4, 2, 2], [3, 1, 0, 2])], [([2, 3, 0], [0, 1]), ([3, 2, 2], [0, 2, 1]), ([1, 1, 0], [0]), ([11, 8, 10], [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7]), ([4, 6, 0], [1, 0, 3, 2]), ([4, 6, 1], [2, 1, 0, 3]), ([4, 6, 2], [3, 2, 1, 0]), ([4, 6, 3], [0, 3, 2, 1])]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"explicit oracle %d\" % i, 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. Inputs are restricted to the explicit contract; this is not a production algebra library. 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":"s3-numerics-josephus-elimination-order-counted-removal-position","generated_at":"2026-09-29T14:39:25.331634+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Exact discrete arithmetic with observable algorithmic state; no floating point approximation is used.","repair":"Use (index+k-1)%len(ring) at the counted removal position step.","root_cause":"The counted removal position step uses (index+k)%len(ring) instead of (index+k-1)%len(ring).","sha256":"98e5a28efe790164afd2497870f4b1ea0a38a5775c2083ea9c51c8938b2a7734","title":"Josephus elimination order: counted removal position · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.828,"exit_code":1,"observations":[{"actual":[0,1],"check":"explicit oracle 0","expected":[0,1],"passed":true},{"actual":[0,1],"check":"explicit oracle 1","expected":[1,0],"passed":false},{"actual":[0],"check":"explicit oracle 2","expected":[0],"passed":true},{"actual":[7,8,9,10,0,2,4,6,3,5,1],"check":"explicit oracle 3","expected":[6,3,1,0,2,5,9,8,4,10,7],"passed":false},{"actual":[0],"check":"explicit oracle 4","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 5","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 6","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 7","expected":[0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [0, 1], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [7, 8, 9, 10, 0, 2, 4, 6, 3, 5, 1], \"expected\": [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0], \"expected\": [0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.46,"exit_code":1,"observations":[{"actual":[1,0],"check":"explicit oracle 0","expected":[0,1],"passed":false},{"actual":[0,1],"check":"explicit oracle 1","expected":[1,0],"passed":false},{"actual":[0],"check":"explicit oracle 2","expected":[0],"passed":true},{"actual":[7,5,4,6,9,1,10,0,8,2,3],"check":"explicit oracle 3","expected":[6,3,1,0,2,5,9,8,4,10,7],"passed":false},{"actual":[0],"check":"explicit oracle 4","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 5","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 6","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 7","expected":[0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [1, 0], \"expected\": [0, 1], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [0, 1], \"expected\": [1, 0], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [7, 5, 4, 6, 9, 1, 10, 0, 8, 2, 3], \"expected\": [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0], \"expected\": [0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.277,"exit_code":0,"observations":[{"actual":[0,1],"check":"explicit oracle 0","expected":[0,1],"passed":true},{"actual":[1,0],"check":"explicit oracle 1","expected":[1,0],"passed":true},{"actual":[0],"check":"explicit oracle 2","expected":[0],"passed":true},{"actual":[6,3,1,0,2,5,9,8,4,10,7],"check":"explicit oracle 3","expected":[6,3,1,0,2,5,9,8,4,10,7],"passed":true},{"actual":[0],"check":"explicit oracle 4","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 5","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 6","expected":[0],"passed":true},{"actual":[0],"check":"explicit oracle 7","expected":[0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [1, 0], \"expected\": [1, 0], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7], \"expected\": [6, 3, 1, 0, 2, 5, 9, 8, 4, 10, 7], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0], \"expected\": [0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}