cs.CC — Computational Complexity
Exact and Modular Counting Dichotomies for Group-Labeled Perfect Matchings
We introduce and classify the counting complexity of edge-ordered group-labeled perfect matchings. Fix a finite group and an integer modulus . Given a simple graph with edge labels , a target , and a global edge ordering , let count the perfect matchings of whose ordered product equals . The order is arbitrary and may interleave edges across distinct components. While Kasteleyn's Pfaffian method solves this problem in polynomial time for commuting (abelian) groups on planar graphs, the order-sensitive (non-abelian) case has not been classified. We prove complete complexity dichotomies across every finite group and every modulus . First, for modular counting on planar graphs, bounded-treewidth graphs (, ), and cellularly embedded orientable -genus graphs, tractability is governed by a three-way structural split. (I) For abelian , exact and modular counting lie in deterministic (planar and bounded treewidth) and (genus ). (II) For non-abelian with a normal Sylow -subgroup and abelian quotient (, e.g., ), counting modulo lies in those same classes, whereas counting modulo any with a prime divisor is -hard. (III) For every , there is no tractable modulus: counting modulo every is -hard for every prime . Both hardness regimes hold already on simple planar bipartite treewidth- graphs. Restricting from treewidth to -regular outerplanar bipartite graphs strictly enlarges the tractable modular pairs, even inside Class III (for instance, modulo for , , and of order , and for and of order ). Second, on -regular outerplanar bipartite graphs (to which every graph of maximum degree reduces parsimoniously), exact integer counting lies in if is abelian or a nilpotency-class- -group of exponent at most , and is -hard for every other finite group. At maximum degree , the non-abelian class- exponent- -groups also become -hard via disjoint copies of a -vertex chorded cycle, leaving only abelian groups tractable. The core group classification and reduction identities of the three main counting theorems are verified in Lean.