Scarf’s Algorithm on Arborescence Hypergraphs
Abstract
Scarf’s algorithm – a pivoting procedure that finds a dominating extreme point in a down-monotone polytope – can be used to show the existence of a fractional stable matching in hypergraphs. The problem of finding a fractional stable matching in hypergraphs, however, is PPAD-complete. In this work, we study the behavior of Scarf’s algorithm on arborescence hypergraphs, the family of hypergraphs in which hyperedges correspond to the paths of an arborescence. For arborescence hypergraphs, we prove that Scarf’s algorithm can be implemented to find an integral stable matching in polynomial time. En route to our result, we uncover novel structural properties of bases and pivots for the more general family of network hypergraphs. Our work provides the first proof of polynomial-time convergence of Scarf’s algorithm on hypergraphic stable matching problems, giving hope to the possibility of polynomial-time convergence of Scarf’s algorithm for other families of polytopes.
Keywords and phrases:
Scarf’s algorithm, Arborescence Hypergraphs, Stable MatchingsCategory:
Track A: Algorithms, Complexity and GamesFunding:
Karthekeyan Chandrasekaran: Karthekeyan Chandrasekaran is supported in part by NSF grant CCF-2402667.Copyright and License:
![[Uncaptioned image]](x1.png)
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithmsRelated Version:
Scarf’s Algorithm on Arborescence Hypergraphs: https://arxiv.org/abs/2412.03397 [11]Acknowledgements:
The first three authors gratefully acknowledge the organizers of the ICERM Spring 2023 semester program on Discrete Optimization: Mathematics, Algorithms, and Computation, where this project was initiated.Editors:
Keren Censor-Hillel, Fabrizio Grandoni, Joël Ouaknine, and Gabriele PuppisSeries and Publisher:

