---
title: Almost-Stable Matching Problems
url: https://www.emergentmind.com/topics/almost-stable-matching-problems
type: topic
---

# Almost-Stable Matching Problems

Almost-stable matching problems address the computation and analysis of matchings that relax strict stability conditions, typically by allowing a bounded number or type of local instabilities. This concept is central in matching theory, especially in practical settings where exact stability is infeasible due to computational constraints, market structure, preference distributions, or the presence of global or combinatorial constraints. The recent literature provides a comprehensive taxonomy, complexity landscape, and algorithmic toolkit for various almost-stable matching notions, including aggregate, distributional, approximate, and parameterized frameworks.

## 1. Definitions and Taxonomy of Almost-Stable Matching

At the core, a stable matching instance (bipartite or nonbipartite) is specified by a set of agents with preferences (strict, weak, or cardinal) over a subset of potential partners. A matching is stable if there are no blocking pairs—pairs where both agents strictly prefer each other to their assigned partners.

Almost-stable matching problems generalize this as follows ([2508.10129], [2601.14195], [2601.18573], [1602.01956]):

- **Bounded instability (blocking pairs):** Seek a matching admitting at most $k$ blocking pairs ($\min \beta(M)$ for a matching $M$).
- **Size-stability trade-off:** Maximize the cardinality of a matching subject to a bound on blocking pairs, or given $k$, find the largest $M$ with $\beta(M) \leq k$ ([2005.08150]).
- **Distributional (minimax) instability:** Minimize the maximum number of blocking pairs involving any agent, i.e., $\min_M \max_i b(i)$, where $b(i)$ is the count for agent $i$ ([2601.14195]).
- **Weak stability (subsample of agents):** Require that only a specified subset of deviators be protected from blocks, with others conforming regardless ([2601.18573]).
- **$\varepsilon$-stable or approximately stable:** For cardinal and/or feasibility-constrained settings, allow deviations only if a group can achieve an improvement by more than a factor $\alpha$ or $\varepsilon$ ([1907.04163], [1902.06698]).
- **Incremental almost-stable matching:** Given a stable matching $M_1$ for input $\mathcal{P}_1$, compute $M_2$ stable or nearly stable for modified input $\mathcal{P}_2$, while minimizing $\lvert M_1 \bigtriangleup M_2 \rvert$ and/or the number of blocking pairs ([2112.05777]).

These forms reflect both aggregate and agent-centric notions, and their tractability and approximation properties vary substantially across models.

## 2. Complexity and Inapproximability Results

The computational complexity of almost-stable problems depends acutely on:

- **Metric:** Whether minimizing the total number of blocking pairs, the number of agents with at least one block (blocking agents), the maximally blocked agent, or limiting instability to specified agents.
- **Instance structure:** Bipartite vs nonbipartite, strict vs weak/partial orders, presence of ties, cardinal vs ordinal preferences, and constraints (e.g., matroids, knapsacks).
- **Parameterizations:** Size of allowed instability, matching cardinality, number of ties, or structural parameters.

The principal negative results include:

- **Blocking pair minimization:** Both the stable marriage (SMI) and the stable roommates (SRI) versions of $\min \beta(M)$ are NP-hard and W[1]-hard parameterized by $\beta$, even for small $\beta$, and are inapproximable to any $f(\beta)$-factor for any computable function $f$ unless W[1]=FPT ([2508.10129]).
- **Minimax instability:** Deciding if there exists a matching where every agent is in at most $k$ blocking pairs is NP-complete for $k=1$ in both SR and maximum-cardinality SM, already for bounded (constant) preference list length. No $2-\epsilon$ approximation is possible unless P=NP ([2601.14195]).
- **Deviator-stable matching:** If only a subset of agents are potential deviators, it remains NP-complete to decide whether there is a matching with no blocking deviators, both for nonbipartite and bipartite cases, even with list length constraints (at most 3) ([2601.18573]).
- **Parameterization by size or difference:** Parameterized complexity results show W[1]-hardness, e.g., for the problem of finding a matching larger than the maximum stable matching by $t$ and with at most $k$ blocking pairs, parameterized by $k+t+d$ ([2005.08150]). For incremental models, NP-hardness and W[1]-hardness persist when parameterizing by the allowed change and number of blocking pairs ([2112.05777]).
- **Max-SMTI with ties:** Maximizing the size of a stable matching in SMTI is NP-hard to approximate better than $29/33$ and W[1]-hard parameterized by number of agents with ties ([2508.10129], [2208.09583]).
- **Three-dimensional matching:** In both 3GSM (Three-Gender Stable Marriage) and 3PSA (Three Person Stable Assignment), deciding existence of a stable matching is NP-complete, and both maximally stable matching and maximum stable submatching are APX-hard ([1412.1130]).

