Top Trading Cycles (TTC) solves the house allocation problem: each person owns a house and has preferences over all houses. TTC finds a Pareto-efficient, individually rational, strategy-proof allocation through elegant cycle detection.
While unmatched people remain:
1. Each person points to the owner
of their most-preferred
remaining house
2. Find all directed cycles
(at least one must exist)
3. Execute each cycle: every
person in the cycle gets the
house they pointed to
4. Remove matched people & houses
Repeat.
| Person | Owns | Preference Order |
|---|---|---|
| 1 | H1 | H3 > H2 > H4 > H5 > H6 > H1 |
| 2 | H2 | H1 > H3 > H4 > H5 > H6 > H2 |
| 3 | H3 | H2 > H1 > H4 > H5 > H6 > H3 |
| 4 | H4 | H6 > H5 > H1 > H2 > H3 > H4 |
| 5 | H5 | H4 > H6 > H1 > H2 > H3 > H5 |
| 6 | H6 | H5 > H4 > H1 > H2 > H3 > H6 |
Shapley & Scarf (1974) — House Allocation via Cycle Detection