---
title: Inverse Top Trading Cycles Enumeration Algorithm (ITEA)
url: https://www.emergentmind.com/topics/inverse-top-trading-cycles-enumeration-algorithm-itea
type: topic
---

# Inverse Top Trading Cycles Enumeration Algorithm (ITEA)

The Inverse Top Trading Cycles Enumeration Algorithm (ITEA) is an algorithmic framework for efficiently enumerating the complete set of Pareto-optimal (PO) allocations in one-sided matching problems with ordinal preferences. These problems, typified by the house-allocation model, have a set of agents and a set of indivisible objects (such as rooms or houses), where each agent possesses a strict preference ordering over the objects. While the classical Top Trading Cycles (TTC) mechanism yields a PO allocation from any initial endowment, it does not capture the full structure of the Pareto frontier, as many initial endowments can converge to the same PO allocation, and multiple distinct PO allocations may coexist. ITEA addresses the computational and conceptual limitations of brute-force approaches by partitioning the space of initial allocations into equivalence classes defined by the TTC mapping, systematically inverting this mapping to discover all PO allocations with improved efficiency and provable guarantees [2604.21306].

## 1. One-Sided Matching and Pareto-Optimality

One-sided matching (house-allocation) problems involve a tuple $\mathcal H = (\mathcal N, \mathcal R, \mathcal O)$:
- $\mathcal N = \{1, \dots, n\}$: set of agents.
- $\mathcal R = \{r_1, \dots, r_n\}$: set of indivisible objects.
- $\mathcal O = (\succ_i)_{i \in \mathcal N}$: agents' strict, ordinal preference profiles over $\mathcal R$.

An allocation (matching) is a bijection $\sigma: \mathcal N \leftrightarrow \mathcal R$, with $\mathcal A$ denoting the set of all such bijections ($|\mathcal A| = n!$). A matching $\sigma$ is Pareto-optimal if there is no other allocation $\sigma'$ such that all agents weakly prefer their allocation in $\sigma'$ and at least one strictly prefers it:
\[
\forall\,i:\;\sigma'(i)\succeq_i \sigma(i)
\quad\text{and}\quad
\exists\,j:\;\sigma'(j)\succ_j \sigma(j).
\]
The set of PO allocations is denoted $\mathcal P \subseteq \mathcal A$.

## 2. The Top Trading Cycles Mechanism and Equivalence Classes

For any initial allocation $\sigma \in \mathcal A$, the TTC algorithm produces a unique PO outcome $f(\sigma) = \mathrm{TTC}(\sigma) \in \mathcal P$. However, many initial allocations can be mapped to the same PO allocation; the preimage $f^{-1}(p) = \{\sigma \in \mathcal A \mid f(\sigma) = p\}$ is the equivalence class of endowments converging to $p$. This many-to-one mapping implies a non-trivial structure to the Pareto frontier that single TTC runs do not reveal.

## 3. Algorithmic Structure of ITEA

The brute-force approach enumerates all $n!$ initial allocations, applying TTC to each and collecting all unique outputs ($O(n! \, T_{\mathrm{TTC}})$ operations, where $T_{\mathrm{TTC}}$ is the cost per TTC run). ITEA dramatically reduces redundant computations by:
- Maintaining a scan set initialized as $\mathcal A$.
- Iteratively selecting representatives from unexplored allocations, running TTC to obtain a PO allocation $p$.
- For each new PO allocation, inverting TTC to find the entire equivalence class $f^{-1}(p)$ via the dressup and devour routines.
- Removing all of $f^{-1}(p)$ from the scan set, ensuring each initial allocation is processed exactly once.

The inversion process leverages a labeling scheme for objects (rooms): each is tagged as unmarked ($\ell_j = -1$), circle ($\ell_j = 0$), or square ($\ell_j = 1$), depending on their role in the reconstruction of initial endowments. Dressup marks each agent’s top choice among non-fixed rooms as circles; devour recursively enumerates all orderings and promotions of circles to squares, systematically reconstructing every initial allocation in the equivalence class.

## 4. Formal Guarantees: Soundness and Completeness

