{"abstract":"The exact multiset permutation unrank result violates the stated contract at rank block membership.","category":"Numerics","checks":8,"contract":"Input [sorted multiset of small integer symbols, rank], valid zero-based lexicographic rank among distinct permutations.","evaluation_group":"s3-numerics-multiset-permutation-unrank","failed_approach":"The partial repair r==0 still violates the rank block membership invariant.","family":"s3-numerics-multiset-permutation-unrank-rank-block-membership","id":"FA-15226","implementations":{"attempt":{"sha256":"09f1d444db8a7e7e1e43c5ce9eeb409d103fd51b3a315a0eaa7e3fdd69a2ecce","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    items,r=x\n    from collections import Counter\n    counts=Counter(items);out=[]\n    def ways(c):\n     v=math.factorial(sum(c.values()))\n     for n in c.values():v//=math.factorial(n)\n     return v\n    for _ in range(len(items)):\n     for symbol in sorted(counts):\n      if counts[symbol]==0:continue\n      counts[symbol]-=1\n      block=ways(counts)\n      if r==0:\n       out.append(symbol)\n       break\n      r=r-block\n      counts[symbol]=counts[symbol]+1\n     else:return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[0, 0, 1], 1], [0, 1, 0]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 0, 1], 2], [1, 0, 0]), ([[0, 1, 1, 2], 0], [0, 1, 1, 2]), ([[0, 1, 1, 2], 1], [0, 1, 2, 1]), ([[0, 1, 1, 2], 2], [0, 2, 1, 1]), ([[0, 1, 1, 2], 3], [1, 0, 1, 2])], [([[0, 0, 1], 2], [1, 0, 0]), ([[0, 1, 1, 2], 4], [1, 0, 2, 1]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 0, 1, 1], 2], [0, 1, 1, 0]), ([[0, 0, 1, 1], 3], [1, 0, 0, 1]), ([[0, 0, 1, 1], 4], [1, 0, 1, 0]), ([[0, 0, 1, 1], 5], [1, 1, 0, 0])], [([[0, 1, 1, 2], 1], [0, 1, 2, 1]), ([[0, 1, 1, 2], 7], [1, 2, 0, 1]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 0, 0, 1, 2], 13], [1, 0, 0, 2, 0]), ([[0, 0, 0, 1, 2], 14], [1, 0, 2, 0, 0]), ([[0, 0, 0, 1, 2], 15], [1, 2, 0, 0, 0]), ([[0, 0, 0, 1, 2], 16], [2, 0, 0, 0, 1])], [([[0, 1, 1, 2], 2], [0, 2, 1, 1]), ([[0, 1, 1, 2], 11], [2, 1, 1, 0]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 1, 2, 3], 10], [1, 3, 0, 2]), ([[0, 1, 2, 3], 11], [1, 3, 2, 0]), ([[0, 1, 2, 3], 12], [2, 0, 1, 3]), ([[0, 1, 2, 3], 13], [2, 0, 3, 1])], [([[0, 1, 1, 2], 3], [1, 0, 1, 2]), ([[0, 0, 1, 1], 4], [1, 0, 1, 0]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[1, 1, 2, 2, 3], 3], [1, 2, 1, 2, 3]), ([[1, 1, 2, 2, 3], 4], [1, 2, 1, 3, 2]), ([[1, 1, 2, 2, 3], 5], [1, 2, 2, 1, 3]), ([[1, 1, 2, 2, 3], 6], [1, 2, 2, 3, 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":"3d129da1f2d367d0c2361a665b31fd46c5f23198e5718bc6f4e3b31537f91b61","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    items,r=x\n    from collections import Counter\n    counts=Counter(items);out=[]\n    def ways(c):\n     v=math.factorial(sum(c.values()))\n     for n in c.values():v//=math.factorial(n)\n     return v\n    for _ in range(len(items)):\n     for symbol in sorted(counts):\n      if counts[symbol]==0:continue\n      counts[symbol]-=1\n      block=ways(counts)\n      if r<=block:\n       out.append(symbol)\n       break\n      r=r-block\n      counts[symbol]=counts[symbol]+1\n     else:return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[0, 0, 1], 1], [0, 1, 0]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 0, 1], 2], [1, 0, 0]), ([[0, 1, 1, 2], 0], [0, 1, 1, 2]), ([[0, 1, 1, 2], 1], [0, 1, 2, 1]), ([[0, 1, 1, 2], 2], [0, 2, 1, 1]), ([[0, 1, 1, 2], 3], [1, 0, 1, 2])], [([[0, 0, 1], 2], [1, 0, 0]), ([[0, 1, 1, 2], 4], [1, 0, 2, 1]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 0, 1, 1], 2], [0, 1, 1, 0]), ([[0, 0, 1, 1], 3], [1, 0, 0, 1]), ([[0, 0, 1, 1], 4], [1, 0, 1, 0]), ([[0, 0, 1, 1], 5], [1, 1, 0, 0])], [([[0, 1, 1, 2], 1], [0, 1, 2, 1]), ([[0, 1, 1, 2], 7], [1, 2, 0, 1]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 0, 0, 1, 2], 13], [1, 0, 0, 2, 0]), ([[0, 0, 0, 1, 2], 14], [1, 0, 2, 0, 0]), ([[0, 0, 0, 1, 2], 15], [1, 2, 0, 0, 0]), ([[0, 0, 0, 1, 2], 16], [2, 0, 0, 0, 1])], [([[0, 1, 1, 2], 2], [0, 2, 1, 1]), ([[0, 1, 1, 2], 11], [2, 1, 1, 0]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 1, 2, 3], 10], [1, 3, 0, 2]), ([[0, 1, 2, 3], 11], [1, 3, 2, 0]), ([[0, 1, 2, 3], 12], [2, 0, 1, 3]), ([[0, 1, 2, 3], 13], [2, 0, 3, 1])], [([[0, 1, 1, 2], 3], [1, 0, 1, 2]), ([[0, 0, 1, 1], 4], [1, 0, 1, 0]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[1, 1, 2, 2, 3], 3], [1, 2, 1, 2, 3]), ([[1, 1, 2, 2, 3], 4], [1, 2, 1, 3, 2]), ([[1, 1, 2, 2, 3], 5], [1, 2, 2, 1, 3]), ([[1, 1, 2, 2, 3], 6], [1, 2, 2, 3, 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":"47a3b39613ddfc2318c16b94ec08dff192e2fee5ed86c354bdfecff4696e4bf6","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    items,r=x\n    from collections import Counter\n    counts=Counter(items);out=[]\n    def ways(c):\n     v=math.factorial(sum(c.values()))\n     for n in c.values():v//=math.factorial(n)\n     return v\n    for _ in range(len(items)):\n     for symbol in sorted(counts):\n      if counts[symbol]==0:continue\n      counts[symbol]-=1\n      block=ways(counts)\n      if r<block:\n       out.append(symbol)\n       break\n      r=r-block\n      counts[symbol]=counts[symbol]+1\n     else:return None\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([[0, 0, 1], 1], [0, 1, 0]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 0, 1], 2], [1, 0, 0]), ([[0, 1, 1, 2], 0], [0, 1, 1, 2]), ([[0, 1, 1, 2], 1], [0, 1, 2, 1]), ([[0, 1, 1, 2], 2], [0, 2, 1, 1]), ([[0, 1, 1, 2], 3], [1, 0, 1, 2])], [([[0, 0, 1], 2], [1, 0, 0]), ([[0, 1, 1, 2], 4], [1, 0, 2, 1]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 0, 1, 1], 2], [0, 1, 1, 0]), ([[0, 0, 1, 1], 3], [1, 0, 0, 1]), ([[0, 0, 1, 1], 4], [1, 0, 1, 0]), ([[0, 0, 1, 1], 5], [1, 1, 0, 0])], [([[0, 1, 1, 2], 1], [0, 1, 2, 1]), ([[0, 1, 1, 2], 7], [1, 2, 0, 1]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 0, 0, 1, 2], 13], [1, 0, 0, 2, 0]), ([[0, 0, 0, 1, 2], 14], [1, 0, 2, 0, 0]), ([[0, 0, 0, 1, 2], 15], [1, 2, 0, 0, 0]), ([[0, 0, 0, 1, 2], 16], [2, 0, 0, 0, 1])], [([[0, 1, 1, 2], 2], [0, 2, 1, 1]), ([[0, 1, 1, 2], 11], [2, 1, 1, 0]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[0, 1, 2, 3], 10], [1, 3, 0, 2]), ([[0, 1, 2, 3], 11], [1, 3, 2, 0]), ([[0, 1, 2, 3], 12], [2, 0, 1, 3]), ([[0, 1, 2, 3], 13], [2, 0, 3, 1])], [([[0, 1, 1, 2], 3], [1, 0, 1, 2]), ([[0, 0, 1, 1], 4], [1, 0, 1, 0]), ([[0, 0, 1], 0], [0, 0, 1]), ([[1, 1, 2, 2, 3], 29], [3, 2, 2, 1, 1]), ([[1, 1, 2, 2, 3], 3], [1, 2, 1, 2, 3]), ([[1, 1, 2, 2, 3], 4], [1, 2, 1, 3, 2]), ([[1, 1, 2, 2, 3], 5], [1, 2, 2, 1, 3]), ([[1, 1, 2, 2, 3], 6], [1, 2, 2, 3, 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-multiset-permutation-unrank-rank-block-membership","generated_at":"2026-09-29T14:39:24.654920+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 r<block at the rank block membership step.","root_cause":"The rank block membership step uses r<=block instead of r<block.","sha256":"0b4922ef1831ddda4c5802ed1cef27d59f210179723ad140e03dac606a15db60","title":"Multiset permutation unrank: rank block membership · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.892,"exit_code":1,"observations":[{"actual":null,"check":"explicit oracle 0","expected":[0,1,0],"passed":false},{"actual":[0,0,1],"check":"explicit oracle 1","expected":[0,0,1],"passed":true},{"actual":null,"check":"explicit oracle 2","expected":[3,2,2,1,1],"passed":false},{"actual":[1,0,0],"check":"explicit oracle 3","expected":[1,0,0],"passed":true},{"actual":[0,1,1,2],"check":"explicit oracle 4","expected":[0,1,1,2],"passed":true},{"actual":null,"check":"explicit oracle 5","expected":[0,1,2,1],"passed":false},{"actual":null,"check":"explicit oracle 6","expected":[0,2,1,1],"passed":false},{"actual":[1,0,1,2],"check":"explicit oracle 7","expected":[1,0,1,2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": null, \"expected\": [0, 1, 0], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [0, 0, 1], \"expected\": [0, 0, 1], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": null, \"expected\": [3, 2, 2, 1, 1], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [1, 0, 0], \"expected\": [1, 0, 0], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 1, 1, 2], \"expected\": [0, 1, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": null, \"expected\": [0, 1, 2, 1], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": null, \"expected\": [0, 2, 1, 1], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [1, 0, 1, 2], \"expected\": [1, 0, 1, 2], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.678,"exit_code":1,"observations":[{"actual":[0,0,1],"check":"explicit oracle 0","expected":[0,1,0],"passed":false},{"actual":[0,0,1],"check":"explicit oracle 1","expected":[0,0,1],"passed":true},{"actual":[3,2,1,2,1],"check":"explicit oracle 2","expected":[3,2,2,1,1],"passed":false},{"actual":[0,1,0],"check":"explicit oracle 3","expected":[1,0,0],"passed":false},{"actual":[0,1,1,2],"check":"explicit oracle 4","expected":[0,1,1,2],"passed":true},{"actual":[0,1,1,2],"check":"explicit oracle 5","expected":[0,1,2,1],"passed":false},{"actual":[0,1,2,1],"check":"explicit oracle 6","expected":[0,2,1,1],"passed":false},{"actual":[0,2,1,1],"check":"explicit oracle 7","expected":[1,0,1,2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [0, 0, 1], \"expected\": [0, 1, 0], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [0, 0, 1], \"expected\": [0, 0, 1], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [3, 2, 1, 2, 1], \"expected\": [3, 2, 2, 1, 1], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [0, 1, 0], \"expected\": [1, 0, 0], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 1, 1, 2], \"expected\": [0, 1, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1, 1, 2], \"expected\": [0, 1, 2, 1], \"passed\": false}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 1, 2, 1], \"expected\": [0, 2, 1, 1], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 2, 1, 1], \"expected\": [1, 0, 1, 2], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.288,"exit_code":0,"observations":[{"actual":[0,1,0],"check":"explicit oracle 0","expected":[0,1,0],"passed":true},{"actual":[0,0,1],"check":"explicit oracle 1","expected":[0,0,1],"passed":true},{"actual":[3,2,2,1,1],"check":"explicit oracle 2","expected":[3,2,2,1,1],"passed":true},{"actual":[1,0,0],"check":"explicit oracle 3","expected":[1,0,0],"passed":true},{"actual":[0,1,1,2],"check":"explicit oracle 4","expected":[0,1,1,2],"passed":true},{"actual":[0,1,2,1],"check":"explicit oracle 5","expected":[0,1,2,1],"passed":true},{"actual":[0,2,1,1],"check":"explicit oracle 6","expected":[0,2,1,1],"passed":true},{"actual":[1,0,1,2],"check":"explicit oracle 7","expected":[1,0,1,2],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [0, 1, 0], \"expected\": [0, 1, 0], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [0, 0, 1], \"expected\": [0, 0, 1], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [3, 2, 2, 1, 1], \"expected\": [3, 2, 2, 1, 1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [1, 0, 0], \"expected\": [1, 0, 0], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [0, 1, 1, 2], \"expected\": [0, 1, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1, 2, 1], \"expected\": [0, 1, 2, 1], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 2, 1, 1], \"expected\": [0, 2, 1, 1], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [1, 0, 1, 2], \"expected\": [1, 0, 1, 2], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}