{"abstract":"The exact egyptian greedy fraction result violates the stated contract at residual denominator.","category":"Numerics","checks":8,"contract":"Input [p,q], 0<p<q<=100; return greedy unit fraction denominators whose sum is p/q. Bounds: q<=31.","evaluation_group":"s3-numerics-egyptian-greedy-fraction","failed_approach":"The partial repair d still violates the residual denominator invariant.","family":"s3-numerics-egyptian-greedy-fraction-residual-denominator","id":"FA-14976","implementations":{"attempt":{"sha256":"9d76515c64b8600d9f274c8a2b9190e46927f6df9e85ea6c3dd5316d0bfa4286","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    p,q=x;out=[]\n    for _ in range(20):\n     if p==0:break\n     if abs(q).bit_length()>512:return None\n     d=(q+p-1)//p\n     if d<=0:return None\n     out.append(d)\n     p,q=p*d-q,d\n     g=math.gcd(p,q)\n     if not g:return None\n     p,q=p//g,q//g\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 3], [2, 6]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([1, 3], [3]), ([1, 4], [4]), ([2, 4], [2]), ([3, 4], [2, 4]), ([1, 5], [5])], [([3, 4], [2, 4]), ([3, 5], [2, 10]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([3, 7], [3, 11, 231]), ([4, 7], [2, 14]), ([5, 7], [2, 5, 70]), ([6, 7], [2, 3, 42])], [([2, 5], [3, 15]), ([5, 6], [2, 3]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([7, 9], [2, 4, 36]), ([8, 9], [2, 3, 18]), ([1, 10], [10]), ([2, 10], [5])], [([3, 5], [2, 10]), ([4, 7], [2, 14]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([7, 11], [2, 8, 88]), ([8, 11], [2, 5, 37, 4070]), ([9, 11], [2, 4, 15, 660]), ([10, 11], [2, 3, 14, 231])], [([4, 5], [2, 4, 20]), ([3, 8], [3, 24]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([3, 13], [5, 33, 2145]), ([4, 13], [4, 18, 468]), ([5, 13], [3, 20, 780]), ([6, 13], [3, 8, 312])]]\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":"25c356f303a1544dd507e0695200c8dd7082a17be2c37017aa4c68cb39c75966","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    p,q=x;out=[]\n    for _ in range(20):\n     if p==0:break\n     if abs(q).bit_length()>512:return None\n     d=(q+p-1)//p\n     if d<=0:return None\n     out.append(d)\n     p,q=p*d-q,q+d\n     g=math.gcd(p,q)\n     if not g:return None\n     p,q=p//g,q//g\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 3], [2, 6]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([1, 3], [3]), ([1, 4], [4]), ([2, 4], [2]), ([3, 4], [2, 4]), ([1, 5], [5])], [([3, 4], [2, 4]), ([3, 5], [2, 10]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([3, 7], [3, 11, 231]), ([4, 7], [2, 14]), ([5, 7], [2, 5, 70]), ([6, 7], [2, 3, 42])], [([2, 5], [3, 15]), ([5, 6], [2, 3]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([7, 9], [2, 4, 36]), ([8, 9], [2, 3, 18]), ([1, 10], [10]), ([2, 10], [5])], [([3, 5], [2, 10]), ([4, 7], [2, 14]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([7, 11], [2, 8, 88]), ([8, 11], [2, 5, 37, 4070]), ([9, 11], [2, 4, 15, 660]), ([10, 11], [2, 3, 14, 231])], [([4, 5], [2, 4, 20]), ([3, 8], [3, 24]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([3, 13], [5, 33, 2145]), ([4, 13], [4, 18, 468]), ([5, 13], [3, 20, 780]), ([6, 13], [3, 8, 312])]]\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":"7189eeed0f08f175bd02b5f82bdb8109380a7ff1443c42b5e6ae84b55ad25f46","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    p,q=x;out=[]\n    for _ in range(20):\n     if p==0:break\n     if abs(q).bit_length()>512:return None\n     d=(q+p-1)//p\n     if d<=0:return None\n     out.append(d)\n     p,q=p*d-q,q*d\n     g=math.gcd(p,q)\n     if not g:return None\n     p,q=p//g,q//g\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[([2, 3], [2, 6]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([1, 3], [3]), ([1, 4], [4]), ([2, 4], [2]), ([3, 4], [2, 4]), ([1, 5], [5])], [([3, 4], [2, 4]), ([3, 5], [2, 10]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([3, 7], [3, 11, 231]), ([4, 7], [2, 14]), ([5, 7], [2, 5, 70]), ([6, 7], [2, 3, 42])], [([2, 5], [3, 15]), ([5, 6], [2, 3]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([7, 9], [2, 4, 36]), ([8, 9], [2, 3, 18]), ([1, 10], [10]), ([2, 10], [5])], [([3, 5], [2, 10]), ([4, 7], [2, 14]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([7, 11], [2, 8, 88]), ([8, 11], [2, 5, 37, 4070]), ([9, 11], [2, 4, 15, 660]), ([10, 11], [2, 3, 14, 231])], [([4, 5], [2, 4, 20]), ([3, 8], [3, 24]), ([1, 2], [2]), ([30, 31], [2, 3, 8, 107, 15922, 633759288]), ([3, 13], [5, 33, 2145]), ([4, 13], [4, 18, 468]), ([5, 13], [3, 20, 780]), ([6, 13], [3, 8, 312])]]\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-egyptian-greedy-fraction-residual-denominator","generated_at":"2026-09-29T14:39:22.057141+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 q*d at the residual denominator step.","root_cause":"The residual denominator step uses q+d instead of q*d.","sha256":"76aaf4836e904d32ceef982c24999733da736bbe4e89d122b1106ad93be2414f","title":"Egyptian greedy fraction: residual denominator · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.526,"exit_code":1,"observations":[{"actual":[2,2],"check":"explicit oracle 0","expected":[2,6],"passed":false},{"actual":[2],"check":"explicit oracle 1","expected":[2],"passed":true},{"actual":[2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],"check":"explicit oracle 2","expected":[2,3,8,107,15922,633759288],"passed":false},{"actual":[3],"check":"explicit oracle 3","expected":[3],"passed":true},{"actual":[4],"check":"explicit oracle 4","expected":[4],"passed":true},{"actual":[2],"check":"explicit oracle 5","expected":[2],"passed":true},{"actual":[2,1],"check":"explicit oracle 6","expected":[2,4],"passed":false},{"actual":[5],"check":"explicit oracle 7","expected":[5],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [2, 2], \"expected\": [2, 6], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], \"expected\": [2, 3, 8, 107, 15922, 633759288], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [4], \"expected\": [4], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [2, 1], \"expected\": [2, 4], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [5], \"expected\": [5], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.299,"exit_code":1,"observations":[{"actual":[2,5],"check":"explicit oracle 0","expected":[2,6],"passed":false},{"actual":[2],"check":"explicit oracle 1","expected":[2],"passed":true},{"actual":[2,2,2,3],"check":"explicit oracle 2","expected":[2,3,8,107,15922,633759288],"passed":false},{"actual":[3],"check":"explicit oracle 3","expected":[3],"passed":true},{"actual":[4],"check":"explicit oracle 4","expected":[4],"passed":true},{"actual":[2],"check":"explicit oracle 5","expected":[2],"passed":true},{"actual":[2,3],"check":"explicit oracle 6","expected":[2,4],"passed":false},{"actual":[5],"check":"explicit oracle 7","expected":[5],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [2, 5], \"expected\": [2, 6], \"passed\": false}, {\"check\": \"explicit oracle 1\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [2, 2, 2, 3], \"expected\": [2, 3, 8, 107, 15922, 633759288], \"passed\": false}, {\"check\": \"explicit oracle 3\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [4], \"expected\": [4], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [2, 3], \"expected\": [2, 4], \"passed\": false}, {\"check\": \"explicit oracle 7\", \"actual\": [5], \"expected\": [5], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.505,"exit_code":0,"observations":[{"actual":[2,6],"check":"explicit oracle 0","expected":[2,6],"passed":true},{"actual":[2],"check":"explicit oracle 1","expected":[2],"passed":true},{"actual":[2,3,8,107,15922,633759288],"check":"explicit oracle 2","expected":[2,3,8,107,15922,633759288],"passed":true},{"actual":[3],"check":"explicit oracle 3","expected":[3],"passed":true},{"actual":[4],"check":"explicit oracle 4","expected":[4],"passed":true},{"actual":[2],"check":"explicit oracle 5","expected":[2],"passed":true},{"actual":[2,4],"check":"explicit oracle 6","expected":[2,4],"passed":true},{"actual":[5],"check":"explicit oracle 7","expected":[5],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"explicit oracle 0\", \"actual\": [2, 6], \"expected\": [2, 6], \"passed\": true}, {\"check\": \"explicit oracle 1\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 2\", \"actual\": [2, 3, 8, 107, 15922, 633759288], \"expected\": [2, 3, 8, 107, 15922, 633759288], \"passed\": true}, {\"check\": \"explicit oracle 3\", \"actual\": [3], \"expected\": [3], \"passed\": true}, {\"check\": \"explicit oracle 4\", \"actual\": [4], \"expected\": [4], \"passed\": true}, {\"check\": \"explicit oracle 5\", \"actual\": [2], \"expected\": [2], \"passed\": true}, {\"check\": \"explicit oracle 6\", \"actual\": [2, 4], \"expected\": [2, 4], \"passed\": true}, {\"check\": \"explicit oracle 7\", \"actual\": [5], \"expected\": [5], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}