Top-Trading-Cycles algorithm for the housing market problem is implemented as part of the matchingMarkets package. API: The MatchingTools API provides a free application programming interface for the Top-Trading-Cycles algorithm. See also Exchange economy Housing market References Fair item allocation Game theory Matching (graph theory)