arXiv:2610.32793cs.GTOct 2026

Manuscript Offprint

arXiv:2610.32793

Capacity Modification for Matching with Couples: An Integer Programming and Computational Study

Zexiao Wu, Genjiu Xu, Péter Biró

Abstract

We study capacity modification in the Hospitals/Residents problem with Couples, in which hospital capacities and a stable matching are jointly determined. Exact and Cutoff integer programming formulations are developed for the resulting problem. We assume that, for each couple, either both members are matched or neither is. For arbitrary strict preferences, every instance admits a stable matching after changing each hospital capacity by at most two. Total capacity increases by at most one, and this bound is tight. Under sub-responsive and sub-complete couple preferences, a stable matching exists after adding at most one position to each hospital. The total number of additions is at most the number of couples, and this bound is also tight. Computational experiments show that Exact formulations are modestly faster at fixed capacities, whereas Cutoff formulations perform substantially better in the minimum repair experiments and attain higher completion rates in markets with up to 30,000 doctors. Across 96,000 synthetic and reconstructed markets, small capacity changes restore existence whenever no stable matching exists at the original capacities.

Keywords: Stable matching; Matching with couples; Capacity modification; Integer programming

1 Introduction

Most matching models treat capacities as exogenous, even though market organizers often determine them before or alongside the assignment process. This disconnect is especially consequential in residency matching and other centralized markets, where capacity decisions can determine whether a stable matching exists. Stability is a central design objective in these markets. It requires that no resident or couple can form a blocking coalition with one or more hospitals. In the classical Hospitals/Residents problem, deferred acceptance always yields a stable matching (Gale and Shapley, 1962). Couples invalidate this guarantee because they rank pairs of positions jointly. These complementarities are important in medical matching (Roth, 1984; Roth and Peranson, 1999), but they also create a fundamental difficulty: a stable matching may not exist, and deciding whether one exists is NP-complete (Ronn, 1990).

Capacity modification provides one way to restore existence. Nguyen and Vohra (2018) show that every market with couples admits a stable matching after changing each hospital capacity by at most two, while increasing total capacity by at most four. They also leave open whether the bound for each hospital can be reduced from two to one. Under sub-responsive and sub-complete couple preferences, Csáji et al. (2026) obtain this unit bound. Their stated guarantee permits both increases and reductions and does not provide an aggregate capacity bound. These results leave distinct questions when capacities may only increase or when total capacity must be preserved.

We study the Hospitals/Residents problem with Couples (HRC) under the stability concept of Biró et al. (2011), termed BIS-stability by Delorme et al. (2021). We distinguish three capacity policies. Under near feasible capacity modification, each hospital may gain or lose at most two positions while total capacity increases by at most one. Under balanced capacity modification, each hospital may gain or lose at most one position while total capacity

∗^{*}Corresponding author.

is preserved. Under unit capacity expansion, each hospital may gain at most one position and the total number of additions is limited by a budget. For all three policies, we ask whether stability can be restored and what the smallest modification is.

Our first contribution sharpens the near-feasibility guarantee of Nguyen and Vohra (2018). We assume that the two members of a couple are either jointly assigned to an acceptable hospital pair or both unmatched. Under this assumption, the result holds for arbitrary strict preferences. Each hospital capacity changes by at most two, as in their result, while total capacity increases by at most one rather than four. This bound is tight. A stable matching need not exist if total capacity must remain unchanged, even when each hospital capacity may change by at most two. The proof modifies their iterative-rounding argument at the step where the aggregate capacity constraint is discarded and uses the fact that every acceptable couple assignment occupies exactly two hospital positions. Capacity increases at some hospitals may be offset by reductions at others. We also provide a simple two-hospital counterexample showing that balanced unit modification does not guarantee the existence of a stable matching, even with a common master list and sub-responsive and sub-complete couple preferences.

Our second contribution is an existence guarantee for unit capacity expansion. Let CC denote the set of couples. Under sub-responsive and sub-complete couple preferences, stability can always be restored by adding at most one position to each hospital and at most ∣C∣|C| positions in total. The aggregate bound is tight even when all hospitals share a common master list and every acceptable couple assignment uses distinct hospitals. By sharpening the analysis of the Stable Fixtures rounding of Csáji et al. (2026), the stable matching and the required expansions can be found in time linear in the compact input size.

