The core for housing markets with limited externalities

We propose a variant of the housing market model à la Shapley and Scarf (in J Math Econ 1:23–37, 1974) that incorporates a limited form of externality in consumption; that is, agents care both about their own consumption (demand preferences) and about the agent who receives their endowment (supply preferences). We consider different domains of preference relations by taking demand and supply aspects of preferences into account. First, for markets with three agents who have (additive) separable preferences such that all houses and agents are acceptable, the strong core is nonempty; a result that can be neither extended to the unacceptable case nor to markets with a larger number of agents. Second, for markets where all agents have demand lexicographic preferences (or all of them have supply lexicographic preferences), we show that the strong core is nonempty, independent of the number of agents and the acceptability of houses or agents, and possibly multi-valued.


Introduction
We generalize Shapley and Scarf's (1974) famous model of trading indivisible objects to markets with limited externalities.In classical Shapley-Scarf housing markets each agent is endowed with an indivisible commodity, for instance a house, and wishes to consume exactly one commodity.Agents have complete, reflexive, and transitive preferences over all existing houses and may be better off by trading houses: exchanges do not involve monetary compensations.An outcome, or allocation, for a Shapley-Scarf housing market is a permutation of the endowment allocation.
One of the best known solution concepts for barter economies is the weak core, based on the absence of coalitions that may reallocate their endowments among themselves and make all their members strictly better off (i.e., no coalition can strongly block a weak core allocation).The weak core for Shapley-Scarf housing markets is always nonempty (Shapley and Scarf 1974).If strong blocking is weakened to only require that members of a blocking coalition are not worse off while at least one member is better off, then a stronger solution, the strong core, results (i.e., no coalition can weakly block a strong core allocation).In contrast to the weak core, the strong core for Shapley-Scarf housing markets can be empty, unless no agent is indifferent between any of the houses.Hence, when preferences are strict, also the strong core is nonempty and, in fact, coincides with the unique competitive allocation (Roth and Postlewaite 1977).Using the so-called top trading cycles (TTC) algorithm (due to David Gale, see Shapley and Scarf 1974), one can easily determine the unique strong core allocation for any Shapley-Scarf housing market with strict preferences.
In this paper, we build on Shapley and Scarf's (1974) classical housing market model and change the assumption that agents care only about the object they receive. 1e extend Shapley and Scarf's housing markets by introducing a limited form of externality in consumption: each agent cares both about his own consumption (traditional "demand preferences") and about the agent who receives his endowment (less traditional "supply preferences").This form of externality is modelled, for each agent, by a preference relation defined over pairs formed by the object assigned to the agent himself and the recipient of his own object.An example would be that of kidney exchange, the agents being formed by recipient-donor pairs and the objects being the kidneys that will be donated.It is clear that each agent (recipient) cares about the kidney he will receive but in addition, each agent (donor) might also care about the recipient of his kidney.More broadly, models with limited externalities also fit well with exchanges that are not permanent, i.e., where the endowments are only temporarily exchanged and eventually return to their original owners: vacation home exchanges such as Inter-Vac or ThirdHome are examples of such temporary exchanges.Other examples are car-sharing platforms such as CAROSET allowing car owners to temporarily swap their vehicles (the Japanese international advertising company Dentsu launched this app in 2019 and has now extended its scope to "A sharing platform that supports the lending and borrowing of owned items between members of a community."). 2 After having developed our model and having obtained first results, we discovered that Aziz and Lee (2020) had introduced the same problem as "temporary exchange problem".The results obtained by Aziz and Lee (2020) complement ours, as explained later on when we discuss our results in more detail.
General forms of externalities for Shapley-Scarf housing markets have been analyzed before.When (strict) preferences are defined over allocations rather than over own allotments (i.e., individual consumptions), Mumcu and Saglam (2007) proved that multiple weak core allocations may exist and the weak core may be empty even for markets with just three agents.Hong and Park (2022) analyze various core notions in the presence of externalities.Furthermore, they address the various difficulties that then occur when applying and adjusting the top trading cycles (TTC) algorithm accordingly.In order to get positive results, they restrict attention to "local" and "weak global" externalities by introducing so-called hedonic and egocentric preferences. 3They then introduce further properties to guarantee the existence of a top trading cycles allocation and prove that it is a core allocation (with respect to various core notions) and, moreover, is so-called stable (see Roth and Postlewaite 1977, for the definition of stable allocations).In the same vein, Graziano et al. (2020) focused on two preference domains capturing specific types of externalities over allocations and prove that stable allocations exist and form a stable set à la von Neumann and Morgenstern.In the first domain, which is the same as the egocentric domain in Hong and Park (2022), agents are primarily interested in the house they receive.The second class of preferences are called allocentric and preferences in that class can accommodate some altruism among agents that cannot be addressed via egocentric preferences; the most simple example being that of two agents who have the same preferences over the set of allocations.
The main focus of our analysis is on the existence and uniqueness of weak and strong core allocations for markets with limited externalities, depending on two elements: the number of agents and the acceptability of all houses and / or agents.After providing an empty weak core example for a market with three agents that resembles a wellknown roommate market example, we restrict our attention to different subclasses of preferences.In sequence from larger to smaller, we consider the domains of separable and additive separable preferences and two distinct lexicographic preference domains where agents care either primarily about the house they receive or primarily about who receives their house.Interestingly, for markets with three agents, the separable and additive separable domains coincide and, whenever all houses and agents are acceptable, they also coincide with the union of the two lexicographic preferences domains.
First, for markets with three agents who have (additive) separable preferences such that all houses and agents are acceptable, the strong core is nonempty; a result that can be neither extended to the unacceptable case nor to markets with a larger number of agents.Second, for markets where all agents have demand lexicographic preferences, we show that the strong core is nonempty, independent of the number of agents and the acceptability of houses or agents, and possibly multi-valued.We remark that all results and examples obtained for markets with demand lexicographic preferences can be symmetrically obtained for supply lexicographic preferences.
Our results and the independent findings of Aziz and Lee (2020) for housing markets with limited externalities complement each other.Aziz and Lee (2020), adopt a computational viewpoint that is missing in our analysis and show that, in general, checking whether weakly core stable or Pareto optimal allocations exist is NP-hard, while for separable preferences a polynomial-time algorithm to obtain Pareto optimal and individually rational allocations exists.
The paper is organized as follows.In Sect. 2 we introduce our housing market model with an emphasis on various strict preference domains capturing limited externalities, as well as the core solutions we consider.In Sect. 3 we focus on the domains of separable and additive separable preferences and in Sect. 4 we consider demand (supply) lexicographic preferences.Depending on the number of agents and the acceptability of houses and agents, for each subdomain we obtain results concerning the existence, multi-valuedness, and set inclusions of various core-allocation sets.We conclude in Sect. 5.

