Housing market
The basic TTC algorithm is illustrated by the following house allocation problem. There are students living in the student dormitories. Each student lives in a single house. Each student has a preference relation on the houses, and some students prefer the houses assigned to other students. This may lead to mutually-beneficial exchanges. For example, if student 1 prefers the house allocated to student 2 and vice versa, both of them will benefit by exchanging their houses. The goal is to find a core-stable allocation – a re-allocation of houses to students, such that all mutually-beneficial exchanges have been realized (i.e., no group of students can together improve their situation by exchanging their houses). The algorithm works as follows. # Ask each agent to indicate his "top" (most preferred) house. # Draw an arrow from each agent to the agent, denoted , who holds the top house of . # Note that there must be at least one cycle in the graph (this might be a cycle of length 1, if some agent currently holds his own top house). Implement the trade indicated by this cycle (i.e., reallocate each house to the agent pointing to it), and remove all the involved agents from the graph. # If there are remaining agents, go back to step 1. The algorithm must terminate, since in each iteration we remove at least one agent. It can be proved that this algorithm leads to a core-stable allocation. For example, suppose the agents' preference ordering is as follows (where only the at most 4 top choices are relevant): In the first iteration, the only top-trading-cycle is (it is a cycle of length 1), so agent 3 keeps his current house and leaves the market. In the second iteration, agent 1's top house is 2 (since house 3 is unavailable). Similarly, agent 2's top house is 5 and agent 5's top house is 1. Hence, is a top-trading-cycle. It is implemented: agent 1 gets house 2, agent 2 gets house 5 and agent 5 gets house 1. These three agents leave the market. In the third iteration, the top-trading-cycle is, so agents 4 and 6 exchange their houses. There are no more agents left, so the game is over. The final allocation is: This allocation is core-stable, since no coalition can improve its situation by mutual exchange. The same algorithm can be used in other situations, for example: suppose there are 7 doctors that are assigned to night-shifts; each doctor is assigned to a night-shift in one day of the week. Some doctors prefer the shifts given to other doctors. The TTC algorithm can be used here to attain a maximal mutually-beneficial exchange.Properties
TTC is aPreferences with indifferences
The original TTC algorithm assumed that the preferences are strict, so that each agent always has a single top house. In realistic settings, agents may be indifferent between houses, and an agent may have two or more top houses. Several different algorithms have been suggested for this setting. They were later generalized in several ways. The general scheme is as follows. # Ask each agent to indicate ''all'' his top houses. # Construct the ''TTC-graph G'': a directed graph in which each agent points to ''all'' agents who hold his top houses. # Repeat: #* Analyze the strongly connected components of ''G''. #* Identify the ''sinks'' - the components with no outgoing edges (there is at least one). #* Identify the ''terminal sinks'' - the sinks in which each agent owns one of his top choices. #** If there are no terminal sinks - break and go to step 4. #** Otherwise, for each terminal sink ''S'': permanently assign each agent in ''S'' to his current house, remove them from the market, update the TTC graph, and go back to step 3. # Select a set of disjoint trading cycles, using a pre-determined selection rule. Implement the trade indicated by these cycles, and remove them from the market. # If there are remaining agents, go back to step 1. The mechanisms differ in the selection rule used in Step 4. The selection rule should satisfy several conditions: * Uniqueness: the rule selects, for each agent, a unique house from among his top houses. * Termination: the algorithm using the rule is guaranteed to terminate. * Persistence: in the reduced graph obtained by the rule, each directed path ending at an unsatisfied agent ''i'' (an agent who does not hold a top house) is ''persistent'' - the path remains in the graph until agent ''i'' leaves the market or trades his house. * Independence of unsatisfied agents: if agent ''i'' is unsatisfied, and two TTC graphs only differ in the edges outgoing from ''i'', then the reduced TTC graphs only differ in the edge outgoing from ''i''. If the selection rule satisfies Uniqueness and Termination, the resulting mechanism yields an allocation that is Pareto-efficient and in the ''weak core'' (no subset of agents can get a strictly better house for all of them by trading among themselves). Weak core also implies that it is individually-rational. If, in addition, the selection rule satisfies Persistence, Independence of unsatisfied agents, and some other technical conditions, the resulting mechanism isOther extensions
The TTC algorithm has been extended in various ways. 1. A setting in which, in addition to students already living in houses, there are also new students without a house, and vacant houses without a student.. See alsImplementation in software packages
* R: The Top-Trading-Cycles algorithm for the housing market problem is implemented as part of thematchingMarkets
package.
* See also
* Exchange economy * Housing marketReferences
{{reflist Fair item allocation Game theory Matching (graph theory)