1 Introduction
A basic yet widely applicable problem in computer science and economics is to allocate discrete objects to agents given the preferences of the agents over the objects. The setting is referred to as the assignment problem or the house allocation problem (see, e.g., Abraham et al., 2005; Baumeister et al., 2014; Demko and Hill, 1988; Gärdenfors, 1973; Manlove, 2013; Wilson, 1977; Young, 1995). In this setting, there is a set of agents , a set of objects with each agent expressing ordinal preferences over . The goal is to allocate the objects among the agents in a fair or optimal manner without allowing transfer of money. The assignment problem is a fundamental setting within the wider domain of fair division or multiagent resource allocation (Chevaleyre et al., 2006). The model is applicable to many resource allocation or fair division settings where the objects may be public houses, school seats, course enrollments, kidneys for transplant, car park spaces, chores, joint assets of a divorcing couple, or time slots in schedules. Fair division has become a major area in AI research in the last decade, and especially the last few years (see, e.g., Aziz, 2014; Bouveret et al., 2010; Bouveret and Lang, 2008, 2011; Bouveret and Lemaître, 2014; Brams et al., 2012a; Chevaleyre et al., 2006; Cohler et al., 2011; Domshlak et al., 2011; Kash et al., 2013; Procaccia, 2009).
In this paper, we consider the fair assignment of indivisible objects. Two of the most fundamental concepts of fairness are envyfreeness and proportionality. Envyfreeness requires that no agent considers that another agent’s allocation would give him more utility than his own. Proportionality requires that each agent should get an allocation that gives him at least of the utility that he would get if he was allocated all the objects. When agents’ ordinal preferences are known but utility functions are not given, then ordinal notions of envyfreeness and proportionality need to be formulated. We consider a number of ordinal fairness concepts. Most of these concepts are based on the stochastic dominance (SD) relation which is a standard way of comparing fractional/randomized allocations. An agent prefers one allocation over another with respect to the SD relation if he gets at least as much utility from the former allocation as the latter for all cardinal utilities consistent with the ordinal preferences. Although this paper is restricted to discrete assignments, using stochastic dominance to define fairness concepts for discrete assignments turns out to be fruitful. The fairness concepts we study include SD envyfreeness, weak SD envyfreeness, possible envyfreeness, SD proportionality, and weak SD proportionality. We consider the problems of computing a discrete assignment that satisfies some ordinal notion of fairness if one exists, and the problems of verifying whether a given assignment satisfies the fairness notions.
Contributions
We present a systematic way of formulating fairness properties in the context of the assignment problem. The logical relationships between the properties are proved. Interestingly, our framework leads to new solution concepts such as weak SD proportionality that have not been studied before. The motivation to study a range of fairness properties is that, depending on the situation, only some of them are achievable. In addition, only some of them can be computed efficiently. In order to find fairest achievable assignment, one can start by checking whether there exists a fair assignment for the strongest notion of fairness. If not, one can try the next fairness concept that is weaker than the one already checked.
We present a comprehensive study of the computational complexity of computing fair assignments under ordinal preferences. In particular, we present a polynomialtime algorithm to check whether an SD proportional exists even when agents may express indifferences. The algorithm generalizes the main result of (Pruhs and Woeginger, 2012) (Theorem 1) who focused on strict preferences. For the case of two agents, we obtain a polynomialtime algorithm to check whether an SD envyfree assignment exist. The result generalizes Proposition 2 in (Bouveret et al., 2010) in which preferences over objects were assumed to be strict. For a constant number of agents, we propose a polynomialtime algorithm to check whether a weak SD proportional assignment exists. As a corollary, for two agents, we obtain a polynomialtime algorithm to check whether a weak SD envyfree or a possible envyfree assignment exists. Even for an unbounded number of agents, if the preferences are strict, we characterize the conditions under which a weak SD proportional assignment exists. We show that the problems of checking whether possible envyfree, SD envyfree, or weak SD envyfree assignments exist are NPcomplete. The result for possible envyfreeness answers an open problem posed in (Bouveret et al., 2010). Our computational results are summarized in Table 1.
We show that our two main algorithms can be extended to the case where agents have different entitlements over the objects or if we additionally require the assignment to be Pareto optimal. Our study highlights the impacts of the following settings: randomized/fractional versus discrete assignments, strict versus nonstrict preferences, and multiple objects per agent versus a single object per agent.
Since the fairness concepts we introduce may not be guaranteed to exist, we suggest possible ways to extend the fairness concepts. Firstly, we consider the problem of maximizing the number of agents for whom the corresponding fairness constraint is satisfied. A criticism of this approach is that there can still be agents who are completely dissatisfied. We then consider an alternative approach in which the proportionality constraints is weakened in a natural and gradual manner. We refer to the concepts as optimal proportionality and optimal weak proportionality. The fairness concepts are not only attractive but we show that an optimal proportional assignment can be computed in polynomial time and an optimal weak proportional assignment can be computed in polynomial time for a constant number of agents.
Weak SD proportional  in P for strict prefs (Th. 7) 

