Stable roommates with narcissistic, single-peaked, and single-crossing preferences

The classical Stable Roommates problem is to decide whether there exists a matching of an even number of agents such that no two agents which are not matched to each other would prefer to be with each other rather than with their respectively assigned partners. We investigate Stable Roommates with complete (i.e., every agent can be matched with any other agent) or incomplete preferences, with ties (i.e., two agents are considered of equal value to some agent) or without ties. It is known that in general allowing ties makes the problem NP-complete. We provide algorithms for Stable Roommates that are, compared to those in the literature, more efficient when the input preferences are complete and have some structural property, such as being narcissistic, single-peaked, and single-crossing. However, when the preferences are incomplete and have ties, we show that being single-peaked and single-crossing does not reduce the computational complexity—Stable Roommates remains NP-complete.


Introduction
Given 2n agents, each having preferences with regard to how suitable the other agents are as potential partners, the Stable Roommates problem is to decide whether there exists a matching, i.e., a set of disjoint pairs of the agents, without inducing a blocking pair. A blocking pair consists of two agents that are not matched to each other but prefer to be with each other rather than with their assigned partners. A matching without blocking pairs is called a stable matching.
Stable Roommates was introduced by Gale and Shapley [26] in the 1960's and has been studied extensively since then [32][33][34][35]48,49]. While it is quite straightforward to see that stable matchings may not always exist, it is not trivial to see whether an existing stable matching can be found in polynomial time, even when the input preference orders are complete and do not contain ties (i.e., each agent can be a potential partner to each other agent, and no two agents are considered to be equally suitable as a partner). For the case without ties, Irving [32] and Gusfield and Irving [30] provided O(n 2 )-time algorithms to decide the existence of a stable matching and to find one if it exists-for complete preferences and for incomplete preferences, respectively. Deciding whether a given instance admits a stable matching is NP-complete [48] when the given preferences are complete but may contain ties.
Solving Stable Roommates has many applications, such as matching students with each other to accomplish a homework project or users in a P2P file sharing network, assigning coworkers to two-person offices, partitioning players in two-player games, or finding receiverdonor pairs for organ transplants [36,38,39,50,51]. In such situations, the students, the people, or the players, who we jointly refer to as agents, typically have certain structurally restricted preferences concerning which other agents might be their best partners. For instance, when assigning roommates, each agent may have an ideal room temperature and may prefer to be with another agent with the same penchant. Such preferences are called narcissistic. Moreover, if we order the agents according to their ideal room temperatures, then it is natural to assume that each agent z prefers to be with an agent x rather than with another agent y if z's ideal temperature is closer to x's than to y's. These kind of preferences are called singlepeaked [5,17,31]. Single-peakedness is used to model agents' preferences where there is a criterion, e.g., room temperature, that can be used to obtain a linear order of the agents such that each agent's preferences over all agents along this order are strictly increasing until they reach the peak-their ideal partner-and then strictly decreasing. Single-peakedness is a popular concept with prominent applications in voting contexts. If the input preferences are complete and contain no ties, then testing whether they are single-peaked can be done in linear time [2,4,18,22].
Another possible restriction on the preferences is the single-crossing property, which was originally proposed to model individuals' preferences on income taxation [43,47]. To illustrate this, assume that the agents are increasingly ordered from left to right according to their income level. Then, one may observe that the agents' roommates preferences towards two arbitrary agents, say x and y, are such that the agents on the left prefer x to y while the agents on the right prefer y to x. This kind of preferences is not necessarily single-peaked as people do not always prefer to have a roommate of similar income level. If the input preferences are complete and contain no ties, then testing whether they are single-crossing can be done in polynomial time [8,18,19]. We refer to Bredereck et al. [9] and Elkind et al. [21] for numerous references on single-peakedness and single-crossingness. Related work. Bartholdi III and Trick [4] studied Stable Roommates with narcissistic and single-peaked preferences. They showed that for the case with linear orders (i.e., complete Table 1 Complexity of Stable Roommates for restricted domains: narcissistic, single-peaked, and singlecrossing preferences. "nar" means "narcissistic", "sp" means "single-peaked", "sc" means "single-crossing", "always" means that there is always a stable matching, and "unique" means that there is a unique stable matching. Entries marked with ♦ are from Irving [32]. Entries marked with ♠ are from Gusfield and Irving [30]. Entries marked with are from Ronn [48]. Entries marked with ♥ are from Bartholdi III and Trick [4]. Entries marked boldfaced with a reference to the corresponding theorem [T. x]  and without ties) a Stable Roommates instance with 2n agents always admits a unique stable matching, and they claimed an O(n)-time algorithm to find this matching [4,Section 3]. However, we will show in Example 4 that there are instances for which their algorithm runs in O(n 2 ) time. In terms of preference structures in the stable matching setting, using a connection to narcissistic single-crossing preference profiles (see Sect. 2.3 for the corresponding definition) and semi-standard Young tableaux [55], Chen and Finnendahl [13] counted the number of narcissistic preference profiles that are also either single-peaked or single-crossing. Paper structure and our contributions. We study the computational complexity of Stable Roommates for structured preferences when incompleteness and ties are allowed. In particular, we explore how the specific preference structures help in guaranteeing the existence of stable matchings and in designing efficient algorithms for finding a stable matching, even when the input preferences may be incomplete or contain ties. In Sect. 2, we discuss natural generalizations of the well-known single-peaked and single-crossing preferences (that were originally introduced for linear orders) for incomplete preferences with ties. In Sect. 3, we show that for complete preference orders, structurally restricted preferences such as being narcissistic and single-crossing or being narcissistic and single-peaked guarantee the existence of stable matchings. Moreover, we demonstrate that the known algorithm of Bartholdi III and Trick [4] can be extended to always find a stable matching in two new cases: The algorithm works (1) when the preferences are complete, narcissistic, single-crossing, and may contain ties as well as (2) when the preferences are complete, narcissistic, single-peaked, and may contain ties.
In Sect. 4 we study the case where the preferences are incomplete and may contain ties, and prove that Stable Roommates becomes NP-complete, even when the preferences are narcissistic, single-peaked, and (tie-sensitive) single-crossing. Our results, together with those from related work, are surveyed in Table 1. We conclude in Sect. 5 with some open questions.

Fundamental concepts and basic observations
In this section, we introduce fundamental concepts and notions, arising from stable matchings and structured preferences, and we make some crucial observations regarding relations between the different structured preferences.

