← Gallery

Rural Hospitals Theorem

Across ALL stable matchings, the set of matched participants and the number of filled positions at each hospital is identical. No mechanism design can fix rural hospital shortages.

The Theorem (Roth, 1986)

In any two stable matchings M and M', every hospital fills exactly the same number of positions. Any resident unmatched in one stable matching is unmatched in ALL stable matchings.

Algorithm Pseudocode
1. Run resident-proposing DA → M_R
2. Run hospital-proposing DA → M_H
3. These are the two extreme stable matchings
4. Compare filled positions at each hospital
5. Verify: counts are IDENTICAL

Instance Setup

Hospitals

HospitalQuotaTypeRanking
Urban A2UrbanR1 > R2 > R3 > R4 > R5
Suburban B2SuburbanR2 > R3 > R1 > R5 > R4
Rural C2RuralR3 > R5 > R4 > R1 > R2

Residents

ResidentPreferences
R1A > B > C
R2A > B > C
R3B > A > C
R4A > C > B
R5B > C > A

Event Log

Click "Find All Stable Matchings" to begin.

Policy Implication: To help Rural C, you must change the FUNDAMENTALS (pay, location, quality of life), not the algorithm. No stable matching mechanism can increase Rural C's fill rate.

Roth, A.E. (1986). "On the Allocation of Residents to Rural Hospitals: A General Property of Two-Sided Matching Markets." Journal of Economic Theory, 36, 277-288.

Stable Matchings

Hospital Fill Rates Across Stable Matchings

Each bar shows the number of filled positions. The Rural Hospitals Theorem guarantees these counts are invariant.

Matching Visualization