Binary path-counting gadget Created 2026-09-28 Updated 2026-11-05
A binary path-counting gadget constructs a directed acyclic graph with exactly directed paths from entrance to exit , using vertices for a nonnegative integer .
For , read its binary expansion after the leading one. Begin with one edge . For each following bit , add fresh vertices and edges , , , . If , also add . Replace by . The path count changes from to . Finally add . For , the bits give counts . For , leave disconnected.
To replace a weighted edge inside a cycle cover of a directed graph, identify and give each fresh internal vertex a unit-weight self-loop. If the replacement is unused, all fresh vertices use their self-loops, in one way. If it is used, the selected internal edges form one -to- path, giving possibilities; all unused vertices use their self-loops. The internal graph is acyclic apart from these self-loops, so there are no other internal directed cycles. Thus the substitution preserves the weighted permanent of a matrix.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 124 4 ii Solution 2026-09-28
View as a directed graph with nonnegative integer edge weights. For an edge of weightbuild a binary path-counting gadget with one entrance and one exit and exactly entrance-to-exit routes. Starting with one route, a constant-size diamond doubles the number of routes; processing the bits from most significant to least significant repeatedly doubles and, when , adds one bypass route. The gadget has vertices and only zero-one edges.
Add forced internal edges and self-loops so that a cycle cover not using the simulated edge extends uniquely across the gadget, whereas a cycle cover using it has exactly one extension for each entrance-to-exit route. Replacing every weighted edge therefore multiplies each original cycle cover by precisely the product of its selected edge weights. Summing over covers givesThere are entries and each gadget has size, so is constructed in polynomial time.