Preferences, acceptable sets, and acceptability graphs
Let V = {1, 2, . . . , 2n} be a set of 2n agents. A (preference) profile P = ( i ) i∈V is a collection of the preference orders of the agents from V . Here, the preference order i of each agent i ∈ V is a weak order on a subset V ( i ) ⊆ V of agents that i finds acceptable as a partner. The set V ( i ) is called the acceptable set of i. Recall that a weak order on a set X is a transitive (i.e., x y and y z imply x z) and complete (i.e., x y or y x for all x, y ∈ X ) binary relation on X (see [6,Chapter 4] is a weak order on {1, 2, 3}. Note that the completeness of weak orders implies reflexivity. For each agent i and each two acceptable agents x, y ∈ V ( i ) of i, the expression "x i y" means that agent i weakly prefers x over y (i.e., i finds that x is at least as good as y). We use i to denote the asymmetric part of i (i.e., x i y and ¬(y i x), meaning that i strictly prefers x to y) and ∼ i to denote the symmetric part of i (i.e., x i y and y i x, meaning that i values x and y equally).
Since a preference order can be decomposed into an asymmetric part and a symmetric part ∼, in the following when we illustrate a preference order, we only describe the part and the "relevant" ∼ part. For instance, the preference order as described in (1) will be depicted as follows: Observe that we omitted the relations 1 ∼ 1, 2 ∼ 2, and 3 ∼ 3 for the sake of readability.
We assume that the acceptability relation between each two agents is symmetric, i.e., for each two distinct agents i and j it holds that "i finds j acceptable if and only if j finds i acceptable", as otherwise i and j will never be partners of each other. Formally, this means that i ∈ V ( j ) if and only if j ∈ V ( i ). Moreover, since an agent that is not acceptable to any other agent will never obtain a partner, we also assume that for each agent i there is at least another agent j = i with i ∈ V ( j ).
We note that although in Stable Roommates an agent cannot be matched to itself, it may still make sense to include an agent x in its own acceptable set, i.e., x ∈ V ( x ), for instance when the preferences of x are based on how close or similar agents are to the ideal partner of x and a partner which is "identical" to x itself is an ideal partner of x. This has no implication at this point, because no agent can be matched to itself and "identical clones" do not exist. Allowing this, however, drastically simplifies definitions of restricted preferences in Sect. 2.3, in particular when narcissistic preferences are involved. We call an agent x a most acceptable agent of another agent y if for all z ∈ V ( y ) \ {x, y} it holds that x y z, where y denotes the preference order of y. Note that an agent can have more than one most acceptable agent.
Let X ⊆ V and Y ⊆ V be two disjoint sets of agents and be a binary relation over V ×V . To simplify notation, by X Y , we mean that for each two agents x and y with x ∈ X and (a) (b) Fig. 1 Acceptability graphs of two special cases of Stable Roommates y ∈ Y it holds that x y. Analogously, by X Y and X ∼ Y we mean that for each two agents x and y with x ∈ X and y ∈ Y it holds that x y and x ∼ y, respectively. For each binary relation symbol ∈ { , , ∼}, we use X y and y X as shortcut for X {y} and {y} X , respectively.
To visualize which agent is considered as acceptable by an agent we introduce the notion of acceptability graphs. An acceptability graph G for a set V of agents is an undirected graph without loops, where an edge signifies that two distinct agents find each other acceptable. We use V to also denote the vertex set of G. Formally, for each agent i ∈ V , there is a vertex i corresponding to agent i. There is an edge As already discussed, we assume without loss of generality that G does not contain isolated vertices as otherwise the corresponding agents will never be able to obtain a partner. We illustrate two prominent special cases of acceptability graphs in Fig. 1.

Blocking pairs and stable matchings
Given a preference profile P for a set V of agents, a matching M ⊆ E(G) is a subset of disjoint pairs {x, y} of agents with x = y (or edges in E(G)), where E(G) is the set of edges in the corresponding acceptability graph G. Slightly abusing notation, given an agent x ∈ V , if there exists an agent y ∈ V with {x, y} ∈ M, then we let M(x) := y and say that x and y are partners of each other (under M); otherwise we let M(x) := ⊥. We say that a pair {x, y} A matching M is perfect if every agent is assigned a partner by M. An unmatched pair {x, y} ∈ E(G) \ M is blocking M if the pair "prefers" to be matched with each other rather than staying in their current state, i.e., it holds that A matching M is stable if no unmatched pair is blocking M. When the preferences may contain ties, our stability concept is sometimes referred to as weak stability in the literature to distinguish from two other stability concepts, called strong stability and super stability [30]. When the preferences do not contain ties, all these three stability concepts are equivalent. In this work, we only focus on weak stability. For the sake of brevity, we thus simply use stability to refer to weak stability. both are perfect. However, if agent 3 changes its preference order to 3 1 2 4, then the resulting profile does not admit any stable matching: One can check that for each matching, any agent i, 1 ≤ i ≤ 3, that is matched to agent 4 will form a blocking pair together with the agent that is at the third position of the preference order of i.
We investigate the computational complexity of the following stable matching problem.
Stable Roommates Input: A preference profile P for a set V = {1, 2, . . . , 2n} of 2n agents. Question: Does P admit a stable matching?

Properties of a preference profiles
A preference profile P may have one ore more of the following three simple properties: Note that complete preferences without ties are exactly linear orders on V .
Definition 2 (Narcissism) A profile P is narcissistic if each agent i strictly prefers itself to every other acceptable agent, i.e., for each j ∈ V ( i ) \ {i} it holds that i i j.
The profile given in Example 1 is complete and narcissistic, and contains one tie. We note that having complete preferences means that any two distinct agents can be matched with each other. Thus, a stable matching must be perfect. As for the narcissistic property alone, there is no restriction on or guarantee for the existence of a stable matching. We will, however, see that requiring some restricted preferences, such as single-peaked or single-crossing preferences as formally defined below, to be also narcissistic makes a difference (see for instance Example 2).
As already discussed in Sect. 1, the single-peaked and the single-crossing properties were originally introduced and studied mainly for linear preference orders (i.e., preferences without ties). For preferences with ties, a natural generalization is to think of a possible linear extension of the preferences for which the single-peaked or single-crossing property holds. We consider this variant in our paper.
Definition 3 (Single-peakedness) Let be a linear order on the agent set V . An agent i with preference order i is single-peaked with respect to if for each three distinct agents x, y, z it holds that x y z and x i y implies y i z.
Accordingly, profile P is single-peaked if there exists a linear order on V such that each agent from P is single-peaked with respect to . We refer to as a single-peaked order of the profile.

Example 2
The profile given in Example 1 is narcissistic and single-peaked with respect to the linear order 1 2 3 4. See Fig. 2a for an illustration. In fact, as we will see in Sect. 3, a narcissistic and single-peaked preference profile always admits a stable matching.
Recall that if agent 3 changes its preference order to 3 1 2 4, then the resulting profile does not admit any stable matching and, indeed, it is also not single-peaked anymore.
Just as for the single-peakedness property, the single-crossingness property also requires a natural linear order of the agents, the so-called single-crossing order. However, unlike the single-peakedness property which assumes that the preferences of an agent i over two agents are compared by their "distance" to the peak along the single-peaked order, the singlecrossingness property assumes that the agents' preferences over each two distinct agents change (cross) at most once.
In fact, for preferences with ties, two natural single-crossing notions are of interest. To describe them, we introduce two notions that can be used to partition a subset of agents according to their preferences over two distinct agents. Given a preference profile P = ( i ) i∈V , for each two distinct agents x and y, let denote the subset of agents i that strictly prefer x to y (i.e., x is better than y), and let denote the subset of agents i that find x and y to be of equal value (i.e., x and y are tied with each). Here, symbol B means "better than" while symbol T means "tied with". Definition 4 (Single-crossingness) Let be a linear order on the agent set V . A preference profile P = ( i ) i∈V is single-crossing with respect to the linear order if there exists a preference profile P = ( i ) i∈V without ties such that the following two conditions hold.
(i) For each agent i ∈ V , the order i is a linear extension of i , i.e., the order i is a linear order on the acceptable set V ( i ) with i ⊆ i . (ii) For each two distinct agents x, y ∈ V it holds that T P (x, y) = ∅ such that either B P (x, y) B P (y, x) or B P (y, x) B P (x, y).
Accordingly, profile P is single-crossing if there exists a linear order on the agent set V such that P is single-crossing with respect to .

Example 3
The profile from Example 1 is single-crossing with respect to the linear order 1 2 3 4. See Fig. 2b for an illustration.
We also consider a more restricted concept of single-crossingness which requires that the agents that have ties towards a pair are "ordered in the middle".
Definition 5 (Tie-sensitive single-crossingness) Again, let be a linear order on the agent set V . A profile P on V is tie-sensitive single-crossing with respect to the order if for each two distinct agents x and y it holds that

Basic observations for the structural properties of preferences
Incomplete preferences with ties, i.e., weak orders, as used in this work are incomparable to partial orders because partial orders are antisymmetric. However, the asymmetric part of a weak order is indeed a partial order. There are many slightly different concepts of singlepeakedness and single-crossingness for partial orders [20,25,37]. It is known that detecting single-peakedness or single-crossingness is NP-hard for partial orders under most of the concepts studied in the literature [2,4,8,18,19,22]. For partial orders, our two single-crossing concepts are incomparable. In particular, there are incomplete preferences with ties which are single-crossing but not tie-sensitive single-crossing, and the converse also holds. For complete preferences with ties which is a restricted case of partial orders, Elkind et al. [20] showed that tie-sensitive single-crossing preference profiles are a strict subset of singlecrossing preference profiles. In the following, we extend these results by considering the case when the preferences can be incomplete.
Proof Statement (1) follows from the observation that when a profile does not have any ties, the definitions of single-crossingness (Definition 4) and tie-sensitive single-crossingness Definition 5 coincide. The preference profile given in Fig. 3b is single-crossing but not tie-sensitive single-crossing, which shows Statement (2).
It remains to show Statement (3). Let P = ( i ) i∈V be a profile which is tie-sensitive singlecrossing with respect to some linear order on V . We resolve the ties in the preferences given in P according to an arbitrary but fixed order on V and show that this extended profile fulfills the conditions given in the definition for tie-sensitive single-crossingness (see Definition 5). To this end, let be an arbitrary but fixed linear order on V and let P = ( i ) i∈V be a copy of the profile In this way, for each agent i and for each two distinct agents x, y ∈ V ( i ) acceptable to i, we have that since the preference order i is a weak order on V ( i ).
First of all, we claim that P fulfills the first condition given in Definition 4. For the sake of contradiction, suppose that there is an agent i such that i is not a linear extension of i . Observe that by our construction, i is a complete binary relation on V ( i ). Moreover, for each two acceptable agents x, y ∈ V ( i ) it holds that x i y implies that x i y. Hence, the assumption that i is not a linear extension of i means that i is not transitive, i.e., there are three acceptable agents x, y, z ∈ V ( i ) with x i y, y i z, and z i x. ( By Property (2), we infer that x i y, y i z, and z i x. By the transitivity of i , these three relations imply that x ∼ i y, y ∼ i z, and z ∼ i x. This means that the pairwise relative orders of x, y, z in i are resolved according to the order , i.e., x y, y z, and z x-a contradiction to being transitive.
It remains to show that P = ( i ) i∈V is single-crossing with respect to . Suppose towards a contradiction that P is not single-crossing with respect to , and suppose that there are three agents i, j, k in the order i j k and there are two acceptable agents x i y, y j x, and x k y.
By Property (2), we infer that x i y,y j x, and x k y.
We distinguish between two cases for x j y, in each case aiming at reaching a contradiction.
If x ∼ j y, then by (4) it follows that y x and that ¬(y ∼ i x) and ¬(y ∼ k x). Thus, by (5), it follows that x i y and x k y-a contradiction to being a tie-sensitive single-crossing order for P.
If y j x, then since is a tie-sensitive single-crossing order for P, by (5) it follows that ¬(x i y) or ¬(x k y). This implies that x ∼ i y or x ∼ k y. If x ∼ i y, then y k x-a contradiction to (5). If x ∼ k y, then y i x-again a contradiction to (5).
For incomplete preferences with ties, Lackner [37] showed that detecting singlepeakedness is NP-complete. For complete preferences with ties, while Elkind et al. [20] showed that detecting single-crossingness is NP-complete, Fitzsimmons [24] and Elkind et al. [20] provided polynomial-time algorithms for detecting single-peakedness and tiessensitive single-crossingness, respectively. All these known hardness results seem to hold only when the preferences have ties. However, we observe that the hardness reduction for Corollary 6 of Elkind et al. [20] indeed can be adapted to show NP-hardness for deciding whether an incomplete preference profile without ties is single-peaked (resp. single-crossing). The crucial differences are that they allow ties and that the agents and the alternatives are different while we do not allow ties and our agent set is the same as the set of alternatives. For the sake of completeness, we show this adapted reduction.

Proposition 2 Deciding whether a preference profile with incomplete preferences and without ties is single-crossing (or equivalently tie-sensitive single-crossing) or single-peaked is NPcomplete.
Proof The three decision problems are clearly contained in NP as given a linear order on the agent set one can verify in polynomial-time whether the given preference profile is single-crossing, tie-sensitive single-crossing, or single-peaked with respect to the order ; note that the preferences do not contain ties.
To show NP-hardness, as Elkind et al. [20], we reduce from the NP-hard Betweenness problem [46]: Betweenness Input: Given a universe U = {u 1 , . . . , u n } and a set T = {t 1 , . . . , t m } of ordered triples over U . Question: Is there a betweenness order , that is, a total linear order over U such that for each triple (x, y, z) from T it holds that either x y z or z y x?
The reduction for the single-peaked case is quite simple while the reduction for the singlecrossing case is similar to the one used by Elkind et al. [20,Corollary 6]. The single-peakedness case. Given an instance I = (U , T ) of Betweenness, where U = {u 1 , . . . , u n } and T = {t 1 , . . . , t m }, we construct a preference profile P = ( x ) x∈V for an agent set V , whose preferences contain no ties but may be incomplete; without loss of generality we assume that the elements in each ordered triple (x, y, z) ∈ T are pairwise distinct.
The agent set V has two types of agents, which sum up to n + 2m agents. First, for each element u i add to V an element agent with the same name. Second, for each triple t j = (x, y, z) from T (with x, y, z ∈ U ) add to V two agents a j and a j . We will construct the preference orders of a j and a j to ensure that the second element y in triple t j is ordered between the other two elements x and y in a betweeness order.
The preference orders of the agents are constructed as follows: -Each element agent u i ∈ U only finds those agents acceptable that "contain" u i , and has a linear order on these acceptable agents that are consistent with the following order L := a 1 · · · a m a 1 · · · a m .
Formally, the preference order of agent u i is the preference orders of a j and a j are a j : y x z and a j : y z x.
We show that P is single-peaked if and only if the given instance is a yes-instance. On the one hand, every betweenness order for I = (U , T ) can be extended to a single-peaked order for P by appending to the order L. On the other hand, note that the preference orders of the agents of the second type require a single-peaked order to place element y in between x and z. Thus, a single-peaked order for P restricted to U is also a betweenness order for (U , T ). The single-crossingness and tie-sensitive single-crossingness case. Since for preferences without ties, single-crossingness is equivalent to tie-sensitive single-crossingness (see Proposition 1(1)) we only focus on the single-crossingness case. Given an instance I = (U , T ) of Betweenness, where U = {u 1 , . . . , u n } and T = {t 1 , . . . , t m }, we construct a preference profile P = ( x ) x∈V for an agent set V , whose preferences contain no ties but may be incomplete; without loss of generality we assume that the elements in each ordered triple (x, y, z) ∈ T are pairwise distinct.
The agent set V has two types of agents, which sum up to n + 3m agents. First, for each element u i add to V an element agent with the same name. Second, for each triple t j = (x, y, z) from T (with x, y, z ∈ U ) add to V three agents a j , b j , c j . Again, we will construct the preference orders of a j , b j , and c j to ensure that the second element y is ordered between the other two elements x and z. Before we describe how to construct the preference orders, let us describe the acceptable set of each agent: For each triple The preference orders of the agents are constructed as follows: -For each triple t j = (x, y, z) from T , the preference orders of agents a j , b j , and c j are the same linear order on {x, y, z}, which is ascending on the indices of x, y, z in U . -For each element agent u ∈ U , construct the preference order u of u such that for each two triples t j and t j with j < j that contain the element u it holds that The specific order on the triple agents in T j (resp. T j ) depends on the position of u in the triple t j . To this end, let To make the preference order of u a linear order, for each triple t j ∈ T with t j = (x, y, z) that contains the element u, let u obey the order L k j if and only if u = k. We show that P is single-crossing if and only if the given instance is a yes-instance. On the one hand, a single-crossing order for the constructed profile restricted to U is a betweenness order for (U , T ): For every triple t j = (x, y, z) from T the preference orders of x, y, and z restricted to T j imply that either x y z or z y x. On the other hand, a betweenness order for (U , S) can be extended to a single-crossing order for the constructed profile by appending the order a 1 b 1 c 1 · · · a m b m c m to its end.
Saporiti and Tohmé [52] showed that for complete preferences without ties, narcissistic and single-crossing preferences are also single-peaked. We strengthen this result by showing that the relation also holds when ties are allowed. Further, we note that although Barberà and Moreno [3] also considered complete preferences with ties, their single-crossingness for the case with ties only resembles our tie-sensitive single-crossing definition, which is a strict subset of the single-crossingness defined in Definition 4 (also see Proposition 1 (2)-(3)).

Proposition 3 If a complete, even with ties, and narcissistic preference profile P admits a single-crossing order , then this order is also a single-peaked order.
Proof Suppose for the sake of contradiction that with a 1 a 2 · · · a 2n is not singlepeaked. This means that there exists an agent a i that is not single-peaked with respect to , and there are three agents a j , a k , a with a j a k a such that a j a i a k and a a i a k . Together with the property of being narcissistic, the following holds: : a i a i a j a i a k and a i a i a a i a k , agent a j : a j a j a k , agent a k : a k a k a j and a k a k a , agent a : a a a k .
On the one hand, the agents' preferences over the pair {a j , a k } implies that i < k. On the other hand, the pair {a k , a } implies that i > k-a contradiction.
The profile shown in Fig. 2 is narcissistic and single-crossing with respect to the order 1 2 3 4 and it is also single-peaked with respect to the same order .
There is no direct relation between single-peakedness and single-crossingness, even if the profile is complete and do not contain ties [9].

Proposition 4 Even for complete preference profiles without ties, single-peakedness does not imply single-crossingness. Neither does single-crossingness imply single-peakedness.
Proof The statements are indicated in [9, Figure 1]. For the sake of completeness, however, we show the statements through the following two concrete profiles.
One can verify that profile P 1 has complete preferences without ties, and is single-peaked with respect to the linear order 3 1 2 4. However, it is not single-crossing because agents 1, 2, 3, and 4 form a forbidden configuration of single-crossingness [8].
Since there are only two different preference orders, profile P 2 is obviously single-crossing, for instance, with respect to the linear order 1 2 3 4. However, it is not single-peaked since agent 1 and agent 3 form a forbidden configuration of single-peakedness [2].

Complete preferences
In this section, we analyze the computational complexity of Stable Roommates for the case when the input preference profiles have complete and structured preferences. In particular, we show that the NP-hard Stable Roommates problem with ties allowed becomes polynomialtime solvable when the preferences are narcissistic and either single-crossing or singlepeaked.
For the case of complete, narcissistic, and single-peaked preferences without ties, Bartholdi III and Trick [4] showed that there is always a unique stable matching and provided an algorithm to find it. Their algorithm is based on the following two facts (referred to as Propositions 5 and 6) that are related to the concept of most acceptable agents. We show that the facts transfer to the case with ties.

Proposition 5
If the given preference profile P is complete (even with ties), narcissistic, and single-peaked, then there are two distinct agents i, j that are each other's most acceptable agents.

Proof
The statement for complete, narcissistic, and single-peaked preferences without ties was shown by Bartholdi III and Trick [4]. It turns out that this also holds for the case when ties are allowed. Let V be the set of all 2n agents and consider a single-peaked order of the agents V with x 1 x 2 · · · x n . For each agent x ∈ V , let M x be the set of all most acceptable agents of x. Towards a contradiction, suppose that each two distinct agents x and y have x / ∈ M y or y / ∈ M x . By the narcissistic property and single-peakedness, each M x ∪ {x} forms an interval in . This implies that the first agent x 1 and the last agent x n in the order have x 2 ∈ M x 1 and x n−1 ∈ M x n . By our assumption (x / ∈ M y or y / ∈ M x ), however, x 2 ∈ M x 1 implies that for each i ∈ {2, . . . , n} the following holds: By the stability definition, we obtain the following for complete preferences.

Proposition 6
Let P be a preference profile with complete preferences and let M be a stable matching for P. Let P be a preference profile resulting from P by adding two agents x, y who consider each other as most acceptable (and their preferences over other agents and the preferences of other agents over x, y are arbitrary but fixed, respectively). Then, matching M ∪ {{x, y}} is stable for P .
Proof Suppose for the sake of contradiction that M ∪{{x, y}} is not stable for P . This means that P has a blocking pair {u, w} / ∈ M. Obviously, |{u, w} ∩ {x, y}| = 1 as otherwise {u, w} would also be a blocking pair for P. Assume without loss of generality that u = x. Then, by the definition of blocking pairs, it must hold that w x y-a contradiction to y being one of the most acceptable agents of x. Utilizing restricted versions of Propositions 5 and 6, Bartholdi III and Trick [4] derived a greedy algorithm to construct a unique stable matching when the preferences are linear orders (i.e., complete and without ties) and are narcissistic and single-peaked (see Algorithm 1). For 2n agents they claimed that their algorithm runs in O(n) time by observing that, after adding a pair to the solution matching, at most two other agents need to update their most acceptable agent. However, since updating the most acceptable agent may take O(n) time, it is not clear how to implement their algorithm to achieve O(n) running time. Indeed, by generalizing their example Bartholdi III and Trick [4, Section 3] to the case with 2n agents, we show the following: Assuming, as input, an integer vector for each agent is given, which lists the agents in order of its preferences, their algorithm may take O(n 2 ) time, even if the single-peaked order is known.

Example 4
We consider a complete, narcissistic, single-peaked, and single-crossing preference profile P n without ties, for 2n agents. The preference orders will be pasted together from the following "preference pieces" X i and Y i with i ∈ [n]: Note that for every i ∈ [n], the piece X i covers contiguous interval of 2n − 2i alternatives. Together with the pieces Y 1 , Y 2 , . . ., Y i−1 , all but two alternatives are covered: i and 2n +1−i are the only alternatives that are not covered. Now, let us define the preference orders of the agents in the profile. For each i ∈ [n] the two agents i and 2n + 1 − i have "almost" opposite preferences: ) denote the reverse preference orders of X i and Y j , respectively. Observe that, for i = 1, the preference pieces ← − Y 1 are empty. Thus, the first agent and the last agent have reverse preference orders 1 2 · · · 2n and 2n 2n − 1 · · · 1, respectively.
For n = 3, the corresponding preference profile P 3 looks as follows: Running time of Bartholdi III and Tricks' algorithm (see Algorithm 1). First, observe that due to the preference orders of agents 1 and 2n, the canonical order as described above is the unique single-peaked order (up to reversal). Hence, let us assume that the preference orders of P n and the order are given as input. Applying the algorithm of Bartholdi III and Trick [4] (see Algorithm 1), in the first round, each agent i ∈ [n] regards its "successor agent" i + 1 (along ) as the most acceptable agent while each agent k ∈ [2n] \ [n] regards its "predecessor agent" k − 1 (along ) as the most acceptable agent. Thus, in this round, agents n and n + 1 are the only agents that regard each other as most acceptable. We find them in O(n) time and add {n, n + 1} to M.
In the second round, agents i := n − 1 and j := n + 2 have to update their most acceptable agents since their currently most acceptable ones are matched with each other. But the updating time of each agent depends on the number of pairs that are already in the solution M no matter what looks like since in general the "successor" or "predecessor" of i or j might already have been matched in some previous round. For agents n − 1 and n + 2, we need to traverse to the third agent in their preference orders to find one which are unmatched. In this case, n − 1 and n + 2 find each other most acceptable after {n, n + 1} is added to M.
For our profile, in round z, starting from z = 2, we need to update the most acceptable agents of agents n − z + 1 and n + z since the pair {n − z + 2, n + z − 1} is added to M in round z −1. To update, we need to go through the preference orders of n −z +1 and n +z until we find a next most acceptable and not-yet-matched agent. This takes O(z) time because both agents n − z + 1 and n + z have not updated their most acceptable agents but prefer all matched agents to their next most acceptable and not-yet-matched one. Summarizing, we need O(n + 2 + 4 + . . . + 2n) = O(n 2 ) time to construct a unique stable matching, if we assume that the input contains the preference orders of all agents (implemented as integer vectors) and a single-peaked order of the agents.
For the case with ties, we will show that Algorithm 1 also works for narcissistic, singlepeaked profiles. In particular, there is always a stable matching, albeit perhaps not unique.
Since each agent regards every other agent as equally good, any perfect matching is a stable matching. Since the profile is complete and has four agents, there are 4 2 /2 = 3 perfect matchings which are all stable. It is also straight-forward to verify that the profile is narcissistic, single-peaked, and (tie-sensitive) single-crossing with respect to the order 1 2 3 4.
Next, we show that the idea behind Bartholdi III and Trick's algorithm (see Algorithm 1) also works for the case with ties.
Theorem 1 If a preference profile with 2n agents is complete, possibly with ties, narcissistic and single-peaked, then it always admits a stable matching, which can be found in O(n 2 ) time.
Proof To show that such a profile P always admits a stable matching, we show that on input P Algorithm 1 always returns a matching of P which is stable. Indeed, the latter follows directly from Propositions 5 and 6 and the narcissistic and single-peaked property is preserved after deleting any agent.
As for the running time, there are n rounds to build up M, and in each round we find two distinct agents x and y whose most acceptable agent sets M x and M y (in the updated profile) include x respectively y: x ∈ M y and y ∈ M x .
Note that Proposition 5 implies that two such agents exist. One way to search for two such agents is to go through all pairs {x, y} and check whether Condition (6) holds. This leads to an algorithm with running time O(n 3 ). To obtain an O(n 2 )-time algorithm, however, we observe that we only need to check an agent pair {x, y} upon Condition (6) when the most acceptable agents of one of x and y, say x, are all matched (in previous rounds) such that y is the next less preferred agent by x. This guarantees that we have to check each pair of agents at most twice, once for x and once for y. In total, we can find a stable matching in O(n 2 ) time.
We describe this idea in Algorithm 2 (see ComputeStableMatching()), which uses only simple data structures such as integer matrices and vectors.
As input, we assume that for each agent x there is an integer vector L x that lists the agents in order of the preferences of x, with ties resolved in an arbitrary way. Moreover, we assume to have an n × n integer rank matrix R where R[x, y] contains the rank of agent x in the preference list of agent y. Herein, the rank of agent y in agent x's preference list is defined as the number of agents that are strictly preferred to y by x. For example, if the preference list of agent 1 is 1 2 3 ∼ 4 5 ∼ 6 7, then we may have L 1 = [1,2,3,4,5,6,7] and have R [1,1] Before we show the correctness of Algorithm 2, we first claim the following. Each call of InsertMostPreferred(z)  points to a position in the preference list L z of z such that InsertMostPreferred(z) goes through the preference list L z of z, using pointer p [z], and finds all most acceptable agents of z, updating the row A[z], until p[z] points to a position which contains an agent that is strictly less preferred.
For each following execution of InsertMostPreferred(z), observe that the procedure is only called when D[z] = 0 and when B[z] = 0. Since B[z] is increased whenever some entry A[z, x] is set from zero to one and decreased whenever some entry A[z, x] is set from one to zero, this implies that A[z, x] = 0 holds for each agent x ∈ V when the procedure is called. Moreover, at the beginning of the execution of InsertMostPreferred(z) (except the first call), integer p z points to the position of the first agent in the list L z that is strictly less preferred than all agents that were previously inserted into A. Now, whenever called, InsertMostPreferred(z) uses p[z] to continue iterating through the preference list L z . Only unmatched agents L z [ p [z]] (see Line (17)) that are most-preferred by z are inserted into the matrix A by setting A[z, y ] = 1 until either the end of the the preference list L z is reached (i.e., p[z] = n + 1), or at least one agent was inserted (i.e., B[z] > 0) such that p z points to the position of an agent that is strictly less preferred to the just inserted agent (stored as y ). Now, to show the correctness of Algorithm 2, we need to show To verify (i), clearly, the first pair that is added to M satisfies (i). Assume that {x i , y i } is the i th pair added to M such that all i − 1 previous pairs q 1 , . . . , q i−1 added to M satisfy (i). Suppose, for the sake of contradiction, that y i is not one of the most acceptable agents of x i , after all agents in the pairs q 1 , . . . , q i−1 are deleted from the profile. Let y be a not-yet-matched agent that is strictly preferred to y i by x i . Now, consider the call InsertMostPreferred when {x i , y i } is pushed to Q. By (b) and since p z is none-decreasing, it follows that {x i , y} is added to Q in a previous round. This means that {x i , y} must be considered before {x i , y i } in the queue Q and will thus be added to M, a contradiction.
As for (ii), observe that whenever the algorithm pops a pair from Q, the queue Q contains every pair of agents that currently consider each other most acceptable (see (b) and (c)). The queue Q may contain further pairs of agents where one or both agents are already deleted; these pairs, however, will be detected (Line (8)) and ignored by the algorithm. Thus, the existence follows analogously to the one for Algorithm 1. Finally, we analyze the running time. First of all, every agent x is deleted (by calling SmartDelete(x)) at most once. Each call of SmartDelete(x) takes O(n) steps (some constant number of operations, adjusting one row and one column in A, each of size n), plus some calls of InsertMostPreferred. Second, InsertMostPreferred takes amortized O(n) running time for each agent z since it iterates through the preference list of z only once. Third, after the initialization, every entry A[x, y] is set from zero to one at most once (see Line (19)), which happens only when A[x, y] was zero. It is reset to zero at most once, which happens only when SmartDelete(x) or SmartDelete(y) is called and when A[x, y] was one (see Lines (27) and (29)). Since {x, y} is only pushed to Q in InsertMostPreferred(x) or  (17), (19), and (20)), it follows that {x, y} can be pushed to the queues Q at most once. Since there are O(n 2 ) pairs that can be added to Q and since SmartDelete is only called whenever a pair is added to M, ComputeStableMatching indeed takes O(n 2 ) time. Now, we move on to (tie-sensitive) single-crossingness.