ITEA is provably sound and complete:
- **Soundness:** Every allocation $\sigma'$ output in the inverse step for outcome $p$ satisfies $f(\sigma') = p$. Backward induction through TTC rounds shows that the labeling and recursive permutations in devour correctly reproduce the preimages of $p$.
- **Completeness:** Every initial endowment $\sigma'$ with $f(\sigma') = p$ is generated. By reversing the cycles of forward TTC, ITEA reconstructs all such allocations recursively via dressup and devour. These results guarantee the exhaustive and non-redundant enumeration of the entire set of PO allocations.

## 5. Computational Complexity and Empirical Performance

ITEA's performance depends on the interplay between $n!$, the full set of allocations, and $|\mathcal P|$, the number of PO outcomes. Its total time complexity is:
\[
T_{\mathrm{ITEA}}(n) = O\bigl(|\mathcal P|\,T_{\mathrm{TTC}}\bigr) + O(n! \, n^2)
\]
- Forward TTC calls: one per distinct $p_i \in \mathcal P$, each with cost $T_{\mathrm{TTC}}$, yielding $O(|\mathcal P| \, T_{\mathrm{TTC}})$.
- Inverse enumeration (devour/dressup): processes each of the $n!$ labeled states in $O(n^2)$ time, for $O(n! \, n^2)$ overall.
In contrast, brute-force enumeration's complexity is $O(n! \, T_{\mathrm{TTC}})$. The computational advantage of ITEA increases with smaller $|\mathcal P|$ compared to $n!$—typical for random preference profiles, where for $n=9$, experimental results show $|\mathcal P| \approx 486 \ll 9! = 362{,}880$, enabling almost 750-fold reduction in TTC calls. In the worst case, where $|\mathcal P| = n!$, the savings vanish, and cost matches brute-force.

## 6. Illustrative Example and Mechanism Interpretation

Consider $n=3$ agents and rooms, with preference orders:
- $1: r_2 \succ_1 r_1 \succ_1 r_3$
- $2: r_1 \succ_2 r_3 \succ_2 r_2$
- $3: r_3 \succ_3 r_2 \succ_3 r_1$

All possible $3! = 6$ initial allocations are partitioned under TTC into two PO outcomes $p^1$ and $p^2$. ITEA runs TTC on a representative $\sigma$ for $p^1$, then uses dressup and devour to construct all $\sigma'$ with $f(\sigma') = p^1$, permuting and fixing the assigned rooms in a manner reflecting the cycles eliminated in the forward TTC. After enumerating and removing these, the process repeats for remaining unexplored allocations, ensuring no redundant TTC computations and a systematic recovery of the entire Pareto frontier.

## 7. Applications and Relevance

ITEA provides a rigorous and computationally tractable method for determining the full Pareto frontier in house-allocation and related one-sided matching settings. By characterizing all PO allocations, the algorithm enables subsequent secondary optimization for criteria such as fairness and welfare, which would be infeasible using only single TTC outcomes. Its performance benefits are especially pronounced in typical, randomly structured preference profiles, which arise in practical applications ranging from resource and facility assignments to distributed pooling systems [2604.21306].

| Component           | Role in ITEA                          | Complexity per Use |
|---------------------|---------------------------------------|------------------|
| TTC                 | Computes unique PO allocation         | $O(n^3)$ (list-based); $O(n^2)$ (pointer-based) |
| dressup             | Marks agents' top eligible rooms      | $O(n^2)$         |
| devour              | Recursively reconstructs preimages    | $O(n^2)$ per call |

ITEA thus systematically partitions all $n!$ initial endowments into disjoint TTC-equivalence classes, running TTC only once per class, and inverting the mechanism to recover every initial allocation in that class. It achieves provable soundness and completeness, factorial worst-case complexity, and typical speed-ups of orders of magnitude, enabling comprehensive Pareto frontier characterizations for secondary optimization and principled analysis in one-sided matching problems [2604.21306].

Source: https://www.emergentmind.com/topics/inverse-top-trading-cycles-enumeration-algorithm-itea