Our third contribution is an integer programming framework for jointly determining a stable matching and hospital capacities under the three policies. Starting from the fixed capacity formulation of Delorme et al. (2021), we develop integer programs for deciding existence and minimizing the required capacity modification under each policy. We extend the bounded capacity linearization used by Bobbio et al. (2026a) for markets without couples to all three types of blocking coalition in the stability definition. We also adapt the cutoff approach of Ágoston et al. (2022) to allow capacities to be decision variables. We prove that the Exact and Cutoff formulations yield exactly the same stable matchings and capacity vectors, both for fixed capacities and under each modification policy. Table 1 summarizes the resulting existence boundary. Write δh=qh′−qh\delta_h = q_h' - q_h and Δ(q′)=∑h∈Hδh\Delta(q') = \sum_{h \in \mathcal{H}} \delta_h.

Table 1: Existence boundary under capacity modification

Capacity limitsPreference domainExistence boundary
δh\delta_hΔ(q′)\Delta(q')
[-2, 2]0General HRCCounterexample [Proposition 4.3 (BIS, KPR, MM, NV)]
[0, 1]General HRCGuaranteed [Theorem 4.2 (BIS); tight by Proposition 4.3]
[0, 4]General HRCGuaranteed [Nguyen and Vohra (2018, Theorem 1) (BIS, NV)]
[-1, 1]0General HRCCounterexample [Counterexample 4.1 (BIS, KPR, MM, NV)]
UnrestrictedSub-responsive and sub-completeGuaranteed [Csáji et al. (2026, Theorem 3.1) (MM)]
UnrestrictedGeneral HRCOpen
[0, 1][0, |C|]Sub-responsive and sub-completeGuaranteed [Theorem 4.5 (BIS); tight by Proposition 4.6]
UnrestrictedGeneral HRCOpen

We complement these theoretical contributions with a computational study of formulation performance, scalability, and capacity modification. Our implementation reproduces all 360 archived outcomes reported by Delorme et al. (2021). Across 510 variants with strict preferences and fixed capacities, Exact and Cutoff return the same existence and maximum cardinality results, with Exact modestly faster. For minimum repair under balanced capacity modification and unit capacity expansion, Cutoff performs better under all four stability notions. Its advantage is largest under the MM and NV notions of stability, where mean running times fall by factors of 41 to 55. A separate scalability experiment considers 500 independently generated markets with 100 to 30,000 doctors. Under a 600-second limit shared by the fixed capacity and minimum repair stages, Cutoff completes 93.4%93.4\% of the balanced modification procedures and 95.4%95.4\% of the unit expansion procedures. The corresponding rates for Exact are 71.4%71.4\% and 72.2%72.2\%.

The capacity experiments consider 84,000 markets with n=100n = 100 and 12,000 reconstructed markets with n=500n = 500. At the original capacities, 10,640 markets in the first sample and 2,190 markets in the second sample do not admit a stable matching. Unit expansion repairs all 12,830 markets, and one added position is sufficient in 96.4%96.4\% of them. Balanced modification repairs all but 19 markets, all of which belong to the n=100n = 100 sample. In these markets, allowing each hospital to gain or lose up to two positions restores stability in all 10,640 markets without changing total capacity. Among the 60,000 markets whose total capacity equals the number of doctors, all 6,087 markets without a stable matching at the original capacities are repaired by a single balanced transfer. For markets that are stable at the original capacities, unit expansion also increases maximum matching cardinality, although the improvement becomes smaller as the budget grows. These results do not provide a general guarantee, but they suggest first considering a small capacity reallocation when total capacity is sufficient and adding positions only when necessary.

The remainder of the paper is organized as follows. Section 2 reviews the related literature, and Section 3 introduces the HRC model. Section 4 presents the structural results, and Section 5 develops the integer programming models. Section 6 gives the cutoff formulations, and Section 7 reports the computational study.

References (33)