{"abstract":"The exact multiset permutation unrank result violates the stated contract at trial symbol restoration.","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 counts[symbol]+2 still violates the trial symbol restoration invariant.","family":"s3-numerics-multiset-permutation-unrank-trial-symbol-restoration","id":"FA-15236","implementations":{"attempt":{"sha256":"16379875d458b4ba9078b62ee61653e94bc677b9deeb8b1346ce53258582091c","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]+2\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, 1, 1, 2], 3], [1, 0, 1, 2]), ([[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, 0, 1], 2], [1, 0, 0]), ([[0, 1, 1, 2], 6], [1, 1, 2, 0]), ([[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], 9], [2, 0, 1, 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, 0, 1, 1], 1], [0, 1, 0, 1]), ([[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":"a2724b5545ffe40096d894873e4399afadd5c56e972420d5800a2ad9355c1a7f","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]\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, 1, 1, 2], 3], [1, 0, 1, 2]), ([[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, 0, 1], 2], [1, 0, 0]), ([[0, 1, 1, 2], 6], [1, 1, 2, 0]), ([[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], 9], [2, 0, 1, 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, 0, 1, 1], 1], [0, 1, 0, 1]), ([[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":"02999de63aaa09369b5d0acd3ae6aa821a9166e56698940560ebb0003908311e","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, 1, 1, 2], 3], [1, 0, 1, 2]), ([[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, 0, 1], 2], [1, 0, 0]), ([[0, 1, 1, 2], 6], [1, 1, 2, 0]), ([[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], 9], [2, 0, 1, 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, 0, 1, 1], 1], [0, 1, 0, 1]), ([[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-trial-symbol-restoration","generated_at":"2026-09-29T14:39:24.655419+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 counts[symbol]+1 at the trial symbol restoration step.","root_cause":"The trial symbol restoration step uses counts[symbol] instead of counts[symbol]+1.","sha256":"82d3680c8b9f46edd52c7d29b8e341e02ed3553ff20cdae068f58f53fab8859c","title":"Multiset permutation unrank: trial symbol restoration · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.077,"exit_code":1,"observations":[{"actual":[0,1,0],"check":"explicit oracle 0","expected":[0,1,0],"passed":true},{"actual":[1,0,0,1],"check":"explicit oracle 1","expected":[1,0,1,2],"passed":false},{"actual":[0,0,1],"check":"explicit oracle 2","expected":[0,0,1],"passed":true},{"actual":[2,3,1,1,1],"check":"explicit oracle 3","expected":[3,2,2,1,1],"passed":false},{"actual":[1,0,0],"check":"explicit oracle 4","expected":[1,0,0],"passed":true},{"actual":[0,1,1,2],"check":"explicit oracle 5","expected":[0,1,1,2],"passed":true},{"actual":[0,1,2,1],"check":"explicit oracle 6","expected":[0,1,2,1],"passed":true},{"actual":[0,2,1,1],"check":"explicit oracle 7","expected":[0,2,1,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [0, 1, 0], \"expected\": [0, 1, 0], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [1, 0, 0, 1], \"expected\": [1, 0, 1, 2], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 0, 1], \"expected\": [0, 0, 1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [2, 3, 1, 1, 1], \"expected\": [3, 2, 2, 1, 1], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": [1, 0, 0], \"expected\": [1, 0, 0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1, 1, 2], \"expected\": [0, 1, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 1, 2, 1], \"expected\": [0, 1, 2, 1], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 2, 1, 1], \"expected\": [0, 2, 1, 1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.305,"exit_code":1,"observations":[{"actual":null,"check":"explicit oracle 0","expected":[0,1,0],"passed":false},{"actual":null,"check":"explicit oracle 1","expected":[1,0,1,2],"passed":false},{"actual":[0,0,1],"check":"explicit oracle 2","expected":[0,0,1],"passed":true},{"actual":null,"check":"explicit oracle 3","expected":[3,2,2,1,1],"passed":false},{"actual":null,"check":"explicit oracle 4","expected":[1,0,0],"passed":false},{"actual":[0,1,1,2],"check":"explicit oracle 5","expected":[0,1,1,2],"passed":true},{"actual":null,"check":"explicit oracle 6","expected":[0,1,2,1],"passed":false},{"actual":null,"check":"explicit oracle 7","expected":[0,2,1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": null, \"expected\": [0, 1, 0], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": null, \"expected\": [1, 0, 1, 2], \"passed\": false}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 0, 1], \"expected\": [0, 0, 1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": null, \"expected\": [3, 2, 2, 1, 1], \"passed\": false}, {\"check\": \"explicit oracle 4\", \"actual\": null, \"expected\": [1, 0, 0], \"passed\": false}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1, 1, 2], \"expected\": [0, 1, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": null, \"expected\": [0, 1, 2, 1], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": null, \"expected\": [0, 2, 1, 1], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.488,"exit_code":0,"observations":[{"actual":[0,1,0],"check":"explicit oracle 0","expected":[0,1,0],"passed":true},{"actual":[1,0,1,2],"check":"explicit oracle 1","expected":[1,0,1,2],"passed":true},{"actual":[0,0,1],"check":"explicit oracle 2","expected":[0,0,1],"passed":true},{"actual":[3,2,2,1,1],"check":"explicit oracle 3","expected":[3,2,2,1,1],"passed":true},{"actual":[1,0,0],"check":"explicit oracle 4","expected":[1,0,0],"passed":true},{"actual":[0,1,1,2],"check":"explicit oracle 5","expected":[0,1,1,2],"passed":true},{"actual":[0,1,2,1],"check":"explicit oracle 6","expected":[0,1,2,1],"passed":true},{"actual":[0,2,1,1],"check":"explicit oracle 7","expected":[0,2,1,1],"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\": [1, 0, 1, 2], \"expected\": [1, 0, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [0, 0, 1], \"expected\": [0, 0, 1], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [3, 2, 2, 1, 1], \"expected\": [3, 2, 2, 1, 1], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [1, 0, 0], \"expected\": [1, 0, 0], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [0, 1, 1, 2], \"expected\": [0, 1, 1, 2], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [0, 1, 2, 1], \"expected\": [0, 1, 2, 1], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [0, 2, 1, 1], \"expected\": [0, 2, 1, 1], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}