in P for constant (Th. 8)  
SD proportional  in P (Th. 6) 
Weak SD envyfree  NPcomplete (Th. 11) 
in P for strict prefs (Bouveret et al., 2010)  
in P for (Cor. 2)  
Possible envyfree  NPcomplete (Th. 11) 
in P for strict prefs  
in P for (Cor. 2)  
SD envyfree  NPcomplete even for strict prefs (Bouveret et al., 2010) 
in P for (Cor. 1) 
2 Related work
Proportionality and envyfreeness are two of the most established fairness concepts. Proportionality dates back to at least the work of Steinhaus (1948) in the context of cakecutting. It is also referred to as fair share guarantee in the literature (Moulin, 2003). A formal study of envyfreeness in microeconomics can be traced back to the work of Foley (1967).
The computation of fair discrete assignments has been intensely studied in the last decade within computer science. In many of the papers considered, agents express cardinal utilities for the objects and the goal is to compute fair assignments (see e.g., Bezáková and Dani, 2005; Bouveret and Lang, 2008; Bouveret and Lemaître, 2014; Demko and Hill, 1988; Golovin, 2005; Lipton et al., 2004; Nguyen et al., 2013; Procaccia and Wang, 2014). A prominent paper is that of Lipton et al. (2004) in which algorithms for approximately envyfree assignments are discussed. It follows from (Lipton et al., 2004) that even when two agents express cardinal utilities, checking whether there exists a proportional or envyfree assignment is NPcomplete. A closely related problem is the Santa Claus problem in which the agents again express cardinal utilities for objects and the goal is to compute an assignment which maximizes the utility of the agent that gets the least utility (see e.g., Asadpour and Saberi, 2010; Bezáková and Dani, 2005; Ferraioli et al., 2014; Nguyen et al., 2013). Just as in (Bouveret et al., 2010; Pruhs and Woeginger, 2012), we consider the setting in which agents only express ordinal preferences over objects. There are some merits of considering this setting. Firstly, ordinal preferences require elicitation of less information from the agents. Secondly, some of the weaker ordinal fairness concepts we consider may lead to positive existence or computational results. Thirdly, some of the stronger ordinal fairness concepts we consider are more robust than the standard fairness concepts. Fourthly, when the exchange of money is not possible, mechanisms that elicit cardinal preferences may be more susceptible to manipulation because of the larger strategy space. Finally, it may be the case that cardinal preferences are simply not available.
There are other papers in fair division in which agents explicitly express ordinal preferences over sets of objects rather than simply expressing preferences over objects. For these more expressive models, the computational complexity of computing fair assignments is either even higher (Chevaleyre et al., 2006; de Keijzer et al., 2009) or representing preferences require exponential space (Aziz, 2014; Brams et al., 2012b). In this paper, we restrict agents to simply express ordinal preferences over objects. Some papers assume ordinal preferences but superimpose a cardinal utilities via some scoring function (see e.g., Brams et al., 2003). However, this approach does not allow for indifferences in a canonical way and has led to negative complexity results (Baumeister et al., 2014; Darmann and Schauer, 2014; Garg et al., 2010). Garg et al. (2010) assumed that agents have lexicographic preferences and tried to maximize the lexicographic signature of the worst off agents. However the problem is NPhard if there are more than two equivalence classes.
The ordinal fairness concepts we consider are SD envyfreeness; weak SD envyfreeness; possible envyfreeness; SD proportionality; and weak SD proportionality. Not all of these concepts are new but they have not been examined systematically for discrete assignments. SD envyfreeness and weak SD envyfreeness have been considered in the randomized assignment domain (Bogomolnaia and Moulin, 2001) but not the discrete domain. Bogomolnaia and Moulin (2001) referred to SD envyfreeness and weak SD envyfreeness as envyfreeness and weak envyfreeness. SD envyfreeness and weak SD envyfreeness have been considered implicitly for discrete assignments but the treatment was axiomatic (Brams et al., 2003, 2001). Mathematically equivalent versions of SD envyfreeness and weak SD envyfreeness have been considered by Bouveret et al. (2010) but only for strict preferences. They referred to them as necessary (completion) envyfreeness and possible (completion) envyfreeness. A concept equivalent to SD proportionality was examined by Pruhs and Woeginger (2012) but again only for strict preferences. Pruhs and Woeginger (2012) referred to weak SD proportionality simply as ordinal fairness. Interestingly, weak SD or possible proportionality has not been studied in randomized or discrete settings (to the best of our knowledge).
Envyfreeness is wellestablished in fair division, especially cakecutting. Fair division of goods has been extensively studied within economics but in most of the papers, either the goods are divisible or agents are allowed to use money to compensate each other (see e.g., Varian, 1974). In the model we consider, we do not allow money transfers.
3 Preliminaries
An assignment problem is a triple such that is a set of agents, is a set of objects, and the preference profile specifies for each agent his complete and transitive preference over . Agents may be indifferent among objects. We denote for each agent with equivalence classes in decreasing order of preferences. Thus, each set is a maximal equivalence class of objects among which agent is indifferent, and is the number of equivalence classes of agent . If an equivalence class is a singleton , we list the object in the list without the curly brackets. In case each equivalence class is a singleton, the preferences are said to be strict. For any set of objects , and .
A fractional assignment is a matrix such that for all , and , and for all . The value
represents the probability of object
being allocated to agent . Each row represents the allocation of agent . The set of columns correspond to the objects . A fractional assignment is discrete if for all and .Example 1.
Consider an assignment problem where , and the preferences of the agents are as follows
Then,
is a discrete assignment in which agent gets and and agent gets and .
A uniform assignment is a fractional assignment in which each agent gets th of each object. Although we will deal with discrete assignments, the fractional uniform assignment is useful in defining some fairness concepts. Similarly, we will use the SD relation to define relations between assignments. Our algorithmic focus will be on computing discrete assignments only even though concepts are defined using the framework of fractional assignments.
Informally, an agent ‘SD prefers’ one allocation over another if for each object , the former allocation gives the agent at least as many objects that are at least as preferred as as the latter allocation. More formally, given two fractional assignments and , , i.e., agent SD prefers allocation to allocation if
He strictly SD prefers to if and . Although each agent expresses ordinal preferences over objects, he could have a private cardinal utility consistent with : The set of all utility functions consistent with is denoted by . When we consider agents’ valuations according to their cardinal utilities, then we will assume additivity, that is for each and .
An assignment is envyfree if the total utility each agent gets for his allocation is at least the utility he would get if he had any another agent’s allocation:
Note that we sometimes interpret a discrete allocation as a set, namely the set of objects allocated to agent . An assignment is proportional if each agent gets at least th of the utility he would get if he got all the objects:
Note that we require that the assignment is complete, that is, each object is allocated. In the context of fractional assignments, an assignment is complete if no fraction of an object is unallocated. In the absence of this requirement a null assignment is obviously envyfree. On the other hand a null assignment is not proportional.
When allocations are discrete and when agents may get more than one object, we will also consider preference relations over sets of objects. One way of extending preferences over objects to preferences over sets of objects is via the responsive set extension (Barberà et al., 2004). In the responsive set extension, preferences over objects are extended to preferences over sets of objects in such a way that a set in which an object is replaced by a more preferred object is more preferred. Formally, for each agent , his preferences over are extended to his preferences over via the responsive set extension as follows. For all , for all , for all ,
Equivalent, we say that if and only if there is an injection from to such that for each , .
Theorem 1.
For discrete assignments and , the following are equivalent.

