{"abstract":"Topologies with several disconnected islands report too few faces.","category":"GIS polygon topology","checks":8,"contract":"Input [nodes, arcs] for a planar, fully noded arc-node graph. arcs are [arc_id, from, to]; the same arc_id may be listed more than once (once per adjacent polygon) and counts once, while distinct ids between the same nodes are distinct parallel arcs. A loop arc (from == to) is an arc. Nodes listed in nodes but used by no arc are isolated nodes. Return [V, E, C, F] with V nodes, E distinct arcs, C connected components and F = E - V + C bounded faces.","contract_signature":"x","evaluation_group":"w2-gis-polygon-topology-arc-node-face-count","failed_approach":"Adding 2 counts the unbounded outer face as well.","family":"w2-gis-polygon-topology-arc-node-face-count-euler-relation","id":"FA-70736","implementations":{"attempt":{"sha256":"9af97e674ee6bd69e5fa4f73d53264ff0285bd409ac5fe2f104e2f2871b4db10","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    nodes, arcs = x\n    uniq = {}\n    for aid, u, v in arcs:\n        uniq[aid] = (u, v)\n    parent = {n: n for n in nodes}\n    for u, v in uniq.values():\n        parent.setdefault(u, u)\n        parent.setdefault(v, v)\n    def find(a):\n        while parent[a] != a:\n            a = parent[a]\n        return a\n    for u, v in uniq.values():\n        ru, rv = find(u), find(v)\n        if ru != rv:\n            parent[ru] = rv\n    V = len(parent)\n    E = len(uniq)\n    C = len({find(n) for n in parent})\n    return [V, E, C, E - V + 2]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1]]], [4, 4, 1, 1]), ('control #1', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [14, 1, 3]]], [4, 5, 1, 2]), ('regression #2', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [10, 1, 2], [12, 3, 4]]], [4, 4, 1, 1]), ('regression #3', [[1, 2], [[20, 1, 2], [21, 1, 2]]], [2, 2, 1, 1]), ('regression #4', [[1, 2], [[20, 1, 2], [21, 2, 1], [22, 1, 2]]], [2, 3, 1, 2]), ('regression #5', [[1, 2, 3, 9], [[10, 1, 2], [11, 2, 3], [12, 3, 1]]], [4, 3, 2, 1]), ('regression #6', [[1, 2, 3, 8, 9], [[10, 1, 2], [11, 2, 3], [12, 3, 1]]], [5, 3, 3, 1]), ('regression #7', [[5], [[30, 5, 5]]], [1, 1, 1, 1])], [('control #1', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [14, 1, 3]]], [4, 5, 1, 2]), ('regression #4', [[1, 2], [[20, 1, 2], [21, 2, 1], [22, 1, 2]]], [2, 3, 1, 2]), ('regression #5', [[1, 2, 3, 9], [[10, 1, 2], [11, 2, 3], [12, 3, 1]]], [4, 3, 2, 1]), ('regression #6', [[1, 2, 3, 8, 9], [[10, 1, 2], [11, 2, 3], [12, 3, 1]]], [5, 3, 3, 1]), ('regression #7', [[5], [[30, 5, 5]]], [1, 1, 1, 1]), ('regression #8', [[5, 6], [[30, 5, 5], [31, 5, 6], [32, 6, 6]]], [2, 3, 1, 2]), ('regression #9', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4]]], [6, 6, 2, 2]), ('regression #10', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4], [7, 3, 4]]], [6, 7, 1, 2])], [('regression #2', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [10, 1, 2], [12, 3, 4]]], [4, 4, 1, 1]), ('regression #7', [[5], [[30, 5, 5]]], [1, 1, 1, 1]), ('regression #8', [[5, 6], [[30, 5, 5], [31, 5, 6], [32, 6, 6]]], [2, 3, 1, 2]), ('regression #9', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4]]], [6, 6, 2, 2]), ('regression #10', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4], [7, 3, 4]]], [6, 7, 1, 2]), ('boundary #11', [[1], []], [1, 0, 1, 0]), ('boundary #12', [[], []], [0, 0, 0, 0]), ('control #13', [[1, 2, 3], [[1, 1, 2], [2, 2, 3]]], [3, 2, 1, 0])], [('control #0', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1]]], [4, 4, 1, 1]), ('regression #3', [[1, 2], [[20, 1, 2], [21, 1, 2]]], [2, 2, 1, 1]), ('regression #10', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4], [7, 3, 4]]], [6, 7, 1, 2]), ('boundary #11', [[1], []], [1, 0, 1, 0]), ('boundary #12', [[], []], [0, 0, 0, 0]), ('control #13', [[1, 2, 3], [[1, 1, 2], [2, 2, 3]]], [3, 2, 1, 0]), ('regression #14', [[1, 2, 3, 4], [[1, 1, 2], [2, 3, 4], [3, 2, 1], [4, 4, 3]]], [4, 4, 2, 2]), ('control #15', [[1, 2, 3, 4, 5], [[1, 1, 2], [2, 2, 3], [3, 3, 4], [4, 4, 5], [5, 5, 1], [6, 1, 3], [7, 3, 5]]], [5, 7, 1, 3])], [('control #0', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1]]], [4, 4, 1, 1]), ('control #1', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [14, 1, 3]]], [4, 5, 1, 2]), ('regression #2', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [10, 1, 2], [12, 3, 4]]], [4, 4, 1, 1]), ('regression #3', [[1, 2], [[20, 1, 2], [21, 1, 2]]], [2, 2, 1, 1]), ('regression #4', [[1, 2], [[20, 1, 2], [21, 2, 1], [22, 1, 2]]], [2, 3, 1, 2]), ('control #13', [[1, 2, 3], [[1, 1, 2], [2, 2, 3]]], [3, 2, 1, 0]), ('regression #14', [[1, 2, 3, 4], [[1, 1, 2], [2, 3, 4], [3, 2, 1], [4, 4, 3]]], [4, 4, 2, 2]), ('control #15', [[1, 2, 3, 4, 5], [[1, 1, 2], [2, 2, 3], [3, 3, 4], [4, 4, 5], [5, 5, 1], [6, 1, 3], [7, 3, 5]]], [5, 7, 1, 3])]]\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":"012ef3393536e321a1c74a7cf00492dce75b581c53a8a8163085ab138508c10b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    nodes, arcs = x\n    uniq = {}\n    for aid, u, v in arcs:\n        uniq[aid] = (u, v)\n    parent = {n: n for n in nodes}\n    for u, v in uniq.values():\n        parent.setdefault(u, u)\n        parent.setdefault(v, v)\n    def find(a):\n        while parent[a] != a:\n            a = parent[a]\n        return a\n    for u, v in uniq.values():\n        ru, rv = find(u), find(v)\n        if ru != rv:\n            parent[ru] = rv\n    V = len(parent)\n    E = len(uniq)\n    C = len({find(n) for n in parent})\n    return [V, E, C, E - V + 1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1]]], [4, 4, 1, 1]), ('control #1', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [14, 1, 3]]], [4, 5, 1, 2]), ('regression #2', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [10, 1, 2], [12, 3, 4]]], [4, 4, 1, 1]), ('regression #3', [[1, 2], [[20, 1, 2], [21, 1, 2]]], [2, 2, 1, 1]), ('regression #4', [[1, 2], [[20, 1, 2], [21, 2, 1], [22, 1, 2]]], [2, 3, 1, 2]), ('regression #5', [[1, 2, 3, 9], [[10, 1, 2], [11, 2, 3], [12, 3, 1]]], [4, 3, 2, 1]), ('regression #6', [[1, 2, 3, 8, 9], [[10, 1, 2], [11, 2, 3], [12, 3, 1]]], [5, 3, 3, 1]), ('regression #7', [[5], [[30, 5, 5]]], [1, 1, 1, 1])], [('control #1', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [14, 1, 3]]], [4, 5, 1, 2]), ('regression #4', [[1, 2], [[20, 1, 2], [21, 2, 1], [22, 1, 2]]], [2, 3, 1, 2]), ('regression #5', [[1, 2, 3, 9], [[10, 1, 2], [11, 2, 3], [12, 3, 1]]], [4, 3, 2, 1]), ('regression #6', [[1, 2, 3, 8, 9], [[10, 1, 2], [11, 2, 3], [12, 3, 1]]], [5, 3, 3, 1]), ('regression #7', [[5], [[30, 5, 5]]], [1, 1, 1, 1]), ('regression #8', [[5, 6], [[30, 5, 5], [31, 5, 6], [32, 6, 6]]], [2, 3, 1, 2]), ('regression #9', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4]]], [6, 6, 2, 2]), ('regression #10', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4], [7, 3, 4]]], [6, 7, 1, 2])], [('regression #2', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [10, 1, 2], [12, 3, 4]]], [4, 4, 1, 1]), ('regression #7', [[5], [[30, 5, 5]]], [1, 1, 1, 1]), ('regression #8', [[5, 6], [[30, 5, 5], [31, 5, 6], [32, 6, 6]]], [2, 3, 1, 2]), ('regression #9', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4]]], [6, 6, 2, 2]), ('regression #10', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4], [7, 3, 4]]], [6, 7, 1, 2]), ('boundary #11', [[1], []], [1, 0, 1, 0]), ('boundary #12', [[], []], [0, 0, 0, 0]), ('control #13', [[1, 2, 3], [[1, 1, 2], [2, 2, 3]]], [3, 2, 1, 0])], [('control #0', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1]]], [4, 4, 1, 1]), ('regression #3', [[1, 2], [[20, 1, 2], [21, 1, 2]]], [2, 2, 1, 1]), ('regression #10', [[1, 2, 3, 4, 5, 6], [[1, 1, 2], [2, 2, 3], [3, 3, 1], [4, 4, 5], [5, 5, 6], [6, 6, 4], [7, 3, 4]]], [6, 7, 1, 2]), ('boundary #11', [[1], []], [1, 0, 1, 0]), ('boundary #12', [[], []], [0, 0, 0, 0]), ('control #13', [[1, 2, 3], [[1, 1, 2], [2, 2, 3]]], [3, 2, 1, 0]), ('regression #14', [[1, 2, 3, 4], [[1, 1, 2], [2, 3, 4], [3, 2, 1], [4, 4, 3]]], [4, 4, 2, 2]), ('control #15', [[1, 2, 3, 4, 5], [[1, 1, 2], [2, 2, 3], [3, 3, 4], [4, 4, 5], [5, 5, 1], [6, 1, 3], [7, 3, 5]]], [5, 7, 1, 3])], [('control #0', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1]]], [4, 4, 1, 1]), ('control #1', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [14, 1, 3]]], [4, 5, 1, 2]), ('regression #2', [[1, 2, 3, 4], [[10, 1, 2], [11, 2, 3], [12, 3, 4], [13, 4, 1], [10, 1, 2], [12, 3, 4]]], [4, 4, 1, 1]), ('regression #3', [[1, 2], [[20, 1, 2], [21, 1, 2]]], [2, 2, 1, 1]), ('regression #4', [[1, 2], [[20, 1, 2], [21, 2, 1], [22, 1, 2]]], [2, 3, 1, 2]), ('control #13', [[1, 2, 3], [[1, 1, 2], [2, 2, 3]]], [3, 2, 1, 0]), ('regression #14', [[1, 2, 3, 4], [[1, 1, 2], [2, 3, 4], [3, 2, 1], [4, 4, 3]]], [4, 4, 2, 2]), ('control #15', [[1, 2, 3, 4, 5], [[1, 1, 2], [2, 2, 3], [3, 3, 4], [4, 4, 5], [5, 5, 1], [6, 1, 3], [7, 3, 5]]], [5, 7, 1, 3])]]\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":"Stipulated deterministic toy contract on a bounded input domain; results are rounded as stated and no conformance with any published standard or library is claimed. 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-gis-polygon-topology-arc-node-face-count-euler-relation","generated_at":"2026-09-29T14:48:23.489465+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Topology builders check face counts against Euler characteristic to detect missing or doubled arcs after edits.","root_cause":"The face count assumes a single connected component.","sha256":"0a0fc2ad08e10b43bf154be43d80d92c44ecb4fa6500840e7b36ee62ff0e5bc1","title":"Bounded face count of an arc-node topology: euler relation · 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.597,"exit_code":1,"observations":[{"actual":[4,4,1,2],"check":"control #0","expected":[4,4,1,1],"passed":false},{"actual":[4,5,1,3],"check":"control #1","expected":[4,5,1,2],"passed":false},{"actual":[4,4,1,2],"check":"regression #2","expected":[4,4,1,1],"passed":false},{"actual":[2,2,1,2],"check":"regression #3","expected":[2,2,1,1],"passed":false},{"actual":[2,3,1,3],"check":"regression #4","expected":[2,3,1,2],"passed":false},{"actual":[4,3,2,1],"check":"regression #5","expected":[4,3,2,1],"passed":true},{"actual":[5,3,3,0],"check":"regression #6","expected":[5,3,3,1],"passed":false},{"actual":[1,1,1,2],"check":"regression #7","expected":[1,1,1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [4, 4, 1, 2], \"expected\": [4, 4, 1, 1], \"passed\": false}, {\"check\": \"control #1\", \"actual\": [4, 5, 1, 3], \"expected\": [4, 5, 1, 2], \"passed\": false}, {\"check\": \"regression #2\", \"actual\": [4, 4, 1, 2], \"expected\": [4, 4, 1, 1], \"passed\": false}, {\"check\": \"regression #3\", \"actual\": [2, 2, 1, 2], \"expected\": [2, 2, 1, 1], \"passed\": false}, {\"check\": \"regression #4\", \"actual\": [2, 3, 1, 3], \"expected\": [2, 3, 1, 2], \"passed\": false}, {\"check\": \"regression #5\", \"actual\": [4, 3, 2, 1], \"expected\": [4, 3, 2, 1], \"passed\": true}, {\"check\": \"regression #6\", \"actual\": [5, 3, 3, 0], \"expected\": [5, 3, 3, 1], \"passed\": false}, {\"check\": \"regression #7\", \"actual\": [1, 1, 1, 2], \"expected\": [1, 1, 1, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.922,"exit_code":1,"observations":[{"actual":[4,4,1,1],"check":"control #0","expected":[4,4,1,1],"passed":true},{"actual":[4,5,1,2],"check":"control #1","expected":[4,5,1,2],"passed":true},{"actual":[4,4,1,1],"check":"regression #2","expected":[4,4,1,1],"passed":true},{"actual":[2,2,1,1],"check":"regression #3","expected":[2,2,1,1],"passed":true},{"actual":[2,3,1,2],"check":"regression #4","expected":[2,3,1,2],"passed":true},{"actual":[4,3,2,0],"check":"regression #5","expected":[4,3,2,1],"passed":false},{"actual":[5,3,3,-1],"check":"regression #6","expected":[5,3,3,1],"passed":false},{"actual":[1,1,1,1],"check":"regression #7","expected":[1,1,1,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [4, 4, 1, 1], \"expected\": [4, 4, 1, 1], \"passed\": true}, {\"check\": \"control #1\", \"actual\": [4, 5, 1, 2], \"expected\": [4, 5, 1, 2], \"passed\": true}, {\"check\": \"regression #2\", \"actual\": [4, 4, 1, 1], \"expected\": [4, 4, 1, 1], \"passed\": true}, {\"check\": \"regression #3\", \"actual\": [2, 2, 1, 1], \"expected\": [2, 2, 1, 1], \"passed\": true}, {\"check\": \"regression #4\", \"actual\": [2, 3, 1, 2], \"expected\": [2, 3, 1, 2], \"passed\": true}, {\"check\": \"regression #5\", \"actual\": [4, 3, 2, 0], \"expected\": [4, 3, 2, 1], \"passed\": false}, {\"check\": \"regression #6\", \"actual\": [5, 3, 3, -1], \"expected\": [5, 3, 3, 1], \"passed\": false}, {\"check\": \"regression #7\", \"actual\": [1, 1, 1, 1], \"expected\": [1, 1, 1, 1], \"passed\": true}], \"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."}}