Proposition 8 If a preference profile with 2n agents is complete, with ties, narcissistic and single-crossing, then it always admits a stable matching, which can be found in O(n 2 ) time.
Proof By Theorem 3 and Proposition 1(1), the stated profiles are single-peaked. By Theorem 1, we obtain the desired statement.

Incomplete preferences
In this section, we consider the case when the input may contain incomplete preferences, meaning that the underlying acceptability graph may not be a complete graph. One reason for the occurrence of incomplete preferences could be that two agents may consider each other unacceptable and do not want to be matched together, or they are not "allowed" to be matched to each other. If in this case no two agents are considered of equal value by any agent (i.e., the preferences do not have ties), then Stable Roommates still remains polynomialtime solvable [30]. However, once ties are involved, Stable Roommates becomes NP-complete [48] even for complete preferences.
First of all, we observe that once ties are allowed, neither single-peakedness nor singlecrossingness, combined with narcissism, can guarantee that there are always two agents that are each other's most acceptable agent (see Proposition 9 (3)). However, having two such agents is crucial for the existence of a stable matching so that it can be found by the algorithm by Bartholdi III and Trick [4] (see Algorithm 1). Moreover, for incomplete preferences, even without ties, narcissistic and single-crossing preferences do not imply single-peakedness anymore.