.


.
Proof.
Firstly, 1 and 2 are known to be equivalent (see e.g., Aziz et al., 2013; Cho, 2012; Katta and Sethuraman, 2006).
We now show that 3 implies 2. If , then we know that for each object allocated to in , there is an injection which maps the object to an object in which is at least as preferred by . Hence, for each , we have that
We now show that 1 implies 3. Assume that . Consider a bipartite graph where if , , and . Since , does not have a matching saturating . Then by Hall’s theorem, there exists a set such that where denote the neighborhood of . Consider an object . We can assume without loss of generality that is maximal so that each such that is in because this only increases the difference . Note that is then and is . Since, , we have that
But then . ∎
4 Fairness concepts under ordinal preferences
We now define fairness notions that are independent of the actual cardinal utilities of the agents. The fairness concepts are defined for fractional assignments. Since discrete assignments are special cases of fractional assignments, the concepts apply just as well to discrete assignments. For algorithmic problems, we will only consider those assignments that are discrete. The fairness concepts that are defined are with respect to the SD and RS relations as well as by quantifying over the set of utility functions consistent with the ordinal preferences.
SD envyfree  necessary envyfree  necessary completion envyfree 

SD proportional  necessary proportional  
possible envyfree  
weak SD envyfree  possible completion envyfree  
weak SD proportional  possible proportional 
Proportionality


Weak SD proportionality: An assignment satisfies weak SD proportionality if no agent strictly SD prefers the uniform assignment to his allocation:

