arXiv:2608.24728cs.DSAug 2026

Manuscript Offprint

arXiv:2608.24728

Polynomial-time Stable Matching in Network Hypergraphs

Karthekeyan Chandrasekaran, Krishna Kalathur

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We show that there exists a polynomial-time algorithm to find a stable matching in network hypergraphic preference systems. The key connection that drives the algorithm was discovered by chatting with ChatGPT-5.6 Sol Max. We verified it independently and present the details in our own words.

1 Introduction

Stable matching is a foundational model at the interface of combinatorial optimization and economics. In the classical bipartite setting, the deferred-acceptance algorithm of Gale-Shapley [14] proves that a stable matching always exists and can be found in polynomial time. Variants of this algorithm underpin matching mechanisms in markets such as medical residency [23]. Bipartite stable matching also has a rich mathematical structure: stable matchings form a distributive lattice, admit compact representations through rotations, several combinatorial algorithms are known, and the polyhedral structure is well-understood [16, 24]. This successful combination of applications, algorithms, and structure has made stable matching a central paradigm for matching under preferences.

The classical bipartite stable matching model is, however, intrinsically pairwise and two-sided. In many settings, the relevant unit of cooperation is a coalition rather than a pair. They naturally lead to a hypergraph where vertices correspond to agents and hyperedges describe coalitions. Aharoni and Fleiner [1] modeled such settings by a hypergraphic preference system. A hypergraphic preference system is a pair (H,≻)(H, \succ), where H=(V,E)H = (V, E) is a hypergraph and

≻=(≻v)v∈V\succ=(\succ_{v})_{v\in V}

is a preference profile: for every vertex vv, the relation ≻v\succ_v is a strict ordering of the hyperedges incident to vv. A matching is a set of pairwise vertex-disjoint hyperedges. A matching is stable if every unchosen hyperedge ee contains a vertex that prefers its matched hyperedge over ee. We assume throughout that HH has singleton hyperedges ev={v}e_v = \{v\} for each v∈Vv \in V and each v∈Vv \in V ranks eve_v as its least preferred hyperedge, essentially representing the outside option of remaining unmatched. Thus, vertices correspond to agents, hyperedges correspond to feasible coalitions, and a stable matching seeks a collection of feasible coalitions such that no coalition can deviate in a way that benefits all of its members. Stable hypergraph matching is closely connected to core stability in finitely generated non-transferable utility (NTU) games and hedonic coalition games [4, 3, 26, 7].

The move pairwise and two-sided coalitions (i.e., from bipartite scenarios) to arbitrary coalitions changes the existential picture dramatically. A stable matching need not exist for an arbitrary hypergraphic preference system, and deciding existence is NP-complete [21]. Nevertheless, Aharoni

*Grainger College of Engineering, University of Illinois, Urbana-Champaign, Email: {karthe, kk17}@illinois.edu. Supported in part by NSF grant CCF-2402667.

and Fleiner [1] applied Scarf’s lemma to conclude that every such system has a fractional stable matching. Moreover, their fractional stable matching may be chosen as an extreme point of the fractional matching polytope

P(H)={x∈R≥0E:AHx=1},P(H)=\{x\in\mathbb{R}_{\geq0}^{E}:A_{H}x=1\},