The model
We consider an exchange market with indivisibilities formed by n agents and by the same number of indivisible objects, say houses; let N = {1, . . ., n} and H = {h 1 , . . ., h n } denote the set of agents and houses, respectively.Each agent owns one distinct house when entering the market, desires exactly one house, and has the option to trade the initially owned house in order to get a better one.All exchanges are made with no transfer of money.We assume that agent i owns house h i .
An allocation a is an assignment of houses to agents such that each agent receives exactly one house, that is, a bijection a : N → H .Alternatively, we will denote an allocation a as a vector a = (a 1 , . . ., a n ) with a i ∈ H denoting the house assigned to agent i ∈ N under allocation a.A denotes the set of all allocations and h = (h 1 , . . ., h n ) the endowment allocation.Hence, the set of allocations A is obtained by permuting the set of houses H .A nonempty subset S of N is called a coalition.For any coalition S ⊆ N and any allocation a ∈ A, let a(S) = {a i ∈ H : i ∈ S} be the set of houses that coalition S receives at allocation a.The notation a(i) will be used sometimes instead of a i .
Up to now we have followed the description of a classical Shapley-Scarf housing market model as introduced by Shapley and Scarf (1974).Now, in contrast with that model, we assume that each agent cares not only about the house he receives but also about the recipient of his own house.That is, preferences capture limited externalities that are modelled as follows.
Given an allocation a ∈ A, the allotment of agent i is the pair (a(i), a −1 (h i )) ∈ H × N , formed by the house a(i) assigned to agent i and the agent who receives agent i's house, i.e., agent a −1 (h i ).Note that a(i) = h i if and only if a −1 (h i ) = i, i.e., either both elements of agent i's endowment allotment (h i , i) occur in his allotment or none.
denotes the set of all the allotments of agent i.Table 1 sums up all possible allocations and the associated allotments for each agent in a three-agents market.
Each agent i ∈ N has a preference relation i over the set A i , that is, i is a transitive, reflexive, and complete binary relation.As usual, i and ∼ i denote the asymmetric and symmetric parts of i , respectively.We also assume that preferences are strict, i.e., i is antisymmetric. 4We denote the general domain of strict preferences for agent i by D i and the set of strict preference profiles by D N = D 1 × . . .× D n .To simplify notation, we will drop the agent specific lower index from D i (respectively, from subdomains of D i ) and simply write D.
Throughout the paper several subdomains of D will be analyzed where the agents' preferences over allotments are induced by their preferences over the houses and the other agents in the market.More specifically, an agent i ∈ N may have a "demand" strict preference relation The sets of separable, additive separable, demand lexicographic, and supply lexicographic preference profiles, are denoted by D N sep , D N add , D N dlex , and D N slex .The next proposition, which we prove in Appendix A, illustrates the relationships between the above preference domains (see also Fig. 2 in Appendix A).