Possible proportionality: An assignment satisfies possible proportionality if for each agent, there are cardinal utilities consistent with his ordinal preferences such that his allocation yields him as at least as much utility as he would get under the uniform assignment:



SD proportionality: An assignment satisfies SD proportionality if each agent SD prefers his allocation to the allocation under the uniform assignment:

Necessary proportionality: An assignment satisfies necessary proportionality if it is proportional for all cardinal utilities consistent with the agents’ preferences.^{1}^{1}1Pruhs and Woeginger (2012) referred to necessary proportionality as “ordinal fairness”.

Envyfreeness


Weak SD envyfreeness: An assignment satisfies weak SD envyfreeness if no agent strictly SD prefers someone else’s allocation to his:

Possible envyfreeness: An assignment satisfies possible envyfreeness if for each agent, there are cardinal utilities consistent with his ordinal preferences such that his allocation yields him as at least as much utility as he would get if he was given any other agent’s allocation.

Possible completion envyfreeness: An assignment satisfies possible completion envyfreeness (Bouveret et al., 2010) if for each agent, there exists a preference relation of the agent over sets of objects that is a weak order consistent with the responsive set extension such that the agent weakly prefers his allocation over the allocations of other agents. The concept has also been referred to as not “envyensuring” (Brams et al., 2001).



SD envyfreeness: An assignment satisfies SD envyfreeness if each agent SD prefers his allocation to that of any other agent:

Necessary envyfreeness: An assignment satisfies necessary envyfreeness if it is envyfree for all cardinal utilities consistent with the agents’ preferences.

Necessary completion envyfreeness: An assignment satisfies necessary completion envyfreeness (Bouveret et al., 2010) if for each agent, and each total order consistent with the responsive set extension of the agents, each agent weakly prefers his allocation to any other agents’ allocation. The concept has also been referred to as not envypossible (Brams et al., 2001).
We consider the assignment problem in Example 1 to illustrate some of the fairness notions.
Example 2.
Consider an assignment problem where , and the preferences of the agents are as follows
Consider the discrete assignment in which agent gets and and agent gets and . The assignment is not SD proportional or SD envyfree because the fairness constraints for agent are not satisfied. However, is weak SD proportional, possible envyfree, and weak SD envyfree.

Possible completion envyfreeness and necessary completion envyfreeness were simply referred to as possible and necessary envyfreeness in (Bouveret et al., 2010). We will use the former terms to avoid confusion.
5 Relations between fairness concepts
In this section, we highlight the inclusion relationships between fairness concepts (see Figure 1). Based on the connection between the SD relation and utilities (Theorem 1), we obtain the following equivalences. The equivalences are also summarized in Table 2.
Theorem 2.
For any number of agents and objects,

Weak SD proportionality and possible proportionality are equivalent;

SD proportionality and necessary proportionality are equivalent;

weak SD envyfreeness and possible completion envyfreeness are equivalent;

SD envyfreeness, necessary envyfreeness and necessary completion envyfreeness are equivalent.
Proof.
We deal with each case separately.

The statement follows directly from the characterization of the SD relation.

The statement follows directly from the characterization of the SD relation.

If an assignment is weak SD envyfree, then each agent either SD prefers his allocation over another agent’s allocation or finds them incomparable. In case of incomparability, the relation can be completed with the agent’s own allocation being more preferred. Thus the assignment is also possible completion envyfree. If an assignment is possible completion envyfree, then either an agent prefers his allocation over another agent’s allocation with respect to the responsive set extension or finds them incomparable with respect to the responsive set extension. Hence each agent either SD prefers his allocation over another agent’s allocation or finds them incomparable. Thus the assignment is also weak SD envyfree.

It follows from Theorem 1 that SD envyfreeness and necessary envyfreeness are equivalent. We now prove that SD envyfreeness and necessary completion envyfreeness are equivalent. Note that an agent SD prefers his allocation over other agents’ allocation if and only if he prefers his allocation with respect to the responsive set extension over other agents’ allocation.
∎
It is wellknown that when an allocation is complete and utilities are additive, envyfreeness implies proportionality. Assume that an assignment is envyfree. Then for each , for all . Thus, Hence . We can also get similar relations when we consider stronger and weaker notions of envyfreeness and proportionality.
Theorem 3.
The following relations hold between the fairness concepts defined.

SD envyfreeness implies SD proportionality.

SD proportionality implies weak SD proportionality.

Possible envyfreeness implies weak SD proportionality.

Possible envyfreeness implies weak SD envyfreeness.
Proof.
We deal with the cases separately.