where AHA_H is the vertex-hyperedge incidence matrix of HH. In particular, if P(H)P(H) is an integral polyhedron, then their results yield an integral stable matching [1, 7]. Biró and Fleiner [7] formalized the interpretation of Scarf solutions as fractional core elements in capacitated NTU games, related those solutions to stable hypergraph matchings, and emphasized an important integrality consequence for normal hypergraphs: A hypergraph HH is normal if every sub-hypergraph H′=(V,E′)H' = (V, E') where E′⊆EE' \subseteq E satisfies χ′(H′)=Δ(H′)\chi'(H') = \Delta(H'), where χ′(H′)\chi'(H') is the chromatic index of H′H', i.e., minimum number of matchings to cover E′E' and Δ(H′)\Delta(H') is the maximum degree among all vertices in H′H'. Lovász [19] showed that a hypergraph HH is normal if and only if its associated fractional matching polytope P(H)P(H) is integral. Consequently, every hypergraphic preference system on a normal hypergraph admits a stable matching.

The above proof of existence of stable matching for normal hypergraphs does not give a polynomial-time algorithm. Scarf’s pivoting procedure is finite, but no polynomial bound is known in general; in fact, computing a fractional stable matching of a hypergraphic preference system is PPAD-complete even under severe degree and rank restrictions [18, 17, 11]. Nevertheless, the above results motivate a central search question:

Does there exist a polynomial-time algorithm to find a stable matching in hypergraphic preference systems, where the hypergraph is a normal hypergraph?

The normal-hypergraph promise is algorithmically meaningful: Lovász [19] characterized normal hypergraphs via the Helly property and perfection of the line graph, both of which are recognizable in polynomial time [5, 9], thereby making normality testable in polynomial time.

Recent work has answered this question for some structured subfamilies of normal hypergraphs and we discuss these now—see Figure 1 for containment relations between these families. A subtree hypergraph admits a tree on V such that every hyperedge induces a subtree. Subtree hypergraphs are subfamilies of normal hypergraphs because subtrees of a tree have the Helly property and their intersection graphs are chordal [15]. Stable matchings on subtree hypergraphs can be found in polynomial time: Csáji [10] obtained a polynomial-time algorithm for subtree hypergraphs by reducing stable matching to a kernel problem on clique-acyclic superorientation of a chordal graph—we will discuss this approach later; Biró, Csáji, and Schlotter [6] subsequently gave a direct recursive algorithm.

A different line of work studies unimodular hypergraphs, namely hypergraphs whose vertex-hyperedge incidence matrix is totally unimodular [6]. Unimodular hypergraphs are normal via standard polyhedral results. Within the family of unimodular hypergraphs lies the family of network hypergraphs—network hypergraphs are hypergraphs whose vertex-hyperedge incidence matrix is a network matrix. Equivalently, its vertices correspond to the arcs of an oriented tree, known as the principal tree, and its hyperedges correspond to directed paths of the principal tree. Arborescence hypergraphs are a proper subfamily of both network hypergraphs and subtree hypergraphs—we refer the reader to [8] for the definition of arborescence hypergraphs. We will see later that hypergraphic preference systems over network hypergraphs contain bipartite stable matching as a special case (see Section 4). In contrast, bipartite stable matching cannot be modeled as a special case of stable matching over subtree hypergraphic preference systems. A suitable implementation of Scarf's algorithm is known to converge in polynomial time for arborescence hypergraphs [8] as well as bipartite stable matching [13], but those analyses do not seem to extend to network hypergraphs.

Given this status, recent works identified network hypergraphs as the next natural frontier towards polynomial-time algorithms for stable matchings in hypergraphic preference systems over normal hypergraphs. Again, the network-hypergraph promise is algorithmically meaningful: there exists a polynomial-time algorithm to verify whether a given hypergraph is a network hypergraph (e.g., see [25]). In this work, we resolve the network hypergraph frontier by showing the existence of a polynomial-time algorithm.

Theorem 1.1. There exists a polynomial-time algorithm to compute a stable matching of a given hypergraphic preference system, where the hypergraph is a network hypergraph.

The theorem can be viewed as an algorithmic strengthening of Biró and Fleiner's [7] existential argument. We emphasize that the result concerns with finding a stable matching; optimizing a weight function over stable matchings is NP-hard even for laminar hypergraphs which is a subfamily of network hypergraphs [6]. We refer the reader to Figure 1 for the containment relation between the above-mentioned families of hypergraphs that are known to have a stable matching and the algorithmic status of computing a stable matching in each of them.

Figure

Figure 1: Relevant hypergraph families for which the existence of stable matching is guaranteed and containment relations between them. An arrow from A to B indicates that A is subfamily of B. The algorithmic status of hypergraph families within dashed boxes is still open while those within continuous boxes are known to be polynomial time. Our main contribution is resolving the algorithmic status of network hypergraphs. Network and subtree hypergraphs are incomparable. Bipartite stable matching is a special case of hypergraphic preference system over network hypergraphs but not subtree hypergraphs.

Proof outline. Our algorithm is based on a reduction to finding kernels in digraphs. For a hypergraphic preference system (H,≻)(H, \succ), construct its conflict graph GHG_H on node set E(H)E(H) with a pair of hyperedge-nodes being adjacent if the hyperedges have non-empty intersection. Now, superorient every edge of GHG_H as follows: add an arc e→fe \to f if some vertex in e∩fe \cap f prefers ff to ee; both directions may be present when different common vertices have opposite preferences. Denote the resulting digraph by DH,≻D_H, \succ, called the conflict preference graph. A kernel KK in a digraph is a subset of vertices that forms a stable-set (i.e., no arc between any pair in KK) and is absorbing (i.e., every vertex u∉Ku \notin K has a vertex v∈Kv \in K such that u→vu \to v is present). Csáji [10] observed that stable matchings of (H,≻)(H, \succ) are exactly the kernels of DH,≻D_{H,\succ}. Essentially, the stable-set condition guarantees that the corresponding hyperedges form a matching, while absorption guarantees that every unchosen hyperedge points to a chosen one that defeats it at a common vertex thereby leading to stability.

By the above reduction, it suffices to find the kernel of the digraph DH,≻D_{H,\succ} under the promise that H is a network hypergraph. For this, we rely on the network representation of H. Each hyperedge of H is a directed path in an oriented tree, and two hyperedges conflict exactly when their paths share a tree arc. Hence, GHG_{H} is a directed-edge graph in the terminology of Monma and Wei [20]—abbreviated as DE graph—i.e., an arc-intersection graph of directed paths in an oriented tree. Monma and Wei showed that directed paths in an oriented tree satisfy an arc-Helly property: every pairwise arc-intersecting family shares a common arc. From this, we infer that DH,≻D_{H,\succ} is a clique-acyclic super-orientation of the DE graph GHG_{H}, i.e., no clique of GHG_{H} contains a unidirectional cycle in DH,≻D_{H,\succ}. Pass-Lanneau, Igarashi, and Meunier [22] gave a polynomial-time algorithm for computing a kernel in a clique-acyclic super-orientation of a DE graph. Applying that algorithm and translating the kernel back to hyperedges gives the desired polynomial-time algorithm, thereby proving Theorem 1.1.

Our argument parallels the earlier proof of polynomial-time stable matching in hypergraphic preference systems over subtree hypergraphs that appeared in the EGRES report of Csáji [10]. If HH is a subtree hypergraph, then the conflict graph GHG_H is chordal and the Helly property of subtrees makes the conflict preference graph clique-acyclic; Pass-Lanneau, Igarashi, and Meunier's [22] polynomial-time kernel computation for clique-acyclic super-orientations of “chordal” graphs completes the proof for subtree hypergraphs. For network hypergraphs, the conflict graph GHG_H need not be chordal (for an example, see the hypergraphic preference system in Figure 2 which we will later see is a network hypergraph and its conflict graph GHG_H in Figure 3a which has a chordless cycle namely C={f1,f2,f3,f4}C = \{f_1, f_2, f_3, f_4\}), so that particular result of [22] cannot be invoked. The new ingredients are that the conflict graph is a DE graph, that directed paths satisfy the stronger arc-Helly property needed to certify clique-acyclicity, and that kernels are polynomial-time computable for clique-acyclic superorientations of DE graphs. We develop the kernel correspondence in Section 2, the required facts about DE graphs in Section 3, and exploit the tree representation of network hypergraphs to complete the proof of the main theorem in Section 4. Although the proof turned out to be simple via a sequence of known connections, its simplicity is apparent only in hindsight. We hope that the community will benefit from our presentation of these connections.