Proposition 1
The following relationships hold between the preference domains: and if in addition all houses and agents are acceptable 5 , 5 For |N | = 2, since there are only two allocations, all our preference domains coincide.
For each agent i ∈ N , a preference relation i on the set of allocations A can be associated with his preferences i over A i .Consider two allocations a, b ∈ A. Then, we have and In the following, the symbols and will be used to denote generic preference relations over allotments and allocations, respectively.
Remark 1 (Preference domains in Hong and Park (2022)) Hong and Park (2022) consider preferences over allocations with externalities as well.They first require Assumption 1: and since preferences over allotments are strict, the above assumption is satisfied on all preference domains we consider. 6ext, Hong and Park (2022) define agent i's preferences i over A as • hedonic if each agent just cares about his own trading cycle;7 that is, for all allocations a, b ∈ A such that S a,h i = S b,h i , where S a,h i and S b,h i are agent i's trading cycles at allocations a and b, respectively, we have a ∼ i b; • egocentric if each agent is primarily interested in the house (or, the allotment, according to Hong and Park's terminology) that he receives; formally, for all a, b ∈ A with a(i) = b(i), it holds that For our model, since for any two allocations , a preference relation i over allocations that is derived from strict preferences i ∈ D over allotments satisfies the requirement to be hedonic.Thus, throughout this paper, preferences over allocations are hedonic.
Preferences over allocations that are induced by demand lexicographic preferences ∈ D dlex are also egocentric.On the other hand, our domain of supply lexicographic preferences induces preferences over allocations that do not satisfy the requirement to be egocentric.For instance, the following supply lexicographic preferences for agent 1 induce preferences over allocations (see Table 1) that are not egocentric because a 3 1 a 1 but a 4 1 a 6 .Vice versa, the following preferences over allocations a 4 1 a 3 1 a 5 1 a 2 1 a 1 ∼ 1 a 6 are egocentric; however, the induced preferences over allotments A housing market with limited externalities, or market for short, is now completely described by the triplet (N, h, ), where N is the set of agents, h is the endowment allocation, and ∈ D N is a preference profile.Since the set of agents and the endowment allocation are fixed, we often denote a market by its preference profile .
We introduce our two main solution concepts that represent the idea of "stable exchange" based on the absence of coalitions that can improve their allotments by reallocating their endowments among themselves.
Definition 1 (Weak and strong core allocations) Let ∈ D N and a ∈ A. Then, coalition S ⊆ N strongly blocks allocation a if there exists an allocation b ∈ A such that (a) at allocation b agents in S reallocate their endowments, i.e., b(S) = h(S), and (b') all agents in S are strictly better off, i.e., for all agents i ∈ S, Allocation a is a (weak) core allocation if it is not strongly blocked by any coalition.We denote the set of (weak) core allocations for market by C( ).Coalition S weakly blocks allocation a if there exists an allocation b ∈ A such that (a) at allocation b agents in S reallocate their endowments, i.e., b(S) = h(S), and (b') all agents in S are weakly better off with at least one of them being strictly better off, i.e., for all agents i ∈ S, and for some agent j ∈ S, Allocation a is a strong core allocation if it is not weakly blocked by any coalition.
We denote the set of strong core allocations for market by SC( ).
It follows from the definitions that, for any market ∈ D N , SC( ) ⊆ C( ).When there are no more than three agents in the market, then the weak and strong core coincide.
Proposition 2 Consider a housing market (N , h, ) where Proof Let (N , h, ) be such that N ⊆ {i, j, k} and ∈ D N .Let a ∈ C( ) and suppose, by way of contradiction, that a / ∈ SC( ).Then, there exists a minimal coalition S ⊆ N that weakly but not strongly blocks a through an allocation b.8 Hence, for some agent . The latter implies that S = {i} is not possible.
If S = {i, j}, then agents i and j block by swapping their endowments such that If S = {i, j, k}, then agents i, j, and k block by exchanging their endowments in a circular way such that If |N | ≤ 2, then it is easy to show that SC( ) either consists of the endowment allocation or the allocation that is obtained by pairwise trade.
For Shapley-Scarf housing markets where agents only care about the house they receive, Shapley and Scarf (1974) showed that a core allocation always exists.Furthermore, Roth and Postlewaite (1977) proved that, when preferences are strict, the set of strong core allocations for any Shapley-Scarf housing market is a singleton.Using the so-called top trading cycles (TTC) algorithm (due to David Gale, see Shapley and Scarf (1974)) one can easily determine this unique strong core allocation for any classical housing market.We end this section with an example showing that, contrary to the classical Shapley-Scarf model, the core may be empty when preferences exhibit limited externalities.
Example 1 (A "roommate market" with an empty core) We describe a market that is in character very similar to the famous roommate market that shows that the core in one-to-one (so-called roommate) markets may be empty (see Gale and Shapley 1962, Example 3).In a roommate market, the "objects" that agents can trade and consume are the companionship that they provide when sharing a room (when agents share a room, they consume the others' companionship; when they stay alone, they only consume their own solitude).Let N = {1, 2, 3} and H = {h 1 , h 2 , h 3 } be the set of agents and the set of objects that represent social interaction or company, respectively; The symbol . . .denotes that any strict ordering of the two remaining allotments can be considered.We show that the core for market (N , h, ) is empty.We first show that all allocations resulting from pairwise trades can be blocked by a pairwise trade that includes the residual agent: allocation Furthermore, all non-pairwise trades can be blocked by a pairwise trade: allocation Finally, the no-trade allocation h can be blocked by various pairwise trades, e.g., it is blocked by coalition S = {1, 2} via (h 2 , h 1 , h 3 ).
The fact that core allocations do not exist for housing markets such as the one in Example 1 is not particularly surprising since the core is frequently observed to be empty in a framework with more than two agents and externalities in consumption (see for example Mumcu and Saglam 2007;Graziano et al. 2020).A different (five-agent) example of a market with limited externalities and an empty core has recently been provided by Aziz and Lee (2020).
Given this negative result, in the following sections we will focus on several preference profile subdomains of D N and explore for each of them the existence of both weak and strong core allocations.The analysis will proceed from bigger to smaller domains and will distinguish, whenever necessary, between the case where all houses and agents are acceptable (the "acceptable case") and the case where acceptability of houses and agents is not required (the "unacceptable case").

Separable and additive separable markets
In this section we present three results for the separable domain D sep and its subdomain of additive separable preferences, D add .First, we prove that the strong core is nonempty for the three agents case when preferences are separable and all houses and agents are acceptable (Sect.3.1).Then, we show that this existence result can neither be extended to the unacceptable case (Sect.3.2) nor to a market with a larger number of agents (Sect.3.3).It is worth pointing out that in many economic models, the emptiness of the core or the non-existence of equilibria is caused by strong complementarities.Requiring preferences to be separable, eliminates the most obvious type of strong complementarities (e.g., preferences over who receives one's house cannot be conditioned on the house one receives).Hence, our following core emptiness results (Sect.3.2 and Sect.3.3) are not driven by strong complementarities.
Throughout this section, it will be helpful to represent trades at an allocation or for a blocking coalition as directed graphs where each agent is a node in the graph and a directed edge from agent i to agent j (i → j) means that agent i consumes the house h j of agent j.A directed edge from agent i to himself (a loop i ) represents the case where agent i consumes his own house h i .
3.1 Non-emptiness of the strong core for separable three-agents markets: the acceptable case We show that the strong core for a separable three-agents market where all houses and agents are acceptable is nonempty.
We prove Proposition 3 in Appendix B. In the proof, since there are four possible types for each agent, we consider a total of 64 cases that we group into three main sets for which we then construct corresponding strong core allocations.A later example (Example 2) shows that for housing markets (N , h, ) where sep , and all houses and agents are acceptable, multiple strong core allocations may exist, i.e., |SC( )| > 1 is possible.

Possible emptiness of the core for additive separable three-agents markets: the unacceptable case
We now present an additive separable three-agents market H 1 where some agents have unacceptable houses / agents and show that the core is empty.Tables 3 and 4 specify demand and supply preferences of each agent i ∈ N (together with associated utilities u d i and u s i ) and the resulting additive separable utilities, respectively.
The core of the housing market H 1 is empty; in Table 5 we list for each possible allocation for H 1 how a subset of agents can block it.

Possible emptiness of the core for additive separable larger markets: the acceptable case
We now first present an additive separable four-agent market H 2 with all acceptable agents and houses and an empty core.In Appendix C we then explain how this empty core example can be extended to more than four-agents markets with all acceptable agents and houses.Tables 6 and 7 specify demand and supply preferences of each agent i ∈ N (together with associated utilities u d i and u s i ) and the resulting additive separable utilities, respectively.For our purpose, the only relevant information regarding agent 4 is that all the houses and agents are acceptable for him; his demand and supply preferences are not relevant and are therefore omitted.
The core of the housing market H 2 is empty; in Table 8 we list for each possible allocation for H 2 how a subset of agents can block it (note that for the construction of blocking coalitions it suffices to consider the associated ordinal separable preferences of H 2 ).

Demand (supply) lexicographic markets
Recall that in Definition 1 we have defined the weak and the strong core for housing markets (N , h, ) with limited externalities.We now focus on markets where all agents have demand lexicographic preferences, that is ∈ D N dlex .Let d be the demand preference profile associated with .We then can consider the classical housing market (N , h, d ), where each agent i ∈ N has preferences d i over the set of houses.We refer to market (N , h, d ) as the Shapley-Scarf market associated with (N , h, ); C( d ) denotes the corresponding associated/classical Shapley-Scarf (weak) core and SC( d ) the corresponding associated/classical Shapley-Scarf strong core.
First, we show that a strong core allocation always exists for a market (N , h, ), ∈ D N dlex , i.e., SC( ) = ∅.This existence result does neither depend on the number of agents, nor on the acceptability of houses or agents; it is obtained by linking the strong core SC( ) of the original market to the strong core SC( d ) of the associated Shapley-Scarf market.It turns out that the strong core of any associated Shapley-Scarf market is a subset of the strong core of the original market.Furthermore, we analyze the relationship between the weak core C( ) of the original market and the weak core C( d ) of the associated Shapley-Scarf market.
Finally, one can ask what happens when considering markets (N , h, ) where all agents have supply (instead of demand) lexicographic preferences, that is ∈ D N slex .Roughly speaking, this change only requires using supply preferences s instead of demand preferences d to obtain corresponding results, albeit with a small adjustment in how one interprets an allocation, as we explain in the next paragraph.
More precisely, for market (N , h, ), ∈ D N dlex and its associated Shapley-Scarf market (N , h, d ) we can represent an allocation as trading cycles of the following  directed graph where "pointing" represents directed edges: each house points at its owner, each owner points at the house in his allotment, and each agent receives the house he points at.When considering a market (N , h, ), ∈ D N slex and its associated market (N , h, s ), we switch the roles of agents and houses and represent an allocation as trading cycles of the following directed graph where "pointing" represents directed edges: each agent points at his house, each house points at the agent who receives it in his allotment, and each agent receives the house that points at him.Hence, by subsequently switching the roles of agents and houses (as explained above), all results and examples obtained for demand lexicographic markets can be transcribed into corresponding results and examples for supply lexicographic markets.
It cannot be the case that S 2 = S since that would imply that for all agents i ∈ S, b(i) = a(i) and b −1 (h i ) = a −1 (h i ), contradicting (b').Thus, for all agents i ∈ S, b(i) d i a(i), and for some agent j ∈ S, b( j) d j a( j).Hence, S weakly blocks a through b, which contradicts a ∈ SC( d ).
Our next example illustrates that the set inclusion in Proposition 4 may be strict and that multiple strong core allocations may exist.
Example 2 Let N = {1, 2, 3} and h = (h 1 , h 2 , h 3 ).We assume that ∈ D N dlex with demand and supply preferences as specified in Table 9.The empty column means that any linear order s 3 can be considered.
First, strong core for the Shapley-Scarf market d is formed by the unique allocation a 4 = (h 2 , h 1 , h 3 ), which can easily be computed by Gale's top trading cycles (TTC) algorithm based on d .
Our next example illustrates that the set inclusion in Proposition 5 may be strict.
By Proposition 2, for any housing market (N , h, ) where |N | = 3 and ∈ D N dlex , C( ) = SC( ).Our next example shows that the distinction between the strong and the weak core matters in a demand lexicographic market when there are more than three agents.
Example 4 Let N = {1, 2, 3, 4} and h = (h 1 , h 2 , h 3 , h 4 ).We assume that ∈ D N dlex with demand and supply preferences as specified in Table 11.The partially empty columns mean that any consistent linear orders d 2 , s 2 , d 4 , and s 4 can be considered.For market , allocation a = (h 2 , h 3 , h 4 , h 1 ) is weakly blocked by S = {1, 2, 3} through b = (h 2 , h 3 , h 1 , h 4 ) since agent 2 gets the same allotment at allocations a and b, while agents 1 and 3 are both better off.However, a cannot be strongly blocked by any coalition.Hence, a ∈ C( ) and a / ∈ SC( ).
Our results for demand lexicographic markets can be summarized by Fig. 1.9 1 Set inclusions for weak and strong cores for a demand lexicographic market and its associated Shapley-Scarf market d

Mixed demand and supply lexicographic markets
One may wonder what happens in markets that are populated by both, agents with demand lexicographic and agents with supply lexicographic preferences, i.e., some agents first care about the house they receive (then about who receives their house), while others first care about who receives their house (then about the house they receive).We can answer this question only partially.
First, we can show that for mixed lexicographic three-agents markets the strong core is nonempty.
We prove Proposition 6 in Appendix D. In this proof, we also demonstrate that, in contrast to the classical Shapley-Scarf housing market, the strong core for a mixed lexicographic market may contain multiple allocations.
Next, recall that in Proposition 4 we prove the non-emptiness of the strong core by showing that the strong core of a housing market with demand lexicographic preferences is a (weak) superset of the strong core of the associated Shapley-Scarf housing market, which is known to be non-empty.The non-emptiness of the strong core for any Shapley-Scarf housing market with strict preferences is traditionally obtained by computing a strong core allocation using Gale's famous top trading cycles (TTC) algorithm (see Shapley and Scarf 1974).Thus, for housing market with demand lexicographic preferences, we can determine a strong core allocation by using the TTC algorithm based on only the associated demand preferences.Similarly, for housing market with supply lexicographic preferences, by switching the roles of agents and houses (as explained at the beginning of this section), we could use an adapted version of the TTC algorithm to find a strong core allocation based on only the associated supply preferences.
A closer look at the proof in Appendix D that the strong core is nonempty for mixed three-agents markets would quickly reveal that an adaptation of the TTC algorithm to find a strong core allocation for any possible preference mix between demand and supply lexicographic preferences is not possible: the proof essentially clusters mixed preference profiles into more than 27 cases and, depending on further preference specifications, suggests one strong core allocation.Thus, on the one hand, even for small mixed lexicographic markets, we were not able to find a systematic way (algorithm) to find a strong core allocation.On the other hand, we were not able to construct a mixed lexicographic market (with more than three agents) with an empty strong core.Our intuition based on the four agent core-emptiness example for additive separable preferences with only acceptable agents and houses in Sect.3.3 is that finding such an example for mixed lexicographic markets would be rather difficult given the inherit combinatoric complexity of the situation.
To summarize, it is an open question whether the strong core for mixed lexicographic markets with at least four agents is empty or not.

Conclusions
Consumption externalities can occur in many economic models and housing markets are no exception.On one hand, they may easily occur in many real-life applications (e.g., vacation home exchanges); on the other hand, they are problematic because many (existence) results break down when externalities are present.The study of externalities in matching markets started with Sasaki and Toda (1996), who modeled them via preference relations that are defined over the set of all possible matchings.For housing markets with this general form of externalities, Mumcu and Saglam (2007) prove that the core may be empty and multi-valued.Graziano et al. (2020) and Hong and Park (2022) introduce various classes of preferences accounting for different degrees of externalities and analyze several core-like solution concepts.The former paper mainly focuses on the existence of some of these solution concepts and their characterization as stable sets à la von Neumann and Morgenstern, while the latter one also adapts the top trading cycles (TTC) algorithm to some of these preference domains with externalities and provides results for the then obtained TTC allocations.
The distinguishing feature of our paper is its focus on a very limited but natural form of externality: each agent cares about his own consumption, as in classical Shapley-Scarf housing markets, and about the agent who receives his endowment.Such limited externalities fit, for instance, situations where the agents' endowments are only temporarily traded and eventually return to their original owners.The modeling can easily be done via preferences that are defined over received-object -endowment-recipient pairs.For this class of markets with limited externalities, we analyze various natural preference domains and investigate the existence of weak and strong core allocations, depending on two factors: the number of agents and the acceptability of houses and / or agents.Our main findings are: a.For the (additive) separable preference domain, the strong core is nonempty for three-agents markets when all houses and agents are acceptable; however, this existence result can be extended neither to markets with a larger number of agents nor to markets with unacceptable agents or houses.b.For the demand lexicographic preference domain (as well as for the supply lexicographic preference domain), the strong core is nonempty, independently of the number of agents and the acceptability of houses or agents, and it can be multivalued.
We are aware that our positive results for the two lexicographic preference domains have the drawback that these domains are not very large.The question whether or not results can be extended to larger preference domains is legitimate.We provide a positive answer for mixed lexicographic preference markets with up to three agents.The proof for this relatively small domain of markets requires clustering mixed lexicographic preference profiles into more than 27 cases.Such combinatorial complexity suggests that finding a systematic way (algorithm) to find strong core allocations for larger mixed demand and supply lexicographic markets is challenging.
The difficulties in adapting traditional algorithms to markets with externalities are confirmed by Hong and Park (2022): they extend the so-called top trading cycles (TTC) algorithm to the much larger domain of hedonic preferences and show that a formed may not be a top trading cycle and thus the algorithm may fail to produce an allocation.Hence, positive results may be provided for some preference domains but at the price of imposing more market structure (e.g., the (iterative) top trading cycle property suggested by Hong and Park 2022).
For the slightly more general model with limited externalities when indifferences are allowed, Aziz and Lee (2020, Theorem 3) prove that it is NP-hard to check whether a core allocation exists.We conjecture that this NP-hardness result may extend to mixed lexicographic markets.In other words, it is an open question whether finding core allocations in mixed demand and supply lexicographic markets is NP-hard or not.

Funding Open access funding provided by University of Lausanne
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material.If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Appendix A Relations between preference domains
In this appendix we first prove Proposition 1 and then provide examples showing that set inclusions between preference domains may be strict.

Proof of Proposition 1
Set inclusions D ⊇ D sep ⊇ D add , as well as D dlex ∩ D slex = ∅ follow easily from the corresponding preference domain definitions.
To prove that D dlex ∪ D slex ⊆ D add , without loss of generality, let i ∈ D dlex .Then, it can easily be checked that the following utility functions, which are reminiscent of Borda scores, represent demand lexicographic preferences.For each j ∈ N , let Without loss of generality, suppose that a d i b and j s i k.Then, i may rank the allotments different from (h i , i) according to the following two types: Note that, depending on how h i and i rank in d i and s i , any position for the endowment (h i , i) is a priori possible (we consider the endowment in more detail later on).
Consider the following utility values u d i and u s i : It can now be easily verified that utility function u(h, t) = u d i (h) + u s i (t) is an additive separable representation of i for allotments (a, j), (a, k), (b, j), and (b, k).Concerning the endowment allotment (h i , i), it is always possible to find values u d i (h i ) and u s i (i) such that the corresponding additive separable preferences are respected.For example, consider Type I preferences and suppose that (h i , i) is the most preferred allotment.These preferences over allotments can in fact result from three different demand / supply preferences as listed below.We give corresponding utility values We conclude that i ∈ D add .
Moreover, when all houses and agents are acceptable, note that i ∈ D dlex when preferences are of Type I, while i ∈ D slex when preferences are of Type II.Hence, Example 5 (Strict preferences that are not separable (|N| = 3) ) Consider the three agent market described in Example 1, Table 2.We show that agent 1's ranking of allotments, 1 ∈ D, cannot result from separable preferences: If 3 s 1 2, then separability would imply (h 2 , 3) 1 (h 2 , 2), which is not true.However, if 2 s 1 3, then separability would imply (h 3 , 2) 1 (h 3 , 3), which is not true.
Example 6 (Strict and separable preferences that are not additive separable and agent 1's demand and supply preferences It is easy to check that the following preferences 1 are separable: By way of contradiction, suppose that 1 is additive separable.Then, there exist two utility functions u d 1 and u s 1 such that for all (h, j), (h , k) ∈ A 1 , . By adding up these two inequalities, we obtain u d 1 (h 3 ) + u s 1 (4) > u d 1 (h 4 ) + u s 1 (3), which contradicts (h 4 , 3) 1 (h 3 , 4).We conclude that 1 is not additive separable.
Figure 2 illustrates the relationships between the preference domains.
Note that for each preference type of an agent in Table 12, there are two possible separable preferences; in the sequel, we refer to the specific associated preferences only when necessary.There are 4 3 = 64 possible cases for separable preference profiles that we will denote by triplets indicating the preference type for each agent; for instance, the type-triplet (t3, t2, t2) indicates that agent 1 is of type 3 while the other two agents are both of type 2.
By Proposition 2, it suffices to prove that the core is nonempty.To this aim, we group the possible type-triplets into three sets.Set 1: two agents prefer to pairwise trade (12 cases).For two agents i, j ∈ N , The type-triplets contained in Set 1 are (t1, t2, * ), (t2, * , t1), and ( * , t1, t2), where the symbol * ∈ {t1, t2, t3, t4} can be any possible type for the corresponding agent (hence, we have 3 • 4 = 12 cases).The following allocation that results from the pairwise trade between agents i and j i k j belongs to the core.
Set 2: all agents compete for different houses (16 cases in total).Let We partition Set 2 into the following subsets.
For Set 2.1, allocation (h 3 , h 1 , h 2 ) belongs to the core in seven of the cases (except possibly for (t2, t2, t2)) because at least one agent is of type 4 and gets his most preferred allotment and the other two agents cannot block because a pairwise trade would not be advantageous for at least one of them.For type-profile (t2, t2, t2), if at least two agents have the following preferences (h 3 , 2) 1 (h 2 , 3), (h 1 , 3) 2 (h 3 , 1), (h 2 , 1) 3 (h 1 , 2), then allocation (h 3 , h 1 , h 2 ) belongs to the core.Otherwise, allocation (h 2 , h 3 , h 1 ) belongs to the core.
Set 3: two agents compete over the same house without preferred pairwise trades (36 cases in total).There exist i, j ∈ N such that First, in the demand preferences of agents in {1, 2, 3} we rank all houses h ∈ H below house h 4 and in the supply preferences of agents in {1, 2, 3} we rank all agents i ∈ N below agent 4. Agent 4's demand and supply preferences are restricted as specified in Table 13.The boldface letters h and i in Table13 stand for houses in H (listed in any order) and agents in N (listed in any order), respectively.
Second, in the demand and supply preferences of agents in {1, 2, 3}, we assign the same utilities as in market H 2 to houses {h 1 , h 2 , h 3 , h 4 } and agents {1, 2, 3, 4} (see Table 6); all houses h ∈ H and all agents i ∈ N are assigned low utility values (e.g., in [0.1, 0.2]) such that the induced demand, supply, and additive separable preferences are strict.Agent 4's demand and supply preferences are such that he assigns high utility values to houses {h 1 , h 2 , h 3 } and agents {1, 2, 3} (e.g., in [10, 20]), low utility values to all houses h ∈ H and all agents i ∈ N (e.g., in [0.1, 0.2]), and utility value 0 to h 4 and 4 such that the induced demand, supply, and additive separable preferences are strict.The only relevant information regarding agents in N is that all the houses and agents are acceptable for them.
The above specified extension of market H 2 is an additive separable market with all acceptable agents and houses; we show that its strong core is empty by showing how each possible allocation can be blocked (note that for the construction of blocking coalitions we again only need to consider the associated ordinal separable preferences of the market).We refer to the original agents {1, 2, 3, 4} and houses {h 1 , h 2 , h 3 , h 4 } as good agents and good houses; all other agents and houses are bad agents and bad houses.We consider an allocation a ∈ A. Case 1: At a all good agents receive good houses.
Then, Table 8 in Section 3.3 lists all possible allocations for good agents and how a subset of good agents can block allocation a. Case 2: At a at least one good agent receives a bad house.
We split this case into two subcases based on trading cycles (that is, a minimal set of agents that swap their houses) at allocation a.We denote trading cycles at allocation a by ordered sets, e.g., the trading cycle where agent 1 receives the house of agent 2, agent 2 received the house of agent 3, . .., agent k receives the house of agent 1, is denoted by [1, 2, 3, . . . , k, 1].Case 2.1: At a there exists a trading cycle with at least two good agents and at least one bad agent.agents i, j ∈ {1, 3, 4}, i = j, and agent(s) b, c ∈ N , b = c is possible.Consider the trading cycle at a that justifies this subcase: Note that good agent i receives a bad house (the agent receiving i's house, l k , could be good or bad), good agent j's house is assigned to bad agent c (the house agent j receives from l 1 could be good or bad), and the set of agents {l 1 , . . ., l k } that are in the trading cycle in between agents j and i could be empty.Then, the set of agents {i, j, l 1 , . . ., l k } can block allocation a with trading cycle [i, j, l 1 , . . ., l k , i] at which agent i receives a good house (the agent receiving i's house, l k , is the same), good agent j's house is assigned to good agent i (the house agent j receives from l 1 is the same), and agents l 1 , . . ., l k allotments remain the same.Case 2.2: At a each good agent is either single, or in a trading cycle with only bad agents, or in a trading cycle with only good agents.Now, we have chosen the utility values of bad houses and agents such that a good agent who is in a trading cycle with only bad agents receives rather low utility values such that in terms of blocking incentives together with other good agents, he is taking the same role as a single agent.Hence, Table 8 in Section 3.3 again lists all possible allocations for good agents (including trading cycles of one good agent with only bad agents instead of single good agents) and how a subset of good agents can block allocation a.

D Proof of Proposition 6
Proof of Proposition 6 Let (N , h, ) be such that |N | ≤ 3 and ∈ (D dlex ∪ D slex ) N .
If |N | ≤ 2, then it is easy to show that SC( ) either consists of the endowment allocation or the allocation that is obtained by pairwise trade.Now, let N = {i, j, k}, D = {i ∈ N : i ∈ D dlex }, and S = {i ∈ N : i ∈ D slex }.When D = ∅ or S = ∅, a strong core allocation exists as proven (explained) in Sect.4.1.Assume now that D, S = ∅.
In the sequel we will use directed edges or "pointing" based on agents' preferences.Now, directed edges or "pointing" is defined as follows. 10If i ∈ D and h j is his most preferred house, then we will use the notation i → j and say that agent i's first choice is house h j ; symmetrically, if i ∈ S and j is his most preferred agent, then we will use the notation i → j and say that agent i's first choice is agent j.In particular, the loop i denote that, depending on i ∈ D or i ∈ S, i's first choice is his own house h i or himself. 11or each agent i ∈ N , there are three distinct possibilities: Hence, 27 distinct cases have to be considered.When grouping cases into five sets of preference profiles, we will only specify agents having demand or supply lexicographic preferences whenever it is relevant.
Set 1 (7 cases): There are two agents i, j ∈ N such that i j .Then, the no-trade allocation is the unique strong core allocation.
Set 2 (9 cases): There are two distinct agents i, j ∈ N such that i j .
If i, j ∈ D (or, i, j ∈ S), then the allocation where agents i and j pairwise trade is the unique strong core allocation.In particular, • if 1 2, then SC( ) = {(h 2 , h 1 , h 3 )}; A symmetric argument holds for the case i ∈ S and j ∈ D.

Set 3 (3 cases):
There is an agent i ∈ N such that i k j .
If agents j and k both find the other's house / the other acceptable (depending on whether they have demand or supply lexicographic preferences), then the allocation where agents j and k pairwise trade is the unique strong core allocation.If, on the contrary, agent j or agent k finds the other's house / the other unacceptable (depending on whether they have demand or supply lexicographic preferences), then the no-trade allocation is the unique strong core allocation.

(6 cases):
There an agent i ∈ N such that i k j .
If agent k finds agent j's house / agent j acceptable (depending on whether he has demand or supply lexicographic preferences), then the allocation where agents j and k pairwise trade is the unique strong core allocation.
If, on the contrary, agent k finds agent j's house / agent j unacceptable (depending on whether he has demand or supply lexicographic preferences), then the no-trade allocation is the unique strong core allocation.

i k j
Here, the distinction between demand and supply lexicographic preference agents is relevant.
Let us first consider the case of two demand lexicographic preference agents and one supply lexicographic preference agent.Without loss of generality, suppose that agent k = 3 is a supply lexicographic preference agent and agents i = 1 and j = 2 are demand lexicographic preference agents; that is 1 (d)   3 (s)  2 (d)   .
If agent 3 finds agent 2 acceptable, then the allocation (h 2 , h 3 , h 1 ) belongs to the strong core.On the contrary, suppose that 1 s 3 3 s 3 2.Then, if agent 2 finds agent 1's house acceptable, allocation (h 2 , h 1 , h 3 ) belongs to the strong core.Otherwise, h 3 d 2 h 2 d 2 h 1 and, depending on whether agent 1 finding agent 3's house acceptable or not, allocation (h 3 , h 2 , h 1 ) or allocation (h 1 , h 2 , h 3 ) belongs to the strong core.
The eight possible cases and the associated strong core allocations are shown in Table 14.Table 14 also shows that the strong core may be multi-valued.
The following case is analogous to the one just analyzed, but with agents 1 and 2 in inverted roles 1 (d)   3 (s)  2 (d)   .
Consider now the second case of two supply lexicographic preference agents and one demand lexicographic preference agent.Without loss of generality, suppose that i = 1 is the demand lexicographic preference agent and j = 2 and k = 3 are supply lexicographic preference agents; that is 1 (d)   3 (s)  2 (s)   .
If agent 1 finds agent 3's house acceptable, then the allocation (h 3 , h 1 , h 2 ) belongs to the strong core.
On the contrary, suppose that h 2 d 1 h 1 d 1 h 3 .Then, if agent 3 finds agent 2 acceptable, allocation (h 1 , h 3 , h 2 ) belongs to the strong core.Otherwise, 1 s 3 3 s 3 2 and, depending on whether agent 2 finding agent 1 acceptable or not, allocation (h 2 , h 1 , h 3 ) or allocation (h 1 , h 2 , h 3 ) belongs to the strong core.
15 Set 5: two supply lexicographic preference agents (for each agent's ranking, the last option has been omitted)

Preferences
Strong core allocations The eight possible cases and the associated strong core allocations are shown in Table 15.Table 15 again shows that the strong core may be multi-valued.
The following case is analogous to the one just analyzed, but with agents 2 and 3 in inverted roles 1 (d)   3 (s)  2 (s)   .
H 1 blocking of all possible allocations.

4. 1
The weak and strong core for demand lexicographic markets Proposition 4 Consider a housing market (N , h, ), ∈ D N dlex , and its associated Shapley-Scarf market (N , h, d ).Then, SC( ) ⊇ SC( d ) = ∅.Proof Let (N , h, ) be such that ∈ D N dlex and (N , h, d ) be the associated Shapley-Scarf market.Hence, SC( d ) = ∅.Next, we prove that SC( ) ⊇ SC( d ).Let a ∈ SC( d ) and assume, by contradiction, that a / ∈ SC( ).Then, there exist a coalition S ⊆ N and an allocation b ∈ A such that (a) b(S) = h(S) and (b') for all agents i ∈ S,

Proposition 5
Consider a housing market (N , h, ), ∈ D N dlex , and its associated Shapley-Scarf market (N , h, d ).Then, ∅ = C( ) ⊆ C( d ).Proof Let (N , h, ) be such that ∈ D N dlex and (N , h, d ) be the associated Shapley-Scarf market.First, ∅ = C( ) follows from C( ) ⊇ SC( ) = ∅ (Proposition 4).Second, we prove C( ) ⊆ C( d ) by contradiction.Let a ∈ C( ) and assume that a / ∈ C( d ).Then, there exist a coalition S ⊆ N and an allocation b such that (a) b(S) = h(S) and (b) for all agents i ∈ S, b(i) d i a(i).
i ∈ D add implies i ∈ D dlex ∪ D slex and thus D dlex ∪ D slex ⊇ D add .The next four examples complete our analysis of relations between preference domains by showing that the following set inclusions are strict: D D sep (Example 5), 2. D sep D add for |N | > 3 (Example 6), 3. D add D dlex ∪ D slex for |N | > 3 when all houses and agents are acceptable (Example 7), and 4. D add D dlex ∪ D slex for |N | = 3 when some houses or agents are unacceptable (Example 8).

Fig. 2
Fig. 2 Preference domain set inclusions on the contrary, i ∈ D and j ∈ S, then the strong core is formed by the unique allocation a where:a(i) = h j and a(k) = k s second choice, if [k ∈ D and k → j] or [k ∈ S and k → i];k s first choice, otherwise.

D dlex of demand lexicographic preferences: an
agent i ∈ N has demand lexicographic preferences i ∈ D if there exist demand preferences • The domain D

slex of supply lexicographic preferences: an
agent i ∈ N has supply lexicographic preferences i ∈ D if there exist demand preferences Table 2 specifies agents' preferences.

Table 2
Example 1 preferences

Table 6
Market H 2 demand and supply preferences and utilities

Table 8
Market H 2 blocking of all possible allocations

Proposition 3 Proof of Proposition 3
Let (N , h, ) be such that |N | = 3, ∈ D N sep , and all houses and agents are acceptable.By Proposition 1, D N sep = D N add .For each agent i ∈ N , let

Table 14
Set two demand lexicographic preference agents (for each agent's ranking, the last option has been omitted)