SD envyfreeness implies SD proportionality. Assume an assignment satisfies SD envyfreeness. Then, by Theorem 24, it satisfies envyfreeness for all utilities consistent with the ordinal preferences. If an assignment satisfies envyfreeness for particular cardinal utilities, it satisfies proportionality for the same cardinal utilities. Therefore, satisfies proportionality for all cardinal utilities consistent with the ordinal preferences. Hence, due to Theorem 22, it implies that satisfies SD proportionality.

SD proportionality implies weak SD proportionality. Assume an assignment does not satisfy weak SD proportionality. Then, there exists some agent such that . But this implies that . Hence is not SD proportional.

Possible envyfreeness implies weak SD proportionality. Assume an assignment is not weak SD proportional. By Theorem 2, is not possible proportional. Let be an agent such that for all we have that . But then, for each there exists an agent such that , otherwise . Hence is not possible envyfree.

Possible envyfreeness implies weak SD envyfreeness. Assume that an assignment is not weak SD envyfree. Therefore there exist such that Due to Theorem 1, we get that for each Hence is not possible envyfree.
∎
We also highlight certain equivalences for the special case of two agents.
Theorem 4.
For two agents,

proportionality is equivalent to envyfreeness;

SD proportionality is equivalent to SD envyfreeness;

weak SD proportionality and possible envyfreeness are equivalent; and

weak SD envyfreeness and weak SD proportionality are equivalent.
Proof.
We deal with the cases separately while assuming . Since , for any agent , we will denote by the other agent.

Proportionality is equivalent to envyfreeness. Since envyfreeness implies proportionality, we only need to show that for two agents proportionality implies envyfreeness. Assume that an assignment is not envyfree. Then,

SD proportionality is equivalent to SD envyfreeness. We note that for , if an assignment satisfies envyfreeness for particular cardinal utilities, it satisfies proportionality for those cardinal utilities. Moreover, if an assignment is SD proportional, it satisfies proportionality for all cardinal utilities, hence it satisfies envyfreeness for all cardinal utilities and hence it satisfies SD envyfreeness.

Weak SD proportionality and possible envyfreeness are equivalent. By Theorem 33, possible envyfreeness implies weak SD proportionality. If an assignment satisfies weak SD proportionality, then there exist cardinal utilities consistent with the ordinal preferences for which proportionality is satisfied. Hence for , there exist cardinal utilities consistent with the ordinal preferences for which envyfreeness is satisfied, which means that the assignment satisfies possible envyfreeness.