## 3. Algorithmic Positive Results and Approximation Schemes

Despite strong intractability, certain cases and relaxations admit nontrivial polynomial-time or parameterized solutions:

- **Distributed constant-time approximations:** For bounded-degree graphs, a truncated Gale–Shapley process yields $\varepsilon$-stable matchings (number of blocking pairs within $\varepsilon$ times the matching size) in $O(\Delta^2/\epsilon)$ time ([0812.4893]). For unbounded degree, subpolynomial-round deterministic and randomized distributed algorithms achieve similar bounds ([1408.2782]).
- **Parameter-tractable and local-search FPT:** The local-search variant of ASM (almost-stable marriage), where the matching is at most $q$ away from a stable matching and at most $k$ blocking pairs are allowed, admits $2^{O(q \log d)} n^{O(1)}$ FPT solutions ([2005.08150]).
- **Incremental and minimally invasive stability:** If the allowed matching change is $k$ and the number of blocking pairs $b$ is fixed, problems like IASM/IHR-T admit XP or FPT-algorithms in special cases, especially when parameterized by agent-type count or the number of residents ([2112.05777]).
- **Fractional and approximate stability:** With cardinal utilities and fractional matchings, computing an $\varepsilon$-stable matching with welfare $\varepsilon$-fraction of optimum is polynomial-time tractable ([1902.06698]). Polytime 2-stable fractional matchings always exist with optimal welfare.
- **General constraints and packing:** For submodular/hard constraints, the α-stable matching paradigm leverages online packing algorithms: e.g., for $k$-matroid intersection, the greedy yields $k$-stable matchings ([1907.04163]).
- **Tractable cases for restricted lists:** Many models become polynomial if all lists have length at most 2 (e.g., minimax [2601.14195], MIN BP HRC [1602.01956], deviator-stability [2601.18573]).
- **FPT for Max-SMTI by ties:** Although Max-SMTI is hard in general, with only $\tau$ agents having ties, one can FPT-approximate the maximum stable size to any $1-\varepsilon$ fraction in $f(\varepsilon,\tau) n^{O(1)}$ time ([2508.10129]).

## 4. Fairness, Distribution, and Agent-Specific Instability

Recent frameworks extend almost-stability to protect or balance instability in a more agent-aware manner.

- **Minimax approach:** Minimize $\beta(M) = \max_i b(i)$, i.e., the worst-off agent's exposure to instability ([2601.14195]). This "fairness-oriented" approach leads to severe intractability: even deciding $\beta(M)\leq 1$ is NP-complete for both SR and SM with bounded lists.
- **Deviator-conformist models:** Given a set of deviators $D$ (agents who may initiate blocks) and conformists $C$, aim for $M$ such that $bp_D(M)=\varnothing$ (no blocking pair involves a deviator), or with limited exceptions. This model interpolates between classical full-agent and completely weak stability and is NP-complete for $k=0$, but FPT-tractable parameterized by $|D|$ and block count ([2601.18573]).
- **Incremental minimal change vs. blocking-pair trade-off:** Allowing a few blocking pairs drastically decreases the number of matching changes needed after preference perturbations ([2112.05777]).
- **Maximum number of agents in blocks:** In hospital-residents/couples, optimization may target minimizing the number of involved agents, not blocking pairs ([1602.01956]).

## 5. Methodologies and Mathematical Programming

Various mathematical and algorithmic frameworks support almost-stable matching computation:

- **Integer/Constraint Programming:** Expressing almost-stable objectives through binary variables encoding assignments and blocking pairs enables exact IP/CP models for both bipartite and nonbipartite settings ([1602.01956], [2601.14195]), with symmetry-breaking and efficient presolve yielding tractability for moderate-size real-world instances.
- **Distributed/local algorithms:** Quantile-based proposals, randomized maximal matching, and truncate-and-prune strategies yield efficient distributed protocols ([1408.2782], [0812.4893]).
- **Online and packing reductions:** For complex constraints, mapping stability to competitive online (cardinal) packing or matroid kernel optimization enables the design and analysis of scalable approximation algorithms ([1907.04163], [2208.09583]).
- **Reduction to weighted stable marriage:** Incremental and change-limited variants are reduced to weighted SM and solved via specific polynomial-time algorithms ([2112.05777]).
- **Fractional relaxations:** LP relaxations and their integrality gaps are tight for particular preference classes; in interval orders the gap is 1.5, while with arbitrary partials it's 2 ([2208.09583]).

## 6. Applications, Empirical Observations, and Open Questions

Almost-stable matching concepts are motivated by and applicable to a range of real-world allocation and market-design settings:

- **Practical matching markets:** Empirical studies show that even highly constrained hospital/residents/couples markets (HRC) with random or real-world-like preferences are almost entirely stable, with solutions typically admitting at most 1-2 blocking pairs, and exact/incremental matching change is minimized by tolerating even a small fraction of instability ([1602.01956], [2112.05777]).
- **Three-dimensional extension:** The absence of guaranteed stability in 3GSM and 3PSA exposes the need to optimize for maximally stable matchings, typically via greedy approximation (4/9-stable in $O(n^7)$ time) ([1412.1130]).
- **Dynamic and evolving preferences:** In dynamic models where preference lists evolve, continuous Gale–Shapley–like processes maintain an $O((\log n)^2)$-almost-stable matching despite adversarial random perturbations ([1509.01988]).
- **Distributed systems:** Local information and bounded communication suffice for almost-stable matching in large-scale networks ([0812.4893]).
- **Open questions:** Includes the precise tractability boundary for minimax and deviator-stability as list lengths vary; the existence of better approximation or FPT algorithms for these and related objectives; and scaling CP/IP and matroidal methods to massive real-world market instances ([2601.14195], [2601.18573], [2112.05777], [2208.09583]).

## 7. Comparative Table of Core Models and Complexity

| Model/Class                            | Objective/Instability         | Tractability                                                                              | References                  |
|----------------------------------------|------------------------------|-------------------------------------------------------------------------------------------|-----------------------------|
| Min BP-SMI / Min BP-SRI                | Total blocking pairs ($\beta$)| NP-hard, W[1]-hard in $\beta$; no FPT approx in $\beta$                                   | [2508.10129], [2005.08150]  |
| Minimax (max agent blocks)             | $\max_i b(i)$                | NP-complete for $k=1$; linear-time for list length $\leq 2$; $\lceil d/2\rceil$-approx    | [2601.14195]                |
| Deviator-Stability                     | Blockers only in $D$         | NP-complete for $k=0$; FPT in $|D|$ and $k$; linear-time for list length $\leq 2$          | [2601.18573]                |
| Max-SMTI (with ties)                   | Maximum size, stable         | NP-hard to $29/33$, W[1]-hard by ties, FPT-AS for $\tau$ ties                             | [2508.10129], [2208.09583]  |
| Approximate/Fractional/ε-stable        | $\varepsilon$-stability      | Fractional: polytime for $\varepsilon$-stable; inapproximable for $\varepsilon$ below 0.03 | [1902.06698], [1907.04163]  |
| HRC MIN BP                            | Blocking pairs w/ couples    | NP-hard, inapproximable; polynomial for (2,1,2) lists                                      | [1602.01956]                |
| Incremental almost-stable              | Min adjustments + blocks     | W[1]-hard in $(k+b+\Delta)$, but empirical: small $b$ suffices to minimize adjustments    | [2112.05777]                |
| 3GSM, 3PSA                            | Max stable triples           | APX-hard, $\frac{4}{9}$-approx greedy in $O(n^7)$                                         | [1412.1130]                 |

These results chart a nuanced but sharply drawn frontier between tractable and intractable forms of almost-stable matching, and underline the importance of careful modeling choices in both theory and applied market design.

Source: https://www.emergentmind.com/topics/almost-stable-matching-problems