Proposition 9
For incomplete preferences without ties, the following holds.
(1) Narcissistic and single-crossing preferences are not necessarily single-peaked.
(2) Narcissistic and single-peaked (resp. single-crossing) preferences do not guarantee the uniqueness of stable matchings. One can check that the profile is narcissistic, and it is single-crossing with respect to the order 5 6 2 3 4 1. But it is not single-peaked with respect to because agent 1's preference order on {1, 3, 4} is not single-peaked with respect to . In fact, the profile is not single-peaked at all since the preference orders of agents 1, 2, and 3 restricted to the alternatives {1, 5, 6} form a forbidden subprofile (the so-called worst-configuration) for the single-peaked property [2]: In a single-peaked order, regarding the preference orders of agents 1 and 2, agent 5 must be ordered between 1 and 6, which is not possible because of the preference order of agent 3. The profile does not admit a perfect stable matching, i.e., a stable It is narcissistic, and single-peaked and single-crossing with respect to the order 3 2 1 4 5 6. One can check that the profile is single-peaked with respect to the order . For single-crossingness, observe that each pair of agents is ranked by at most two different agents so that the profile is (tie-sensitive) single-crossing with respect to any ordering. However, no matching M is stable for this profile. To see this, notice that the preferences of agents from A * := {1, 2, 3, 4, 5} form a certain cyclic structure: For each agent i ∈ A * it holds that agent i is the most preferred agent of agent (i mod 5) + 1. Now, consider an arbitrary matching M. Since |A * | is odd, there is at least one agent i ∈ A * with M(i) / ∈ A * . It is straightforward to see that agent i and agent (i mod 5) + 1 will form a blocking pair for M.
For the case when ties in the preferences are allowed, Ronn [48] showed that Stable Roommates becomes NP-hard even if the preferences are complete. The constructed instances in his hardness proof, however, are not always single-peaked or single-crossing. It is even not clear whether the problem remains NP-hard for this restricted case. If the preferences need not be complete, however, then we can show NP-hardness, by a completely different reduction, obtaining our main intractability result.
Before we state the corresponding theorem, we prove the following two lemmas which are used heavily in our preference profile construction to force two agents of specific types to be matched together. The first lemma summarizes an observation on a profile that is similar to profile P 3 presented in the proof of Proposition 9. A = {a 1 , a 2 , a 3 , a 4 , a 5 } be a set of five distinct agents and let X be a nonempty set of agents disjoint from A. The preference orders of the agents in A satisfy the following, where (X ) means that the agents in set X are tied with each other: agent a 1 : a 1 a 5 a 2 , agent a 2 : a 2 a 1 a 3 , agent a 3 : a 3 a 2 a 4 , agent a 4 : a 4 a 3 a 5 , agent a 5 : a 5 (X ) a 4 a 1 .