Weak SD envyfreeness and weak SD proportionality are equivalent. We have already shown that weak SD proportionality implies possible envyfreeness for , and that possible envyfreeness implies weak SD envyfreeness. Therefore, it is sufficient to prove that weak SD envyfreeness implies weak SD proportionality. Assume that an assignment is not weak SD proportional. Then, there exists at least one agent such that
for all and
for some . But this implies that
for all and
for some . Thus and hence is not weak SD envyfree.
∎
In the next examples, we show that some of the inclusion relations do not hold in the opposite direction and that some of the solution concepts are incomparable. Firstly, we show that SD proportionality does not imply weak SD envyfreeness.
Example 3.
SD proportionality does not imply weak SD envyfreeness. Consider the following preference profile:
The allocation that gives to agent , to agent and to agent is SD proportional. However it is not weak SD envyfree since agent is envious of agent . Hence it also follows that SD proportionality does not imply possible envyfreeness or SD envyfreeness.
Next, we show that weak SD envyfreeness neither implies possible envyfreeness nor weak SD proportionality.
Example 4.
Weak SD envyfreeness neither implies possible envyfreeness nor weak SD proportionality. Consider an assignment problem in which , and there are copies of , copies of , copy of and copy of . Let the preference profile be as follows.
Clearly , the assignment specified in Table 3 is weak SD envyfree. Assume that is also possible envyfree. Let be the utility function of agent for which he does not envy agent or . Let ; ; ; and . Since , we get that
(1) 
Since is possible envyfree, . Since is possible envyfree, iff iff . Since , it follows that This is a contradiction since both and cannot hold.
Now we show that weak SD envyfreeness does not even imply weak SD proportionality. Assignment is weak SD envyfree. If it were weak SD proportional then there exists a utility function such that which means that which is equivalent to . But this is not possible because of (1).
Since, we have shown that weak SD envyfreeness is not equivalent to possible envyfreeness, and since we showed in Theorem 23 that weak SD envyfreeness is equivalent to possible completion envyfreeness, this means that possible envyfreeness and possible completion envyfreeness are also not equivalent to each other. We now point out that possible envyfreeness does not imply SD proportionality.
Example 5.
Possible envyfreeness does not imply SD proportionality. Consider an assignment problem with two agents with preferences and . Then the assignment in which gets and gets and is possible envyfree. However it is not SD proportional, because agent ’s allocation does not SD dominate the uniform allocation.
Finally, we note that all notions of proportionality and envyfreeness are trivially satisfied if randomized assignments are allowed by giving each agent of each object. As we show here, achieving any notion of proportionality is a challenge when outcomes need to be discrete.
Next, we study the existence and computation of fair assignments. Even the weakest fairness concepts like weak SD proportionality may not be possible to achieve: consider two agents with identical and strict preferences over two objects. This problem remains even if is a multiple of .
Example 6.
A discrete weak SD proportional assignment may not exist even if is a multiple of . Consider the following preferences:
If all agents get 2 objects, then those agents that have to get at least one object from will get an allocation that is strictly SD dominated by . Otherwise, at least one agent gets at most one object, and is therefore strictly SD dominated by the uniform assignment.
If is not a multiple of , then an even simpler example shows that a weak SD proportional assignment may not exist. Consider the case when all agents are indifferent among all objects. Then the agent who gets less objects than will get an allocation that is strictly SD dominated by .
6 Computational Complexity
In this paper, we consider the natural computational question of checking whether a discrete fair assignment exists and if it does exist then to compute it. The problem of verifying whether a (discrete or fractional) assignment is fair is easy for all the notions we defined.
Remark 1.
It can be verified in time polynomial in and
whether an assignment is fair for all notions of fairness considered in the paper. For possible envyfreeness, a linear program can be used to find the ‘witness’ cardinal utilities of the agents.
Remark 2.
For a constant number of objects, it can be checked in polynomial time whether a fair discrete assignment exists for all notions of fairness considered in the paper. This is because the total number of discrete assignments is .
We note that if the assignment is not required to be discrete, then even SD envyfreeness can be easily achieved (Katta and Sethuraman, 2006). Finally, we have the following necessary condition for SD proportional and hence for SD envyfree assignments.
Theorem 5.
If is a discrete SD proportional assignment, then is a multiple of and each agent gets objects.
Proof.
If is an SD proportional assignment, then the following constraint is satisfied for each agent .
Each agent must get objects. If is discrete, each agents gets objects only if is a multiple of . ∎
6.1 SD proportionality
In this subsection, we show that it can be checked in polynomial time whether a discrete SD proportional assignment exists even in the case of indifferences. The algorithm is via a reduction to the problem of checking whether a bipartite graph admits a feasible matching.
Let be an undirected graph with vertex capacities and edge capacities where is the set of natural numbers including zero. Then, a matching of is a function such that for each , and for all . The size of the matching is defined as . We point out that if for all , and for all then a maximum size matching is equivalent to a maximum cardinality matching. In a matching problem with upper and lower bounds, there further is a function . A feasible matching then is a function such that for each , and for all . If is bipartite, then the problem of computing a maximum weight feasible matching with lower and upper bounds can be solved in strongly polynomial time (Chapter 35, Schrijver, 2003).
Theorem 6.
It can be checked in polynomial time whether a discrete SD proportional assignment exists even if agents are allowed to express indifference between objects.
Proof.
Consider . If is not a multiple of , then by Theorem 5, no discrete SD proportional assignment exists. In this case, in each discrete assignment , there exists some agent who gets less than objects. Thus, the following does not hold: . Hence we can now assume that is a multiple of i.e., where is a constant. We reduce the problem to checking whether a feasible matching exists for a graph . Recall that is the number of equivalence classes of agent . For each agent , and for each we introduce a vertex . For each , we create a corresponding vertex with the same name. Now, The graph is bipartite with independent sets and . Let us now specify the edges of :

for each , and we have that if and only if .
We specify the lower and upper bounds of each vertex:

and for each and ;

for each .
For each edge , .
Now that has been specified, we check whether a feasible matching exists. If so, we allocate an object to an agent if the edge incident to that is included in the matching is incident to a vertex corresponding to an equivalence class of agent . We claim that a discrete SD proportional assignment exists if and only if a feasible matching exists. If a feasible matching exists, then each is matched so we have a complete assignment. For each agent , and for each , an agent is allocated at least objects of the same or more preferred equivalence class. Thus, the assignment is SD proportional.
On the other hand if a discrete SD proportional assignment exists, then implies that for each equivalence class , an agent is allocated at least objects from the same or more preferred equivalence class as . Hence there is a matching in which the lower bound of each vertex of the type is met. For any remaining vertices that have not been allocated, they may be allocated to any agent. Hence a feasible matching exists. ∎
6.2 Weak SD proportionality
In the previous subsection, we examined the complexity of checking the existence of SD proportional discrete assignments. In this section we consider weak SD proportionality.
Theorem 7.
For strict preferences, a weak SD proportional discrete assignment exists if and only if one of two cases holds:

and it is possible to allocate to each agent an object that is not his least preferred object;

.
Moreover, it can be checked in polynomial time whether a weak SD proportional discrete assignment exists when agents have strict preferences.
Proof.
If , at least one agent will not get any object. Hence there exists no weak SD proportional discrete assignment. Hence is a necessary condition for the existence of a weak SD proportional discrete assignment.
Let us consider the case of . Clearly each agent needs to get one object. If an agent gets an object that is not the least preferred object , then his allocation is weak SD proportional. The reason is that Hence the following does not hold: . On the other hand, if gets the least preferred object, his allocation is not weak SD proportional since . Hence, we just need to check whether there exists a discrete assignment in which each agent gets an object that is not least preferred. This can be solved as follows. We construct a graph such that and for all and , if and only if . We just need to check whether has a perfect matching. If it does, the matching is a weak SD proportional discrete assignment.
If , we show that a weak SD proportional discrete assignment exists. Allocate the most preferred object to the agents in the following order . Then each agent gets in the worst case his th most preferred object. This worst case occurs if agents preceding pick the most preferred objects of agent . Even in this worst case, since , we have that the allocation of agents in is weak SD proportional. As for agent , in the worst case he get his th and st most preferred objects. Since , by Lemma 1 we get that the allocation of agent is also weak SD proportional. This completes the proof. ∎
Indifferences result in all sorts of challenges. Some arguments that we used for the case for strict preferences do not work for the case of indifferences. The case of strict preferences may lead one to wrongly assume that given a sufficient number of objects, a weak SD proportional discrete assignment is guaranteed to exist. However, if agents are allowed to express indifference, this is not the case. Consider the case where and each agent is indifferent among each of the objects. Then there exists no weak SD proportional discrete assignment because some agent will get fewer than objects. We first present a helpful lemma which follows directly from the definition of weak SD proportionality.
Lemma 1.
An assignment is weak SD proportional if and only if for each ,

for some ; or

for all .
We will use Lemma 1 in designing an algorithm to check whether a weak SD proportional discrete assignment exists when agents are allowed to express indifference.
Theorem 8.
For a constant number of agents, it can be checked in polynomial time whether a weak SD proportional discrete assignment exists even if agents are allowed to express indifference between objects.
Proof.
Consider . We want to check whether a weak SD proportional discrete assignment exists. By Lemma 1, this is equivalent to checking whether there exists a discrete assignment , where for each , one of the following conditions holds: for ,
(2) 
or the following st condition holds
(3) 
The st condition only holds if each is a multiple of for .
We need to check whether there exists a discrete assignment in which for each agent one of the conditions is satisfied. In total there are different ways in which the agents could be satisfied. We will now present an algorithm to check if there exists a feasible weakly SD proportional discrete assignment in which for each agent , a certain condition among the conditions is satisfied. Since is a constant, the total number of combinations of conditions is polynomial.
We define a bipartite graph whose vertex set is initially empty. For each agent , if the condition number is then we add a vertex . If the condition number is , then we add vertices — for each where . For each , we add a corresponding vertex with the same name. The sets and will be independent sets in . We now specify the edges of .

if and only if for each , and .

if and only if for each , , and .
We specify the lower and upper bounds of each vertex.

and for each and ;

for each ;

