# online_housing_market__e552fd9f.pdf Online Housing Market Julien Lesca Universit e Paris-Dauphine, PSL, CNRS, LAMSADE julien.lesca@dauphine.fr We study an online variant of the celebrated housing market problem, where each agent owns a single house and seeks to exchange it based on her preferences. In this online setting, agents may arrive and depart at any time, meaning not all agents are present in the housing market simultaneously. We extend the well-known serial dictatorship and top trading cycle mechanisms to the online scenario, aiming to retain their desirable properties, such as Pareto efficiency, individual rationality, and strategy-proofness. These extensions also seek to prevent agents from strategically delaying their arrivals or advancing their departures. We demonstrate that achieving all these properties simultaneously is impossible and present several variants that achieve different subsets of these properties. 1 Introduction Allocating indivisible resources to agents is a fundamental problem in computational social choice, situated at the intersection of economics [Thomson, 2011] and computer science [Klaus et al., 2016; Manlove, 2013]. The decision-maker in such problems must account for both the preferences of the agents over the resources and their strategic behavior. In this paper, we focus on a specific problem known as the housing market in the matching theory literature [Shapley and Scarf, 1974], where each agent is endowed with a single resource they are willing to exchange for another. Additionally, we assume that no monetary compensation is allowed to offset any unfavorable exchanges during the process. Despite its simplicity, this problem has numerous applications, including the exchange of dormitory rooms among students [Chen and S onmez, 2002], the trade of used items [Swapz, 2025], kidney exchanges where incompatible donor/recipient pairs exchange organs for transplants [Ferrari et al., 2015], and more (see, e.g., [Bir o, 2017] for additional applications). In this paper, we assume that preferences over resources are ordinal. The procedure for reallocating resources among agents is centralized, with the decision-maker aiming to produce an allocation that is as efficient as possible. Under ordinal preferences, Pareto optimality serves as an appropriate efficiency measure, seeking allocations where no agent can be made better off without disadvantaging another. In the standard offline setting, this requirement can be met using the serial dictatorship procedure, also known as the picking sequence [Bouveret and Lang, 2014]. In this procedure, agents are arranged in a specific order, and each agent, one by one, selects their most preferred resource from the pool of remaining resources. However, this process is not individually rational, as some agents may end up with resources less desirable than their initial endowments. This is problematic, as agents might be discouraged from participating in the trade to avoid being worse off. The well-known Gale s top trading cycle (TTC) procedure [Shapley and Scarf, 1974] addresses this issue by ensuring individual rationality while producing a Pareto-optimal allocation. Since the procedure is centralized, the decision maker must interact with agents to gather their preferences over resources. However, during this process, agents may misreport their preferences in an attempt to manipulate the procedure and achieve a more favorable outcome. Mechanism design seeks to create procedures where truthfully revealing preferences is a dominant strategy for agents[Hurwicz and Reiter, 2006]. Both the serial dictatorship and TTC procedures possess this property. Moreover, it has been proven that the TTC procedure is the only mechanism that is simultaneously individually rational, Pareto efficient, and strategy-proof[Ma, 1994]. The standard offline setting assumes that all agents participating in the exchange are available at the same time, and that the exchange procedure is conducted during this period. However, in many contexts, this requirement is unrealistic or too demanding. In more realistic scenarios, agents are only available during restricted time periods, meaning that some may not be able to participate in the exchange simultaneously. This is the case, for example, with online exchange websites[Swapz, 2025], where agents do not arrive at the marketplace at the same time and cannot remain indefinitely before their swaps take place. This type of scenario is referred to as online[Albers, 2003], or dynamic, in the context of matching[Baccara and Yariv, 2021]. Outline. Section 2 lists related works connected to the online problem under consideration. Section 3 defines the main properties we aim to achieve. Section 4 presents online mechanisms based on the serial dictatorship procedure, while Section 5 introduces multiple online variants of the TTC procedure. Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence (IJCAI-25) 2 Related Works Multiple social choice problems have been examined through the lens of online procedures. In fair division, which aims to allocate resources fairly, several online variants have been explored[Aleksandrov and Walsh, 2020; Sankar et al., 2021; Hosseini et al., 2024]. For instance, strategy-proofness and Pareto efficiency have been studied in this context[Aleksandrov et al., 2015], along with envy-freeness. Various extensions of the serial dictatorship procedure have been proposed to achieve these properties[Aleksandrov and Walsh, 2019]. The online electric vehicle charging problem[Gerding et al., 2019], which focuses on scheduling charging for customers arriving in an online fashion, also shares similarities with our problem. However, in both cases, the online setting differs from ours, as resources do not arrive dynamically and are known to the procedure from the outset. Closer to our setting, as it addresses a one-to-one matching problem, an online version where preferences are elicited incrementally by querying agents has been considered[Hosseini et al., 2021]. A procedure that elicits preferences to achieve Pareto-optimality while minimizing the number of queries has been proposed. Numerous works have focused on dynamic kidney exchange[ Unver, 2010; Ashlagi and Roth, 2021], where donors and recipients arrive in an online fashion. Most of these studies consider compatibility (0-1 preferences) rather than ordinal preferences. Additionally, they often assume that the allocation process can be probabilistic, rely on probabilistic assumptions about arrivals and departures, and aim to reduce the expected waiting time before a transplant[Bloch and Cantala, 2017; Anderson et al., 2017; Baccara et al., 2020]. Other studies focus on maximizing the expected number of matched pairs[Awasthi and Sandholm, 2009; Dickerson et al., 2012]. The design of strategy-proof and individually rational mechanisms has also been considered for transplant centers participating in national exchange programs[Ashlagi et al., 2015; Hajaj et al., 2015]. 3 Preliminary Let N = {1, . . . , n} denote the set of agents. Each agent i owns a single good1 ei, called her initial endowment. Let T = [t , t+] denote the timeline during which the market is open, where t and t+ represent the opening and closing times, respectively. For each agent i, ai and di represent her (earliest) arrival and (latest) departure times in the market, with ai, di T such that t ai < di t+. To simplify the setting, we assume that no two arrival or departure times occur simultaneously. Let E = {e1, . . . , en} represent the set of items. Each agent i has a strict ordinal preference i over the items in E, such that ej i ek means agent i strictly prefers ej over ek. Furthermore, symbol i stands for i or =. An instance of the online exchange problem is represented by the set of tuples {(i, ei, ai, di, i)}i N. Without loss of generality, we assume that the agent indices are ordered by increasing arrival times, i.e., such that a1 < a2 < . . . < an hold. Let I denote the entire set of possible instances. Our goal is to allocate to each agent a single item such that each item is assigned only once. In other words, we search 1The resources are interchangeably referred to as goods or items Figure 1: Example instance (left) and allocations (right). for an allocation M : N E such that M(i) = M(j) for each i = j. The timeline constraints are such that each agent will leave the market with an item which belongs to an agent that arrived in the market earlier than her departure time. For any t T , let N 0 small enough for all these agents to arrive earlier than any other arrival or departure, and dk large enough to leave after any other agent of I. The preferences of the agents in I are as follows. For any agent k that was already in I and leaving after dj, her favorite item is ek , followed by the items of I ranked in the same order, and finally all other items of I ranked arbitrarily. Dummy agent i s preferences are Aj(I) i M(j) i . . ., where all the other items are ranked arbitrarily. Finally, the favorite item of other dummy agent k is Ak(I), and all other items are ranked arbitrarily. Note first that since A is online, both Aj(I ) = Aj(I dj. This implies with ai < d i that dj < d i. We now know that any agent of S leaving earlier than agent i will still leave earlier than i even after i declares a new departure time d i. This implies that agent i will still pass the if test in the loop of Algorithm 5 even if she changes her departure time because no agent of S leaving earlier will include i in a partition. Therefore, agent i will be alone in the departing agent excluded partition γ after misreporting her departure time and will keep her item during Algorithm 4. So, she has no incentive to misreport her departure time. Consider now the case of an agent i not in S. Note first that i S means that there is an agent j S such that dj < di and i N d i. In that case, agent i will belong to the set of agents for which the if condition of Algorithm 5 is true, and therefore agent i will be alone in the departing agent excluded partition γ, and will receive her item in Algorithm 4. Since Algorithm 4 is IR, agent i has no Algorithm 6 Scheduled departure partition θ. Input: Instance I, and schedule ξ = {ξ0, ξ1, . . . ξk}. 1: A {0}. {Set of intervals of ξ already considered.} 2: B . {Set of agents belonging to the partition.} 3: for i = 1 to n do 4: {Iteration occurring at dδ(i).} 5: Let ξj denote the interval of ξ containing dδ(i). 6: if j A then 7: Let S be the subset of agents of I d1) to n 1 (if an < dδ(1)). 6 Conclusion and Future Works We extended the serial dictatorship and TTC procedures to an online setting, aiming to develop mechanisms that are Paretoefficient, individually rational, and incentivize agents to truthfully reveal their preferences, as well as their actual arrival and departure times. Several variants of these mechanisms were proposed and are summarized in Table 1 along with their respective properties. The paper also presents additional results not summarized in Table 1. For example, we proved that Algorithm 1 using the ascending departure permutation δ is the only mechanism always returning a M(I)-PO allocation. M-PO IR WIC a-IC d-IC Alg. 1 with δ Prop. 3 Prop. 1 Alg. 1 with α Prop. 1 Prop. 7 Alg. 4 with γ Prop. 9 Prop. 11 Alg. 4 with θ Prop. 9 Prop. 13 Alg. 4 with ζ Prop. 9 Prop. 14 Prop. 14 Table 1: Summary of the different mechanisms and their properties. An intriguing extension of this work would be to explore dynamic versions of these mechanisms, where the allocation of an agent remaining in the market could evolve even after an item has been assigned to her. Another promising direction is the design of a strongly incentive-compatible mechanism that enables more exchanges than Algorithm 4 with the earliest departure partition ζ. Lastly, we could investigate relaxed forms of efficiency and strategy-proofness, potentially incorporating probabilistic assumptions about arrival patterns. Such probabilistic assumptions are closely related to the online stochastic matching problem [Feldman et al., 2009; Huang and Shu, 2021]. A similar approach has also been explored for the fair assignment of public goods [Banerjee et al., 2022; Banerjee et al., 2023]. Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence (IJCAI-25) [Albers, 2003] Susanne Albers. Online algorithms: a survey. Mathematical Programming, 97:3 26, 2003. [Aleksandrov and Walsh, 2019] Martin Aleksandrov and Toby Walsh. Strategy-proofness, Envy-freeness and Pareto Efficiency in Online Fair Division with Additive Utilities. In Proceedings of the Sixteenth Pacific Rim International Conference on Artificial Intelligence, PRICAI 19, pages 527 541, 2019. [Aleksandrov and Walsh, 2020] Martin Aleksandrov and Toby Walsh. Online Fair Division: A Survey. In Proceedings of the Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 20, pages 13557 13562, 2020. [Aleksandrov et al., 2015] Martin Aleksandrov, Haris Aziz, Serge Gaspers, and Toby Walsh. Online Fair Division: Analysing a Food Bank Problem. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, IJCAI 15, pages 2540 2546, 2015. [Anderson et al., 2017] Ross Anderson, Itai Ashlagi, David Gamarnik, and Yash Kanoria. Efficient Dynamic Barter Exchange. Operations Research, 65(6):1446 1459, 2017. [Ashlagi and Roth, 2021] Itai Ashlagi and Alvin E. Roth. Kidney Exchange: An Operations Perspective. Management Science, 67(9):5455 5478, 2021. [Ashlagi et al., 2015] Itai Ashlagi, Felix Fischer, Ian A. Kash, and Ariel D. Procaccia. Mix and match: A strategyproof mechanism for multi-hospital kidney exchange. Games and Economic Behavior, 91(C):284 296, 2015. [Awasthi and Sandholm, 2009] Pranjal Awasthi and Tuomas Sandholm. Online Stochastic Optimization in the Large: Application to Kidney Exchange. In Proceedings of the Twenty-First International Joint Conference on Artificial Intelligence, IJCAI 09, pages 405 411, 2009. [Baccara and Yariv, 2021] Mariagiovanna Baccara and Leeat Yariv. Dynamic matching. In Online and Matching-Based Market Design, pages 1221 1278. 2021. [Baccara et al., 2020] Mariagiovanna Baccara, Sang Mok Lee, and Leeat Yariv. Optimal dynamic matching. Theoretical Economics, 15(3):1221 1278, 2020. [Banerjee et al., 2022] Siddhartha Banerjee, Vasilis Gkatzelis, Artur Gorokh, and Billy Jin. Online Nash Social Welfare Maximization with Predictions. In Proceedings of the 2022 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 22, pages 1 19, 2022. [Banerjee et al., 2023] Siddhartha Banerjee, Vasilis Gkatzelis, Safwan Hossain, Billy Jin, Evi Micha, and Nisarg Shah. Proportionally Fair Online Allocation of Public Goods with Predictions. In Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI 23, pages 20 28, 2023. [Bir o, 2017] P eter Bir o. Applications of Matching Models under Preferences. In U. Endriss, editor, Trends in Computational Social Choice, pages 345 373. AI Access, 2017. [Bloch and Cantala, 2017] Francis Bloch and David Cantala. Dynamic Assignment of Objects to Queuing Agents. American Economic Journal: Microeconomics, 9(1):88 122, 2017. [Bouveret and Lang, 2014] Sylvain Bouveret and J erˆome Lang. Manipulating picking sequences. In Proceedings of the Twenty-First European Conference on Artificial Intelligence, ECAI 14, pages 141 146, 2014. [Chen and S onmez, 2002] Yan Chen and Tayfun S onmez. Improving Efficiency of On-Campus Housing: An Experimental Study. American Economic Review, 92(5):1669 1686, 2002. [Dickerson et al., 2012] John P Dickerson, Ariel D Procaccia, and Tuomas Sandholm. Dynamic Matching via Weighted Myopia with Application to Kidney Exchange. In Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence, AAAI 12, pages 1340 1346, 2012. [Feldman et al., 2009] Jon Feldman, Nitish Korula, Vahab S. Mirrokni, S. Muthukrishnan, and Martin P al. Online Ad Assignment with Free Disposal. In Proceedings of the Fifth International Workshop on Internet and Network Economics, WINE 09, pages 374 385, 2009. [Ferrari et al., 2015] Paolo Ferrari, Willem Weimar, Rachel J Johnson, Wai H Lim, and Kathryn J Tinckam. Kidney paired donation: principles, protocols and programs. Nephrology Dialysis Transplantation, 30(8):1276 1285, 2015. [Gerding et al., 2019] Enrico H. Gerding, Alvaro Perez Diaz, Haris Aziz, Serge Gaspers, Antonia Marcu, Nicholas Mattei, and Toby Walsh. Fair Online Allocation of Perishable Goods and its Application to Electric Vehicle Charging. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 19, pages 5569 5575, 2019. [Hajaj et al., 2015] Chen Hajaj, John P. Dickerson, Avinatan Hassidim, Tuomas Sandholm, and David Sarne. Strategy Proof and Efficient Kidney Exchange Using a Credit Mechanism. In Proceedings of the Twenty-Ninth AAAI Conference on Artificial Intelligence, AAAI 15, pages 921 928, 2015. [Hosseini et al., 2021] Hadi Hosseini, Vijay Menon, Nisarg Shah, and Sujoy Sikdar. Necessarily Optimal One-Sided Matchings. In Proceedings of the AAAI Conference on Artificial Intelligence, AAAI 21, pages 5481 5488, 2021. [Hosseini et al., 2024] Hadi Hosseini, Zhiyi Huang, Ayumi Igarashi, and Nisarg Shah. Class Fairness in Online Matching. Artificial Intelligence, 335:104177, 2024. [Huang and Shu, 2021] Zhiyi Huang and Xinkai Shu. Online Stochastic Matching, Poisson Arrivals, and the Natural Linear Program. In Proceedings of the Fifty-Third Annual ACM SIGACT Symposium on Theory of Computing, STOC 21, page 682 693, 2021. [Hurwicz and Reiter, 2006] Leonid Hurwicz and Stanley Reiter. Designing Economic Mechanisms. Cambridge University Press, 2006. Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence (IJCAI-25) [Klaus et al., 2016] Bettina Klaus, David F. Manlove, and Francesca Rossi. Matching under Preferences. In Felix Brandt, Vincent Conitzer, Ulle Endriss, J erˆome Lang, and Ariel D. Procaccia, editors, Handbook of Computational Social Choice, page 333 355. Cambridge University Press, 2016. [Ma, 1994] Jinpeng Ma. Strategy-proofness and the strict core in a market with indivisibilities. International Journal of Game Theory, 23:75 83, 1994. [Manlove, 2013] David F. Manlove. Algorithmics of Matching Under Preferences. World Scientific, 2013. [Mattei et al., 2017] Nicholas Mattei, Abdallah Saffidine, and Toby Walsh. Mechanisms for Online Organ Matching. In Proceedings of the Twenty-Sixth International Joint Conference on Artificial Intelligence, IJCAI 17, pages 345 351, 2017. [Roth and Postlewaite, 1977] Alvin Roth and Andrew Postlewaite. Weak versus strong domination in a market with indivisible goods. Journal of Mathematical Economics, 4(2):131 137, 1977. [Sankar et al., 2021] Govind S. Sankar, Anand Louis, Meghana Nasre, and Prajakta Nimbhorkar. Matchings with Group Fairness Constraints: Online and Offline Algorithms. In Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI 21, pages 377 383, 2021. [Shapley and Scarf, 1974] Lloyd Shapley and Herbert Scarf. On cores and indivisibility. Journal of Mathematical Economics, 1(1):23 37, 1974. [Swapz, 2025] Swapz. Swapz: The UK s Number One Swapping Marketplace. https://www.swapz.co.uk/, 2025. [Thomson, 2011] William Thomson. Fair Allocation Rules. In Kenneth J. Arrow, Amartya Sen, and Kotaro Suzumura, editors, Handbook of Social Choice and Welfare, volume 2, pages 393 506. Elsevier, 2011. [ Unver, 2010] M. Utku Unver. Dynamic Kidney Exchange. The Review of Economic Studies, 77(1):372 414, 2010. Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence (IJCAI-25)