Lemma 1 Let
Then, the following holds. (

3) The preferences from A are tie-sensitive single-crossing with respect to any ordering of the agents in A.
Proof Towards a contradiction to Statement (1), suppose that there is a stable matching M with M(a 5 ) / ∈ X . Then, by the preferences of ∼a 5 , there remain three possibilities (i)-(iii) for the partner of a 5 . We claim to obtain a blocking pair for M for each of these possibilities.

Case (i): M(a 5 ) /
∈ {a 1 , a 4 }. This implies that agent a 5 does not have a partner. Then, by construction, {a 5 , a 1 } will be blocking M. Case (ii): M(a 5 ) = a 4 . Since a 4 prefers a 3 to a 5 , it follows that a 3 must obtain a partner that it prefers to a 4 as, otherwise, {a 3 , a 4 } will form a blocking pair for M.
Since a 2 is the only (acceptable) agent that a 3 prefers to a 4 , it follows that We have just shown that M(a 5 ) ∈ X . By the preferences of a 2 it follows that M(a 2 ) = a 1 as otherwise a 1 is unmatched and will form a blocking pair with a 2 . Similarly, we can infer that M(a 4 ) = a 3 . Statement (2) is straight-forward. As for Statement (3), which concerns tie-sensitive single-crossingness, we observe that it holds with respect to every order of the agents: Each pair of agents is ranked by at most two different agents and ties only occur in the preferences of a 5 .
Whereas Lemma 1 enforces that a specific agent (i.e., a 5 ) must be matched with some agent from a specific group of agents (i.e., X ), the forthcoming lemma enforces some specific combination of matchings inside this specific group X . This seems crucial to ensure the narcissistic, single-peaked, and tie-sensitive single-crossing property. Lemma 2 Let X := {x 1 , x 2 , . . . , x 10 }, R := {r 2 , r 4 , r 6 , r 8 } be two disjoint sets of agents, and let A and B be two disjoint sets of agents such that X , R, A, and B are pairwise disjoint. Furthermore, assume that the preferences of the agents from X satisfy the following, where the symbols [A] and [B] denote some fixed linear orders of the agents in A and B, respectively: The following holds for the preferences of X . ( x 10 x 9 x 1 x 2 r 2 x 3 x 4 r 4 x 5 x 6 r 6 x 7 x 8 r 8 . showing Statement (1). As for Statement (2), clearly, the preferences of the agents in X , are narcissistic. One can check that the preferences are indeed single-peaked with respect to the order . Since no two agents are ranked by more than two different agents, it is clear that the preferences are tie-sensitive single-crossing, implying single-crossingness due to Proposition 1(1). Figure 4 illustrates the crucial part of the acceptability graphs of the profiles discussed in Lemma 1 and Lemma 2. Observe that, these graphs display a certain cyclic structure if we make the edges directed: If we construct an arc (u, w) for each agent u and its most acceptable agent w, then we obtain a directed cycle. Moreover, we have already seen from profile P 3 in the proof of Proposition 9 that odd cycles imply non-existence of stable matchings. Using this observation, we can show our main result now.

Theorem 2 Stable Roommates for incomplete preferences with ties remains NP-complete, even if the preferences are narcissistic, single-peaked, and (tie-sensitive) single-crossing.
Proof First, the problem is in NP since one can non-deterministically guess a matching and check stability in polynomial time. To show NP-hardness, we reduce from the NP-complete Independent Set problem [28]:

Independent Set
Input: an undirected graph G = (U , E) and a non-negative integer k. Question: Is there a size-k independent set, i.e., a subset U ⊆ U of k pairwise non-adjacent vertices?
We assume that each vertex has degree at most three since Independent Set remains NP-hard for this case [27]. Let (G = (U , E), k) be an Independent Set instance with U being the vertex set and E being the edge set. Let U := {u 1 , u 2 , . . . , u n }. We will construct a Stable Roommates instance P with agent set V which is narcissistic, single-peaked, and tie-sensitive single-crossing, and show that G admits a size-k independent set if and only if P admits a stable matching.
Main idea and the constructed agents. For each vertex u i ∈ U , we introduce ten vertex agents u j i , 1 ≤ j ≤ 10, denoted as U i = {u j i | 1 ≤ j ≤ 10}. The idea is to obtain an acceptability graph that has a cycle of length ten (see our discussion just prior to the theorem) for each vertex of the input graph, including eight for the neighbors of this vertex. This is used to ensure narcissistic, single-peaked, and single-crossing property simultaneously. Additionally, we introduce two groups of selector agents, each with k sets: We will construct preferences for these selector agents to enforce that each two selectors a 5 j and b 5 j , 1 ≤ j ≤ k, are matched to two vertex agents. Together with the preferences of the vertex agents, we make sure that the vertex agents that are matched to a 5 j and b 5 j , respectively, correspond to the same vertex.
The agent set V is defined as . In total, we have constructed 10n + 10k agents.
To encode an Independent Set instance, we aim to construct preferences for the vertex agents such that no two vertex agents that are matched to some selector agents correspond to two adjacent vertices. This property will be formally captured later by Claim 1. Selector agents. The preferences of the selector agents are of the form as described in Lemma 1. To this end, let We use (U 1 ) and (U 10 ) to express that the agents in the respective subsets are tied. It remains to specify the agents r 2 i , r 4 i , r 6 i , and r 8 i . Recall that the maximum vertex degree of our input graph G is three. By Vizing's Theorem [56], graph G is 4-edge-colorable, that is, the edge set of G can be partitioned into four subsets E 1 , E 2 , E 3 , and E 4 which are each a matching. Moreover, this partition can be computed in polynomial time [44]. Thus, we first compute the sets E c , 1 ≤ c ≤ 4. Next, for each 1 ≤ c ≤ 4, if E c contains an edge e = {u i , u j }, then we define r 2c i := u 2c j (resp. r 2c j := u 2c i ). If some vertex u i is not incident to an edge of color c, then r 2c i is omitted, that is, the preference order of agent u 2c For an illustration, assume that e 1 ∈ E 1 and e 4 ∈ E 2 with e 1 = {u 1 , u 2 } and e 4 = {u 1 , u 3 }. Then, r 2 1 , r 2 2 , r 4 1 , r 4 3 are r 2 1 = u 2 2 , r 2 2 = u 2 1 , r 4 1 = u 4 3 , r 4 3 = u 4 1 . This completes the construction, which can clearly be performed in polynomial time. Next, we show that our constructed profile is narcissistic, single-peaked, single-crossing, and tie-sensitive single-crossing. Single-peakedness. The constructed profile is single-peaked with respect to the following linear order : We specify the notations used in the above order. For an illustration, assume that E 1 = {e 1 , e 2 } with e 1 = {u 1 , u 2 } and e 2 = {u 5 , u 6 }. Then, [U 1,2 ] may be defined as [U 1,2 ] := u 1 1 u 2 1 u 1 2 u 2 2 u 1 5 u 2 5 u 1 6 u 2 6 u 1 3 u 2 3 u 1 4 u 2 4 . Tie-single-crossingness and single-crossingness. To show that the constructed preference profile is also tie-sensitive single-crossing we consider each pair p of agents and let Ac( p) denote the agents which consider both agents in p as acceptable partners. We show that either all agents in Ac( p) have the same order on p or if two agents exist that order p differently, then |Ac( p)| = 2. It is straight-forward to verify that if we can show the above statement, then the profile is tie-sensitive single-crossing, and it is single-crossing by breaking ties in an arbitrary but fixed way.
Correctness of the construction. We show that G has a size-k independent set if and only if P admits a stable matching. For the "only if" part, assume that U ⊆ U is a size-k independent set where U = {u q 1 , u q 2 , . . . , u q k } with q i−1 < q i for all i ∈ {2, 3, . . . , k}. One can verify that the following matching M is stable. Before we go on with the "if" part, we observe some properties that each stable matching of our constructed profile must satisfy. Claim 1 Every stable matching M for our constructed profile satisfies the following two properties.
(1) For each j ∈ {1, 2, . . . , k} the selector agent b 5 j is matched with some vertex agent of the form u 10 i for some i ∈ {1, 2, . . . , n}. (2) No two vertex agents u 10 i and u 10 i which are both matched to some selector agents correspond to two adjacent vertices.
Proof (Proof of Claim 1) Let M be a stable matching for our profile. For the first statement, Lemma 1(1) immediately implies that for every selector agent b 5 j , 1 ≤ j ≤ k, it holds that M(a 5 j ) ∈ {u 10 i | 1 ≤ i ≤ n}. To show the "if" part, let M be a stable matching. Then, Claim 1 immediately implies that the subset U = {u i | M(u 10 i ) = b 5 j for some j ∈ {1, 2, · · · , k}} is an independent set of size k.

Conclusion
We investigated Stable Roommates for preferences with popular structural properties, such as being narcissistic, single-peaked, and single-crossing. We showed that for complete preferences with ties, assuming narcissism and single-peakedness (or narcissism and single-crossingness) guarantees the existence of stable matchings, which can be found in linear time; by comparison, Stable Roommates with complete preferences and ties is NP-complete [48]. For incomplete preferences with ties, however, narcissistic and singlepeakedness even combined with single-crossingness do not help to lower the computational complexity-Stable Roommates remains NP-complete.
We conclude with some challenges for future research. First, to better understand the NPcompleteness result, one may study the parameterized complexity with respect to the "degree" of incompleteness of the input preferences, such as the number of ties or the number of agents that are in the same equivalence class of the tie-relation. We refer to some recent papers on the parameterized complexity of preference-based stable matching problems [1,11,12,[14][15][16]29,[40][41][42]45] for this line of research. Second, we were not able to settle the computational complexity for complete preferences that are also single-peaked and single-crossing.
Third, for incomplete preferences, we extended the concepts of single-peaked and singlecrossing preferences. There are, however, further relevant extensions in the literature [20,25,37], which deserve attention in the study of stable matching problems. Do our results transfer to preferences with these extensions?
Fourth, the algorithm of Bartholdi III and Trick [4] strongly relies on the following condition: At each step, there are always two agents that consider each other most acceptable.
To explore the boundary between tractable and intractable cases it is important to understand which structural properties imply this condition. For instance, the so-called worst-restricted property (i.e., no three agents exist such that each of them is least preferred by some agent) [53,54] is a generalization of the single-peaked property. In fact, we can show that for preferences without ties, the narcissistic and worst-restricted properties are enough to guarantee that there are always two agents which consider each other most acceptable [23]. For profiles with ties, however, it seems unclear how to define a worst-restricted property so that the question of "how far one can generalize structured preferences so that the above condition still holds" remains open.
Finally, we found an issue with Bartholdi III and Trick's algorithm regarding their claimed O(n) running time (see Example 4). This brings up the question as to whether finding a stable matching can be done faster than in linear time, i.e., faster than O(n 2 ) time for complete, narcissistic, and single-peaked preference profiles without ties.