for each .
For each edge , . For each tuple of satisfaction conditions, we construct the graph as specified above and then check whether there exists a feasible matching. A weak SD proportional discrete assignment exists if and only if a feasible matching exists for the graph corresponding to at least one of the combinations of conditions. Since is polynomial if is a constant and since a feasible matching can be checked in strongly polynomial time, we can check the existence of a weak SD proportional discrete assignment in polynomial time. ∎
6.3 Envyfreeness
In this section, we examine the complexity of checking whether an envyfree assignment exists or not. Our positive algorithmic results for SD proportionality and weak SD proportionality help us obtain algorithms for SD envyfreeness and weak SD envyfreeness when .
From Theorem 6, we get the following corollary.
Corollary 1.
For two agents, it can be checked in polynomial time whether a discrete SD envyfree assignment exists even if agents are allowed to express indifference between objects.
Proof.
For two agents, SD proportionality implies SD envyfreeness, and by Theorem 3, SD envyfreeness implies SD proportionality. ∎
Corollary 1 generalizes Proposition 10 of (Bouveret et al., 2010) which stated that for two agents and strict preferences, it can be checked in polynomial time whether a necessary envyfree discrete assignment exists.
Similarly, from Theorem 8, we get the following corollary.
Corollary 2.
For two agents, it can be checked in polynomial time whether a weak SD envyfree or a possible envyfree discrete assignment exists.
Proof.
For two agents, weak SD proportional is equivalent to weak SD envyfree and possible envyfree (Theorem 4). ∎
We prove that checking whether a (weak) SD envyfree or possible envyfree discrete assignment exists is NPcomplete. The complexity of the second problem was mentioned as an open problem in (Bouveret et al., 2010). Bouveret et al. (2010) showed that the problem of checking whether a necessary envyfree discrete assignment exists is NPcomplete. The statement carries over to the more general domain that allows for ties. We point out that if agents have identical preferences, it can be checked in linear time whether an SD envyfree discrete assignment exists even when preferences are not strict. Identical preferences have received special attention within fair division (see e.g., Brams and Fishburn, 2000).
Theorem 9.
For agents with identical preferences, an SD envyfree discrete assignment exists if and only if each equivalence class is a multiple of .
Even is not constant but preferences are strict, it can be checked in time linear in and whether a complete weak SD envyfree discrete assignment exists. This follows from an equivalent result in (Bouveret et al., 2010) for possible completion envyfreeness and the fact that weak SD envyfreeness is equivalent to possible completion envyfreeness (Theorem 23). We use similar arguments as Bouveret et al. (2010) for possible envyfreeness.
Theorem 10.
For strict preferences, it can be checked in time linear in and whether a possible envyfree discrete assignment exists.
Proof.
We reuse the arguments in the proof of (Bouveret et al., 2010, Proposition 4). Let the number of distinct topranked objects be . If , then there is at least one agent who receives one object that is not his topranked and no further items. Thus he necessarily envies the agent who received and hence there cannot exist a possible envyfree discrete assignment. If , then we run the following algorithm. (1) For each of the topranked objects, allocate it to an agent that ranks it first. Denote by the set of agents that have not yet received an object, and order them arbitrarily. (2) Go through the agents in in ascending order and ask them to claim their most preferred item from those still available. (3) Go through the agents in again, but this time in descending order, and ask them to claim their most preferred item from those still available. The agents who got their most preferred object do not envy any other agent if they have sufficiently high utility for their most preferred object. For the remaining agents, who have received two objects each, no agent strictly SD prefers another agent ’s current allocation: even if (who had an earlier first turn) received a more preferred first object, strictly prefers his second object to ’s second object (in case received a second object). Therefore, there exist cardinal utilities consistent with the ordinal preferences where the agents in put high enough utility for the second object they get so that they are not envious of other agents even if the other agent gets all the unallocated objects. Therefore the unallocated objects can be allocated in an arbitrary manner among the remaining agents and the resulting complete discrete assignment is still possible envyfree. ∎
Bouveret et al. (2010) mentioned the complexity of possible completion envyfreeness for the case of indifferences as an open problem. We present a reduction to prove that for all notions of envyfreeness considered in this paper, checking the existence of a fair discrete assignment is NPcomplete.
Theorem 11.
The following problems are NPcomplete:

check whether there exists a weak SD envyfree (equivalently possible completion envyfree) discrete assignment,

check whether there exists a possible envyfree discrete assignment, and

check whether there exists an SD envyfree discrete assignment.
Proof.
Membership in NP is shown by Remark 1. To show hardness we use a reduction from X3C (Exact Cover by 3sets).
In X3C, the input is a ground set and a collection containing 3sets of elements from , and the question is whether there exists
a subcollection such that each element of is contained in exactly one of the 3sets in . X3C is known to be NPcomplete (Karp, 1972).
Consider an instance of X3C where and . Without loss of generality, . We construct the following assignment problem where
is partitioned into three sets and with , , and
is partitioned into three sets and with , and .
The set is partitioned into two sets, and , the first one corresponding to the set of elements of in the X3C instance and the second being a ‘buffer’ set. We have and .
We associate each with the th agent in . With each we also associate nine consecutive agents in .
The preferences of the agents are defined as follows:
for
for all
for
The function is such that it ensures the following properties: For each of the three elements of , three out of the nine agents associated with list as a second choice object, and list as first choice objects. Let us label these three agents , and . The sets of objects , and each exclude a distinct of the buffer objects . , and each contain of the elements of . The elements that are excluded from each of these sets must be distinct i.e., elements that does not contain are contained in and , and vice versa.
For each , . Let contain of the elements of and of the elements of . Consider a discrete assignment that is weak SD envyfree or possible envyfree or SD envyfree. We can make the following observations:

Agents in are allocated all objects from and none from . To show this, first consider the case where or more objects from are assigned to . In this case, at least one agent in is envious of an agent from : there will be an agent in with three or more objects from , and there will be an agent in with at most three elements, at most two of which are from . This is because if an agent has more than three objects, another has at most two and if they all have three, some of those will be objects from , and at least one agent from will have a second choice object. For all considered notions of envyfreeness