1 Introduction
Scarf [32] proved the existence of a core allocation in a large class of cooperative games with non-transferable utility. Key ingredients in this proof include a lemma – Scarf’s lemma – that asserts the existence of a dominating extreme point in certain polytopes, and a pivoting procedure – Scarf’s algorithm – to find one. Scarf’s results have profoundly influenced subsequent research in combinatorics, theoretical computer science, economics, and game theory: Scarf’s lemma has been used to show the existence of fair allocations such as cores and fractional cores [8, 32], strong fractional kernels [2], fractional stable solutions in hypergraphs [1] and fractional stable paths [20]. Although Scarf’s results are employed in many applications, it is not known how to efficiently construct these desirable allocations/solutions. It is widely believed that Scarf’s algorithm is unlikely to be efficient for arbitrary applications [22]. In this work, we investigate the possibility of efficient convergence of Scarf’s algorithm for finding a stable matching in hypergraphs.
The stable matching problem in bipartite graphs (also known as the stable marriage problem) is a classic and well-studied problem. It is well-known that a stable matching in a bipartite graph with preferences always exists [19] and can be found in polynomial time via multiple algorithms, including Gale and Shapley’s deferred acceptance algorithm [19], linear programming [4, 30, 31, 35] and other combinatorial algorithms [5, 15]. A stable matching in a bipartite graph can also be found using fixed-point approaches [17], which in general do not translate to polynomial-time algorithms. Scarf’s algorithm belongs to the class of fixed point approaches, and it has been recently shown to converge in polynomial time for the stable marriage problem [16]. To the best of our knowledge, this is the first proof of polynomial-time convergence of Scarf’s algorithm on any application. This result motivated us to address the possibility of efficient convergence of Scarf’s algorithm for hypergraph stable matching problems.
In contrast to graphs, the problem of finding a stable matching in hypergraphs is significantly more challenging. Even in the special case of tripartite -regular hypergraphs, it is NP-complete to find a stable matching [24] (this is also known as the stable family problem proposed by Knuth [23]). Despite the hardness results of finding (integral) stable matchings in hypergraphs, Aharoni and Fleiner [1] used Scarf’s lemma to show that a fractional stable matching exists in every hypergraph. However, this general implication from Scarf’s result comes at a computational price: the problem of computing a fractional stable matching on hypergraphs is PPAD-complete [22]. The latter problem remains PPAD-complete even in extremely restrictive cases, for example, even if the hypergraph has node degree/hyperedge size at most [21, 13].
While these results suggest that Scarf’s algorithm is unlikely to converge in polynomial-time for arbitrary hypergraphs, investigating the behavior of Scarf’s algorithm in special classes of hypergraphs remains an interesting question, also because of real-world applications. For instance, a sequence of works [26, 27, 25] employed Scarf’s algorithm as a subroutine to find a fractional stable matching in hypergraphs, then iteratively rounds it to an integral solution which indicates a meaningful allocation. Such allocations provide solutions when complementarities and externalities appear in stable matching problems [29]. One of the most important such problems is the hospital/resident problem with couples (HRC) [10, 26]. HRC can equivalently be formulated as the problem of finding a stable matching in certain hypergraphs. It is shown in [9] that Scarf’s algorithm empirically outperforms all other known heuristics when the proportion of couples is high. However, finding a fractional solution of HRC is also known to be PPAD-complete [13]. Such computational gaps between theory and practice regarding Scarf’s algorithm are not well understood.
In this paper, we focus on a class of hypergraphs called arborescence hypergraphs (in which the hyperedges are paths in an arborescence), and design a polynomial-time algorithm to find a (integer) stable matching in this class. The class of arborescence hypergraph lies between hypergraphs represented by interval matrices [18] and network matrices [33]. In particular, we design a pivoting rule for Scarf’s algorithm and show that it terminates in a polynomial number of iterations on the fractional matching polytope of arborescence hypergraphs. The node-hyperedge incidence matrix of an arborescence hypergraph is totally unimodular and consequently, every extreme point of the associated fractional matching polytope is integral. Thus, every dominating extreme point is also integral. This observation and Aharoni and Fleiner’s results [1] imply that the extreme point found by Scarf’s algorithm for arborescence hypergraphs corresponds to an integral stable matching. Our pivoting rule can be repurposed to apply to the more general family of network hypergraphs (of which the incidence matrix is a network matrix111The node-hyperedge incidence matrix of such a hypergraph is also totally unimodular [34] and consequently there is always an integer stable matching.). This pivoting rule can also be repurposed to implement the simplex algorithm on a linear program whose constraint matrix is a network matrix, which includes the incidence matrix of digraphs [34, chapter 13.3]; thus, it reduces to a pivoting rule of choosing the leaving arc for the network simplex algorithm proposed by Cunningham [14]. If we do not impose any restrictions on the entering variables, network simplex algorithm under this rule can still perform an exponentially long sequence of degenerate pivots [3]. In contrast, we show that Scarf’s algorithm under our pivoting rule always performs non-degenerate pivots. Currently, we are not able to obtain a proof of polynomial convergence of Scarf’s algorithm implemented with our pivoting rule for the more general family of network hypergraphs. Nevertheless, understanding Scarf’s algorithm on arborescence hypergraphs is a natural first step in this direction.
1.1 Our Contributions
To formally present our result, we define the stable matching problem on hypergraphs as follows.
Definition 1 (Hypergraphic preference system).
A hypergraph is defined by a vertex set and a hyperedge set , where every hyperedge is a subset of . A hypergraphic preference system is given by a pair , where is a hypergraph and is the preference profile, being a strict order over for each . For , we write if either or . In addition, we assume that (i) for every , the singleton hyperedge and for every , and (ii) is the only hyperedge incident to node , that is, 222The first assumption corresponds, in the bipartite setting, to the usual hypothesis that an agent prefers to be matched rather than being unmatched. The second assumption is without loss of generality and we include it for the sake of simplifying the presentation..
Definition 2 (Stable matching).
A stable matching for a hypergraphic preference system is a vector so that for every , there exists a vertex such that
(1) |
Equation (1) with imposes that is the characteristic vector of a matching. Moreover, for every hyperedge , there exists a vertex and a hyperedge in the matching (i.e., ) so that . Correspondingly, if a fractional vector satisfies (1), then we call such a fractional vector a fractional stable matching.
We remark here that the standard combinatorial definition of stable matching is a hypergraph matching that does not contain blocking hyperedges (see, e.g., [1]), which reduces to the classical stable matching when the hypergraph is a bipartite graph. Definition 2 is equivalent to the combinatorial definition, and helps us define the fractional generalization more naturally.
Definition 3 (Arborescence hypergraph).
An arborescence is a directed graph that contains a vertex (called the root) such that every vertex has a unique directed path from . A hypergraph is an arborescence hypergraph if there exists an arborescence such that and each hyperedge is a subset of arcs in that forms a directed path. Such is called a principal arborescence of .
Example 4.
We present an example of an arborescence and the corresponding arborescence hypergraph in Figure 1.
As our main result, we show that Scarf’s algorithm can be implemented to run in polynomial time for every arborescence hypergraphic preference system.
Theorem 5.
Let be a hypergraphic preference system where is an arborescence hypergraph. There exists a pivoting rule such that Scarf’s algorithm terminates in at most iterations and outputs a stable matching on in time .
A few remarks on this result are in order. To the best of our knowledge, this is the first result showing polynomiality of Scarf’s algorithm beyond the case of stable marriage [16]. We note that the pivoting rule used to show polynomiality of Scarf’s algorithm in stable marriage [16] was heavily inspired by Gale and Shapley’s classical deferred acceptance mechanism, which is a purely combinatorial algorithm. In contrast, the pivoting rule developed in this work does not seem to have a combinatorial counterpart and is substantively different from the one from [16]. In Section 6, we provide evidence suggesting that classical approaches to stable marriage problems, such as linear programming with an exact description of the convex hull of all stable matchings [35], cannot even extend to a subclass of arborescence hypergraphic preference systems.
Secondly, while most of the known results related to polynomiality of stable matching on hypergraphic preference system usually restricts either the degree of nodes [21] or the size of hyperedges [13], we do not assume any condition on them or on the preference lists of agents. Thirdly, a recent work [7] shows that there is a polynomial time algorithm for finding a stable matching on subtree hypergraphs. They reduce the problem of finding a stable matching on such instances to finding a kernel in the clique-acyclic superorientation of a chordal graph, which can be solved in polynomial time [28]. This reduction indeed implies that there exists a polynomial time algorithm that finds a stable matching in an arboresence hypergraphic system. We remark that the algorithm from [28] is substantially different from Scarf’s algorithm and does not generalize to network hypergraphs, while, in our investigation, we uncover novel properties of bases and pivots in network hypergraphs, which may be of independent interest and could lead to polynomial-time convergence proofs for this more general class of hypergraphs.
1.2 Organization of the paper
In Section 2, we give more details on Scarf’s results and the origin of arborescence hypergraphs, and formally define notation. Scarf’s algorithm can be seen as alternating between two operations, cardinal pivot and ordinal pivot. In Section 3, we discuss the cardinal pivots, while in Section 4, we introduce ordinal pivots. In Section 5, we present the key technical part of the proof of polynomiality of Scarf’s algorithm on arborescence hypergraphs. In Section 6, we present an (counter)example that shows non-integrality of the fractional stable matching polytope on interval hypergraphs. Lastly, we give conclusion with open questions in Section 7. Some proofs, generalizations, and extended discussions are omitted and can be found in the full version [11].
2 Preliminaries
While the original idea of Scarf’s algorithm [32] applies to more general settings, we review here only its implementation for hypergraphic preference systems, as proposed by Aharoni and Fleiner [1]. In the following, we let be a hypergraphic preference system with and .
2.1 Scarf’s lemma and hypergraphic stable matchings
Definition 6 (Fractional matching polytope, cardinal basis).
Let be the incidence matrix of such that iff . The matrix is in standard form if has the form where is the identity matrix333This means for , i.e., the first columns of correspond to singletons.. The polytope is called the fractional matching polytope. A set of linearly independent columns of is called a cardinal basis. Every feasible cardinal basis corresponds to an extreme point .
We note that, if is a fractional stable matching, then (i.e., is a fractional matching). Conversely, given a fractional matching , one needs more conditions that involve the preference orders to claim that is a fractional stable matching, which leads to the next definition.
Definition 7 (Ordinal matrix, ordinal basis, utility vector).
Let be a matrix. The matrix is an ordinal matrix if it satisfies for every distinct , . Let be a set of columns of . For every row , the utility of the row (w.r.t. ) is
(2) |
The set is called an ordinal basis of if and for every column , there is at least one row such that . The associated vector is called the utility vector of the ordinal basis .
Example 8.
The matrix below is an ordinal matrix. One can verify that is an ordinal basis with , and is an ordinal basis with . We observe that with is not an ordinal basis since for every .
Definition 9 (Dominating basis, dominating extreme point).
A feasible cardinal basis that is also an ordinal basis is called a dominating basis for , and the extreme point of corresponding to is called a dominating extreme point for .
Scarf’s lemma shows the existence of a dominating extreme point under mild conditions on . In the following, we state a version of it that pertains to our setting, which connects dominating extreme points and fractional stable matchings.
Theorem 10.
Let be a hypergraphic preference system. Let be the fractional matching polytope of where is in standard form. Then, there exists an ordinal matrix such that
2.2 Scarf’s algorithm
Scarf [32] provided a general pivoting algorithm to compute a dominating extreme point. The algorithm involves two operations, namely cardinal pivot and ordinal pivot.
2.2.1 Cardinal Pivot
Let be a feasible cardinal basis and let . A cardinal pivot from with entering column returns a feasible cardinal basis , where the column is known as the leaving column. Cardinal pivot is exactly the operation used in the simplex algorithm when a column enters the basis and one wants to choose a leaving column to reach an adjacent basis. When is degenerate, in each iteration there may exist multiple candidates to be chosen as a leaving column , thus a pivoting rule under which column is leaving needs to be specified. For a fixed pivoting rule, the choice of leaving column is unique. Unlike the simplex algorithm, the other half of the pivoting procedure and the pivoting rule generating the entering column is obtained via an operation on the ordinal matrix.
2.2.2 Ordinal Pivot
Let be an ordinal basis and . An ordinal pivot from with leaving column returns an ordinal basis , where is chosen by a series of number comparisons. We give the formal description in Algorithm 1, and provide an example to illustrate this opertaion in Example 11. For correctness of Algorithm 1, we refer to [32].
Example 11.
In this example, we show how an ordinal pivot proceeds. Consider the ordinal matrix in Example 8, and its submatrix :
corresponding to an ordinal basis with utility vector . If we want to remove column from , and perform an ordinal pivot, we let . The row is defined as the row index of the common entry in both the utility vector and the column vector , thus we have , since . In the remaining columns , the minimum entry in row is , thus we define the reference column . Similarly, by finding the common entry between and , we find the row index as . Now, the goal is to find the columns in such that for all , i.e., to find columns that dominates the vector , where means we do not have any restrictions. One can observe that such columns can be or . Thus, in Algorithm 1, . We need to choose one column from that maximizes , i.e., the row is maximized. Therefore, we have as . This ordinal pivot returns a new ordinal basis with the new utility vector .
In contrast to the cardinal pivot, the ordinal pivot reverses the order of entering and leaving. Moreover, the ordinal pivot operation is unique.
Lemma 12 ([32]).
Let be an ordinal basis and let be an arbitrary column. Then there exists a unique column such that is an ordinal basis, and such a is determined by Algorithm 1.
In the following, we will see that an iteration of Scarf’s algorithm is the combination of a cardinal pivot and an ordinal pivot (in order). Recall that the simplex algorithm also chooses an entering column/variable and a leaving column/variable in order, but there a pivoting rule is usually specified by a pair [6] and these two rules should cooperate in some way to avoid cycling. In comparison, by Lemma 12, Scarf’s algorithm defines a unique rule when the ordinal matrix is fixed444One can of course design a specific ordinal matrix and a cardinal pivoting rule to let cooperate and see if Scarf’s algorithm converges in polynomial time. However, we need to also care about the dominating basis obtained by Scarf’s algorithm with – if such does not respect to the preference order given by certain applications, such dominating basis does not have a meaning., and we can only control on cardinal pivots. This observation distinguishes the pivoting rule of Scarf’s algorithm from it of the simplex algorithm.
2.2.3 Initialization, Iteration, and Termination
Scarf’s algorithm is initialized with a pair , where and . The algorithm iteratively starts with a pair where is a feasible cardinal basis, is an ordinal basis, and . It alternates a cardinal pivot and an ordinal pivot. In particular, it goes through a sequence
(3) |
where for every , we have that is a cardinal pivot from the feasible cardinal basis with entering column using the cardinal pivoting rule, and is an ordinal pivot from the ordinal basis with leaving column .
Definition 13 (Scarf pair, iteration).
A pair in the sequence (3) with is called a Scarf pair. We denote a consecutive pair of cardinal pivot and ordinal pivot as an iteration.
The algorithm terminates if either (i) happens to leave , then ; or (ii) happens to enter , in which case . Otherwise, the algorithm starts the next iteration with a new Scarf pair . Scarf [32] showed that when the polytope is non-degenerate, sequence (3) does not cycle. Thus, the sequence stops at a basis , both cardinal and ordinal, thus dominating. A dominating extreme point can be deduced from .
2.3 Arborescence hypergraphs
To describe our implementation of Scarf’s algorithm, it will be useful to describe arborescence hypergraphs through digraphs. Let be a directed graph. Let , and be an ordering of .
-
We say (or ) is a -path (or path) if forms an undirected path in .
-
An arc is forward in if following the order we visit the tail of before visiting its head, otherwise is backward in .
-
We say (or ) is a -directed path if every arc in is a forward arc in .
Recall that an arborescence is a directed graph with a root such that for every vertex there is a unique -directed path from .
Suppose that an arborescence is a subgraph of . Then, for every , there exists a unique -directed path from to . An arc-path incidence matrix of is defined as such that iff the -th arc in is , and the unique -directed path from to passes the -th arc in .
Definition 14 (Arborescence Hypergraph).
A hypergraph is an arborescence hypergraph if there exists a directed graph with an arborescence subgraph such that the node-hyperedge incidence matrix of is the arc-path incidence matrix of . If is an arborescence hypergraph, we say that is the principal network of and is the principal arborescence of .
A subclass of the arborescence hypergraphs is the interval hypergraphs [18].
Definition 15 (Interval Hypergraph).
Let be an arborescence hypergraph with principal arborescence . If is a chain, then is called an interval hypergraph.
Let be an arborescence hypergraph with principal network , where , . Its principal arborescence has the form . Notice that and hence, we assume for . The node-hyperedge incidence matrix of is equivalently defined as:
-
iff the hyperedge contains node .
-
iff the -path formed by passes .
We also assume that is depth-first, defined as follows. This order is a common topological order on trees. Details can be found in [12].
Definition 16.
Let be an arborescence with root . We define a partial order over such that if the -directed path from to passes through . We say that is depth-first if
-
1.
, and for , implies . In particular, is the unique root of .
-
2.
, and for every , the head of is .
3 Cardinal pivot on arborescence hypergraphs
In this section, we describe cardinal pivots of Scarf’s algorithm as operations on principal network . In Section 3.1, we first show a structural result that maps the cardinal basis to directed trees on , then we translate the change of basis operation in cardinal pivot into a cycle elimination operation. In Section 3.2, we define a pivoting rule called first-forward-leaving rule, which is interpreted as a choice of arcs that can be removed to form a new tree (basis).
3.1 Cardinal pivot in a digraph
We use the notation in Definition 6, where is specified as an arborescence hypergraph with principal network and principal arborescence . We first observe that there is a bijection between cardinal bases (not necessarily feasible) of and directed trees on . We note that, the results present in this section can be generalized to the case when is a network matrix.
Theorem 17 ([33]).
Consider a subset of columns. Denote the corresponding arc set by . Then the following statements are equivalent:
-
1.
is a cardinal basis.
-
2.
is a directed tree.
Next, we give a combinatorial interpretation of the cardinal pivot. Let be a feasible cardinal basis with . By Theorem 17, they correspond to a directed tree and an arc . Let , then we can find the unique -path denoted by . The path along with the additional arc form a cycle, from which a leaving column is chosen, since has to be a directed tree where . Recall that we also need to take feasibility of into consideration, since eliminating an arbitrary arc from the above cycle only guarantees that is a cardinal basis. By computing the dynamics of how each variable is changing between a cardinal pivot, we give a graphic characterization of cardinal pivot in Lemma 19. For this, we need the notion of augmenting and descending paths.
Definition 18 (Augmenting and Descending Paths).
Let , , and be a -path.
-
1.
The path is -augmenting if every forward arc in has and every backward arc in has .
-
2.
The path is -descending if every forward arc in has and every backward arc in has .
Lemma 19.
Consider a cardinal pivot from to with as the entering column where . Let be the extreme points corresponding to , respectively. Let be the unique -path from to (unique by Theorem 17). The following statements are equivalent:
-
1.
The cardinal pivot is non-degenerate.
-
2.
and .
-
3.
is -augmenting.
-
4.
is -descending.
Moreover, if the cardinal pivot is non-degenerate, then is a feasible cardinal basis, where corresponds to an (arbitrary) forward arc in . If the cardinal pivot is degenerate, then is a feasible cardinal basis, where corresponds to an (arbitrary) forward arc in such that .
3.2 Cardinal pivoting rule
While Lemma 19 gives a characterization of the candidate leaving columns , often the choice of that satisfies the theorem is not unique. We will use the following first forward arc leaving (FFL) rule as the pivoting rule. Roughly speaking, among all the candidate arcs verified by Lemma 19, we want to eliminate the first arc in .
Definition 20 (First forward arc leaving rule).
Let be a feasible cardinal basis. Let be the arc corresponding to the entering column and be the unique -path from to . If there exists a forward arc in with , choose the one with smallest subscript as the arc corresponding to the leaving column. If all forward arcs in have , then let be the smallest index such that is forward on , and let be the arc corresponding to the leaving column.
The FFL rule is well-defined, meaning that, for every entering column , the leaving column defined above exists and is unique. We summarize the cardinal pivot operation with FFL rule in Algorithm 2.
4 The design of ordinal matrix and ordinal pivot
Unlike cardinal pivots, an ordinal pivot is uniquely defined by the ordinal matrix. However, we do have some degree of flexibility555The ordinal matrix that makes Theorem 10 valid may not be uniquely defined. Fixing one of them is in a sense the same as specifying an ordinal pivoting rule. to design an ordinal matrix that satisfies Theorem 10. In Section 4.1, we construct a block partitioned ordinal matrix which we use to prove the polynomiality of Scarf’s algorithm. Then, we discuss some properties of the ordinal pivots under in Section 4.2. Throughout this section, let be a hypergraphic preference system with and for being the singleton hyperedges666This section assumes no restriction on . In particular, can be any hypergraph..
4.1 Block structure of the ordinal matrix
In our implementation of Scarf’s algorithm, we design a block-partitioned ordinal matrix, defined as follows.
Definition 21.
We say that an ordinal matrix is block-partitioned if:
-
1.
For each , we define the -th block .
-
2.
Let be a matrix whose columns are ordered as follows: The columns corresponding to the singleton hyperedges are the first columns of . Next, we group the other hyperedges into blocks , with the -th block ordered in decreasing order of preference from left to right according to . The -th block appears to the left of the -th block for every .
-
3.
Denote by , where corresponds to the -th column of defined in part 2.
-
4.
Assign the entries in as follows. For each such that , we set if is the -th best hyperedge with respect to . The remaining entries in row are assigned integers that are no less than and in decreasing order from left to right.
Example 22 (Block-partitioned matrix).
Let be a hypergraph with in Figure 2 and the following preference list:
The blocks are . The block-partitioned incidence matrix and ordinal matrix are as follows:
We remark that given a hypergraphic preference system, a block-partitioned matrix is unique and satisfies Theorem 10.
4.2 Controlling node and separator
4.2.1 Controlling node
When implementing Scarf’s algorithm, the first row/column of can be seen as a controlling row/column in Scarf’s algorithm (see [32]). Recall that we assume , which means node is incident only to the singleton hyperedge by itself. This assumption is without loss of generality: Indeed, we can reduce an arbitrary hypergraphic preference system to the one that satisfies this assumption, and construct a bijection between the stable matchings in the two instances. We say node is the controlling node.
4.2.2 Separator
At each iteration of Scarf’s algorithm, we start with a Scarf pair , where is a feasible cardinal basis and is an ordinal basis. Though not explicitly stated, indicates a fractional matching in the hypergraph. The intuition behind the block structure introduced in the previous section is that we want to separate the nodes that have already been “matched” by from the singletons. A separator is the node with the largest index that belongs to the former set, and every node behind the separator does not participate in the matching. We define the separator formally below.
Definition 23.
Let be a Scarf pair. Let be the column with the largest index in . If belongs to the -th block , then we say that is the separator of .
We show that the separator satisfies the following property, which captures the idea that every node larger than the separator is matched by the singleton:
Lemma 24.
Let be a Scarf pair and suppose is the separator of . Then, for every , we have .
We focus on a type of iteration of Scarf’s algorithm that increases the separator, which is triggered by a condition described as follows:
Lemma 25.
Let be an iteration in Scarf’s algorithm. Let be the leaving column in the ordinal pivot . Suppose that and are the reference column and the entering column of the ordinal pivot respectively. Let be the separator of . Denote by the utility vector of , respectively. If , then we have
-
1.
.
-
2.
and .
-
3.
The separator of is for some .
5 Polynomiality of Scarf’s algorithm
In this section, we show convergence and bound the run-time of our implementation of Scarf’s algorithm on arborescence hypergraphic preference systems. We are given a hypergraphic preference system as the input, where is an arborescence hypergraph and . Next, we find the principal arborescence and principal network associated with . Then, we order and according to depth-first order on (consequently, the root of the arborescence is ). Next, we construct the block-partitioned ordinal matrix with an order of the hyperedges , and construct the node-hyperedge incidence matrix with the rows and columns ordered as above.
We start with an initial Scarf pair where and . Every cardinal pivot follows the FFL rule (c.f. Definition 20). Every iteration of the algorithm is unambiguously defined and we obtain a unique sequence of Scarf pairs (3). We will show that the number of iterations, i.e. the length of the sequence (3), is bounded by . Since each iteration can be implemented in time, the total run-time is .
We define a notion of a well-structured basis and will inductively show that all cardinal bases visited by the algorithm satisfy it. This structure of the cardinal basis is helpful in bounding the number of iterations of the algorithm.
Definition 26.
Let be a feasible cardinal basis and be the directed tree corresponding to . Let be the extreme point associated with . Let . We say that is an -nice basis if the following properties hold:
-
1.
Let , and be the -path from to . Then, is -augmenting.
-
2.
.
-
3.
Let . Let be the subgraph of with exactly two connected components (in the undirected sense). Denote by the partition of vertices into two components such that and . If an arc has its end vertices in and , then . In other words, the removal of each arc from partitions into the same sets as the removal of the same arc from .
See Figure 3 for an illustration of an -nice basis. The following lemma is the key observation that allows us to bound the number of iterations in the algorithm. The proof of the third property in the lemma relies on Lemma 25.
Lemma 27.
Let be a Scarf pair and consider the iteration . Suppose is the entering column of the cardinal pivot, is the leaving column of the cardinal pivot, and is the entering column of the ordinal pivot. Let be the separator of . Suppose is an -nice basis and . Then, we have the following:
-
1.
Let . Then, (recall that is the unique arc entering in ). In other words, and share the same tail. In addition, is the first arc in , where be the -path from to .
-
2.
.
-
3.
The separator of is for some .
-
4.
is an -nice basis.
We rewrite Scarf’s algorithm as a combination of Algorithm 2 (cardinal pivot) and Algorithm 3 (ordinal pivot). To prove Theorem 5, we verify that the initial cardinal basis an -nice basis, where is the separator of . By inductively applying Lemma 27, we have that every cardinal basis visited by the algorithm is a separator-nice basis, and every ordinal pivot increases the index of the separator. Since the index of the separator is bounded by , the number of iterations is at most . At a high level, the intuition is the following: The tree associated with arborescence hypergraphs has a unique source; the potential function we designed takes advantage of this fact, and the vertices of the hypergraph are organized to join the matching one by one according to the depth-first order, which only exists when the tree is an arborescence.
6 Non-integrality of the fractional stable matching polytope
A classical approach to stable matching problem in graphs is to describe the stable matching polytope [35], that is, find an exact description of the convex hull of all characteristic vectors of stable matchings. We construct a hypergraphic preference system where is an arborescence hypergraph, on which the above classical approach does not succeed. This result provides evidence that the problem we are interested in is challenging compared to the classical stable matching problems.
We first define
(4) |
and
(5) |
where and . We call the stable matching polytope of and the fractional stable matching polytope of . When is a bipartite graph, it is shown that (see, e.g., [35]). We show the following.
Theorem 28.
There is a hypergraphic preference system where is an arborescence hypergraph, such that the fractional stable matching polytope is not integral, thus .
Example 29.
Consider the hypergraph in Figure 4: Let where and . is an interval hypergraph. The preference list is as follows:
Let be such that , . Then, is an extreme point of , which is non-integral.
7 Conclusion
We showed that Scarf’s algorithm converges in polynomial time and returns an integral stable matching on arborescence hypergraphic preference systems. Our result is the first proof of polynomial-time convergence of Scarf’s algorithm on hypergraphic stable matching problems. We note that some of our results hold for hypergraphs that are more general than arborescence hypergraphs. It would be interesting to generalize our approach to show polynomial convergence of Scarf’s algorithm for more general classes of hypergraphs, such as network hypergraphs. It would also be insightful to interpret our implementation of Scarf’s algorithm for arborescence hypergraphs as a purely combinatorial algorithm, if any such interpretation exists.
References
- [1] Ron Aharoni and Tamás Fleiner. On a lemma of Scarf. Journal of Combinatorial Theory, Series B, 87(1):72–80, 2003. doi:10.1016/S0095-8956(02)00028-X.
- [2] Ron Aharoni and Ron Holzman. Fractional kernels in digraphs. J. Combinatorial Theory, 73(1):1–6, 1998. doi:10.1006/JCTB.1997.1731.
- [3] Ravindra K Ahuja, James B Orlin, Prabha Sharma, and PT Sokkalingam. A network simplex algorithm with o (n) consecutive degenerate pivots. Operations research letters, 30(3):141–148, 2002. doi:10.1016/S0167-6377(02)00114-1.
- [4] Mourad Baïou and Michel Balinski. The stable admissions polytope. Mathematical programming, 87:427–439, 2000. doi:10.1007/S101070050004.
- [5] Mourad Baïou and Michel Balinski. The stable allocation (or ordinal transportation) problem. Mathematics of Operations Research, 27(3):485–503, 2002. doi:10.1287/MOOR.27.3.485.310.
- [6] Dimitris Bertsimas and John N Tsitsiklis. Introduction to linear optimization, volume 6. Athena Scientific Belmont, MA, 1997.
- [7] Péter Biró, Gergely Csáji, and Ildikó Schlotter. Stable hypergraph matching in unimodular hypergraphs. arXiv preprint arXiv:2502.08827, 2025. doi:10.48550/arXiv.2502.08827.
- [8] Péter Biró and Tamás Fleiner. Fractional solutions for capacitated ntu-games, with applications to stable matchings. Discrete Optimization, 22:241–254, 2016. doi:10.1016/J.DISOPT.2015.02.002.
- [9] Péter Biró, Tamás Fleiner, and Robert W Irving. Matching couples with scarf’s algorithm. Annals of Mathematics and Artificial Intelligence, 77:303–316, 2016. doi:10.1007/S10472-015-9491-5.
- [10] Péter Biró, David F Manlove, and Iain McBride. The hospitals/residents problem with couples: Complexity and integer programming models. In Experimental Algorithms: 13th International Symposium, SEA 2014, Copenhagen, Denmark, June 29–July 1, 2014. Proceedings 13, pages 10–21. Springer, 2014. doi:10.1007/978-3-319-07959-2_2.
- [11] Karthekeyan Chandrasekaran, Yuri Faenza, Chengyue He, and Jay Sethuraman. Scarf’s algorithm on arborescence hypergraphs. arXiv preprint arXiv:2412.03397, 2024. doi:10.48550/arXiv.2412.03397.
- [12] Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2022.
- [13] Gergely Csáji. On the complexity of stable hypergraph matching, stable multicommodity flow and related problems. Theoretical Computer Science, 931:1–16, 2022. doi:10.1016/J.TCS.2022.07.025.
- [14] William H Cunningham. A network simplex method. Mathematical Programming, 11:105–116, 1976. doi:10.1007/BF01580379.
- [15] Piotr Dworczak. Deferred acceptance with compensation chains. In Proceedings of the 2016 ACM Conference on Economics and Computation, pages 65–66, 2016. doi:10.1145/2940716.2940727.
- [16] Yuri Faenza, Chengyue He, and Jay Sethuraman. Scarf’s algorithm and stable marriages. Mathematics of Operations Research, 2025. Accepted for publication. doi:10.1287/moor.2023.0055.
- [17] Tamás Fleiner. A fixed-point approach to stable matchings and some applications. Mathematics of Operations research, 28(1):103–126, 2003. doi:10.1287/MOOR.28.1.103.14256.
- [18] Delbert Fulkerson and Oliver Gross. Incidence matrices and interval graphs. Pacific journal of mathematics, 15(3):835–855, 1965.
- [19] David Gale and Lloyd S Shapley. College admissions and the stability of marriage. The American Mathematical Monthly, 69(1):9–15, 1962.
- [20] Penny E Haxell and Gordon T Wilfong. A fractional model of the border gateway protocol (bgp). In Proceedings of the nineteenth annual ACM-SIAM symposium on Discrete algorithms, pages 193–199. Citeseer, 2008. URL: http://dl.acm.org/citation.cfm?id=1347082.1347104.
- [21] Takashi Ishizuka and Naoyuki Kamiyama. On the complexity of stable fractional hypergraph matching. In 29th International Symposium on Algorithms and Computation (ISAAC 2018). Schloss-Dagstuhl-Leibniz Zentrum für Informatik, 2018.
- [22] Shiva Kintali, Laura J Poplawski, Rajmohan Rajaraman, Ravi Sundaram, and Shang-Hua Teng. Reducibility among fractional stability problems. SIAM Journal on Computing, 42(6):2063–2113, 2013. doi:10.1137/120874655.
- [23] Donald Ervin Knuth. Marriages stables. Technical report, 1976.
- [24] Cheng Ng and Daniel S Hirschberg. Three-dimensional stabl matching problems. SIAM Journal on Discrete Mathematics, 4(2):245–252, 1991. doi:10.1137/0404023.
- [25] Hai Nguyen, Thành Nguyen, and Alexander Teytelboym. Stability in matching markets with complex constraints. Management Science, 67(12):7438–7454, 2021. doi:10.1287/MNSC.2020.3869.
- [26] Thanh Nguyen and Rakesh Vohra. Near-feasible stable matchings with couples. American Economic Review, 108(11):3154–3169, 2018.
- [27] Thành Nguyen and Rakesh Vohra. Stable matching with proportionality constraints. Operations Research, 67(6):1503–1519, 2019. doi:10.1287/OPRE.2019.1909.
- [28] Adèle Pass-Lanneau, Ayumi Igarashi, and Frédéric Meunier. Perfect graphs with polynomially computable kernels. Discrete Applied Mathematics, 272:69–74, 2020. doi:10.1016/J.DAM.2018.09.027.
- [29] Alvin E Roth. Online and matching-based market design. Cambridge University Press, 2023.
- [30] Alvin E Roth, Uriel G Rothblum, and John H Vande Vate. Stable matchings, optimal assignments, and linear programming. Mathematics of operations research, 18(4):803–828, 1993. doi:10.1287/MOOR.18.4.803.
- [31] Uriel G Rothblum. Characterization of stable matchings as extreme points of a polytope. Mathematical Programming, 54:57–67, 1992. doi:10.1007/BF01586041.
- [32] Herbert E Scarf. The core of an n person game. Econometrica: Journal of the Econometric Society, pages 50–69, 1967.
- [33] Alexander Schrijver. Theory of linear and integer programming. John Wiley & Sons, 1998.
- [34] Alexander Schrijver et al. Combinatorial optimization: polyhedra and efficiency, volume 24. Springer, 2003.
- [35] Chung-Piaw Teo and Jay Sethuraman. The geometry of fractional stable matchings and its applications. Mathematics of Operations Research, 23(4):874–891, 1998. doi:10.1287/MOOR.23.4.874.