Welfare-Maximizing Assignment of Agents to Hierarchical Positions

We consider an environment where agents must be allocated to one of three kinds of hierarchical positions with limited capacities. No monetary transfers are allowed. We assume that agents' payoffs for being assigned to medium positions are their private information, and we consider bayesian incentive-compatible direct mechanisms. We solve for utilitarian and Rawlsian welfare-maximizing rules. Interestingly, the two optimal mechanisms are implemented by Hylland and Zeckhauser (1979)'s pseudomarket mechanism with equal budgets (PM) and the Boston mechanism without priorities (BM), for a variety of cases. When the market is tough (i.e., when medium positions are overdemanded), then utilitarian optimal, Rawlsian optimal, PM, and BM assignments coincide. Otherwise, when the market is mild, PM and BM differ, and each one implements the two optimal mechanisms under different assumptions on the curvature of the payoff distribution of the medium positions. When we allow medium positions to be the favorite for some agent types, PM and BM may still be optimal in tough markets, and a bias in favor of BM rather than PM appears in mild markets.


Introduction
In now a seminal paper, Hylland and Zeckhauser (1979) take a market design perspective on the problem of assigning agents to positions, where monetary transfers are not allowed and each agent is eventually assigned to exactly one position. Their model is motivated by important real-world applications such as assignment of legislators to committees, faculty members to o¢ ces, students to public schools, and workers to positions, departments, or tasks in various organizations and …rms. These environments can be modeled as "assignment games" in which (i) agents and positions are indivisible (yet probabilistic assignment to positions are allowed); (ii) preferences of agents over positions may be their private information, and hence agents can respond to mechanisms strategically rather than truthfully, and; (iii) a medium of exchange such as money, for various reasons, is not an acceptable instrument. Hylland and Zeckhauser (1979) introduce the "pseudomarket mechanism," in which the individuals use "fake money" to buy assignment probabilities for di¤erent kinds of positions. The pseudomarket has good e¢ ciency properties. More speci…cally, it is "exante" e¢ cient in the sense that there cannot be any other probabilistic assignment that would make all the agents better o¤. 1 In this paper, we take an optimal mechanism design approach to the same problem. To make the model tractable, we study a continuum economy (with unit mass of players and positions) where three kinds of positions are ordinally ranked the same way by all agents. 2 For instance, we can imagine a society that cannot provide the same social status to all of its members. Naturally, every member prefers belonging to the highest class and dislikes being relegated to the lowest social class. However, agents di¤er in several dimensions of personality, and this determines some di¤erences in the intensity of their preferences. Riskaverse or low-ambition agents might prefer belonging to a medium class with certainty rather than facing a lottery over either being assigned to a high-class position or being assigned to a low-class position. The opposite would be true for less risk-averse or more ambitious agents. This postulates a constitutional design problem. How do we distribute agents to the available social positions so that we optimize a given notion of social welfare?
We focus on two notions of optimality: Utilitarian (maximizing the unweighted aver- 1 Moreover, it does not generate envy when all agents face the same budget limit. The converse is true in atomless economies with a continuum of agents, from Thomson and Zhou (1993): any e¢ cient and envy-free random assignment can be obtained through a Pseudomarket equilibrium with equal budgets. 2 In the discussion section we also consider the case where agents' ordinal preferences may be di¤erent from each other. The continuum assumption could be circumvented (and the results would be unchanged) by imposing "soft" (or in expectations) feasibility constraints as in Ashlagi and Shi (2013). age of all agents' expected payo¤s) and Rawlsian (maximizing the minimum payo¤). We characterize the optimal incentive-compatible random assignment rule under either notion of optimality. Interestingly, we …nd that the mechanisms implementing the optimal assignment rules are widely known in the literature on matching and assignment problems. Either the pseudomarket with equal budgets (PM) or the widely debated Boston mechanism 3 with no preexisting priority rights (BM) turns out to be optimal for a variety of cases, depending on the distribution of cardinal preferences.
In our main result (Theorem 16), we establish this surprising result. We …nd that when the market is tough in the sense of potential excess demand for top-and middle-class positions, the utilitarian-optimal assignment rule, the Rawlsian-optimal assignment rule, the PM competitive equilibrium allocation, and the BM Bayesian Nash-equilibrium allocation are identical. This is true for all value distributions F: Miralles (2008) previously established that when there is only one underdemanded kind of position, BM and PM obtain the same allocation. What is new in our result is that this allocation is both utilitarian-and Rawlsian-optimal. 4 Moreover, we show that when the market is mild as opposed to tough, it turns out that the nature of the optimal allocation rule depends on the curvature of F . More speci…cally, we give su¢ cient conditions on the value distribution F that makes either PM or BM optimal in the utilitarian and Rawlsian maximization problems. 5 From a methodological point of view, our paper solves a more complex mathematical problem than a standard auction design problem, for at least two reasons. First, the "numeraire"good, in our case the probability of being assigned to top-class positions, is globally constrained, since the capacity for top positions is limited. Second, the probability of being assigned to top-and middle-class positions must satisfy proper probability constraints for each agent. Namely, no probability can be negative, and the sum of these two probabilities cannot exceed 1. The most closely related paper on this methodological issue is Miralles (2012). The key feature that is di¤erent in the present paper is that every agent must end up in exactly one position, whereas Miralles (2012) left the number of …nally obtained objects unconstrained.
To cope with interpersonal comparability, we adopt a double normalization such that being assigned to top positions gives a utility of one, while being assigned to low-class positions gives zero utility. Being assigned a middle-class position gives a utility v 2 [0; 1] ; which is the private information of the agents. 6 In other words, we measure the agent's degree of success, where getting the most-preferred position entails total success, getting a low-class position entails total failure, and obtaining a middle position implies a variable degree of success, depending on how the agent values it. The distribution function of this parameter, F ( ), with positive, di¤erentiable density f ( ), characterizes the demand side of this economy. We make the standard auction theory assumptions that both the "seller"-and "buyer"virtual valuations (respectively, ) are increasing functions. The supply side is characterized by the limited capacities for high-and middle-class positions, respectively 1 and 2 , where 1 ; 2 ; 1 + 2 2 (0; 1) : We …rst observe the relaxed problem that ignores the following families of constraints: for each agent, (1) no assigned probability can be negative, and (2) the sum of all probabilities must be 1. We …nd that the optimal (in both the utilitarian and the Rawlsian sense) assignment rule of the relaxed problem does not violate these previously ignored constraints if and only if 1 (1 2 )F 1 (1 2 ) = 0. Observe that the left-hand side (LHS) is increasing in both capacities, 1 and 2 . It also decreases if the distribution of valuations for middle-class positions becomes stronger in the …rst-order stochastic sense. In sum, tougher competitive conditions (both on the demand and on the supply sides) reduce the value of this LHS. This sets the speci…c boundary between a tough market and a mild market in our paper: in the tough market, the LHS is nonpositive, whereas in a mild market, the LHS is positive. We treat each case di¤erently.
We use standard manipulations of incentive-compatibility constraints to reduce the impact of the aforementioned families of additional constraints. For p(v) denoting the probability that a v type agent is assigned to top positions and q(v) denoting her probability of being assigned to middle-class positions, incentive compatibility implies that p( ) + q( ) is increasing and p( ) is decreasing. So the previous families of constraints are reduced to two single constraints: the upper-bound (UB) constraint p(1) + q(1) 1 and the lower-bound (LB) constraint p(1) 0 (Proposition 3). In a tough market, the optimal rule implies that all agents must bear some risk of ending up in a low-class position. In this case, it turns out that LB binds at the optimal solution. On the other hand, in a mild market, high v agents optimally obtain certain allocation to middle-class positions or better, and in the optimal solution UB binds.
In a tough market, we …rst show that UB cannot bind. This implies that an agent with a top preference for middle-class positions (v = 1) cannot be assigned there or better with certainty. Among the assignment rules abiding by this, optimality is obtained with a two-step rule characterized by a cuto¤ d such that all high-class positions are assigned to types below d and all middle-class positions are assigned to types above d (Proposition 6). Interestingly, it turns out that this rule coincides with the equilibrium allocation both in PM and BM when only low-class positions are underdemanded (Theorem 16).
On the other hand, in a mild market, we …rst study two-step rules such that types below some cuto¤ c receive a probability bundle while types above receive another bundle. Given the UB constraint and the feasibility constraint, a two-step mechanism is fully characterized by this cuto¤ c with valid values along a closed interval (Proposition 8). The lowest possible c happens to characterize the equilibrium allocation of PM, while the highest possible c characterizes BM. Whether the objective function is increasing or decreasing in c in the utilitarian case depends on the concavity/convexity of H (the seller's virtual valuation). We show that no other feasible incentive-compatible allocation rule can utilitarian-dominate PM (BM) when H is strictly concave (convex). For the Rawlsian problem, to the concavity/convexity of H we need to add conditions on whether the uniform distribution hazard-rate dominates/is hazard-rate dominated by F , in order to show that either PM or BM is optimal (Theorem 16).
The two optimal mechanisms have properties in common in that they both provide market-like trade-o¤s. PM is a competitive market that is designed to close in one round, since agents are constrained to buy a proper probability distribution. At other extreme, BM can be understood as a multiround competitive market. In each round, agents who were unassigned at the end of the previous round obtain a new budget with which they buy a probability bundle that does not add up to more than 1. In both cases, spending money on one position can reduce the chances for other positions. This is in sharp contrast with Gale and Shapley's (1962) well-known deferred acceptance (DA) algorithm, where betting on the most-preferred option does not harm the agent's chances at other positions. In this context with perfectly aligned ordinal preferences, it is known that DA implements a Pareto-pessimal assignment rule (Miralles, 2008; Abdulkadiro¼ glu, Che and Yasuda, 2011). 7 Since there are no preexisting priority rights, DA coincides in its allocation with random serial dictatorship, which is also equivalent to top-trading cycles from random allocation (Ab-dulkadiro¼ glu and Sönmez, 1998). Moreover, DA coincides with Bogolmonaia and Moulin's (2001) probabilistic serial mechanism when the market is large (Che and Kojima, 2010). These mechanisms are dominated by either PM or BM, not only in the utilitarian sense, but also in the Rawlsian max-min sense. That is, PM and BM provide not only an e¢ cient solution but also a fair solution to the problem we analyze.
Assignment problems are di¢ cult to treat from the point of view of optimal mechanism design. The main di¢ culty arises from the multidimensionality of agents'valuations, which renders the problem practically unsolvable. 8 In this line, Budish (2012) argues that the search for good properties using matching theory tools should be preferred to the search for an optimal solution. Despite agreeing with this, we have tried to analyze a tractable model so that we could obtain a …rst glance at what optimal mechanism design can tell us about assignment problems. What we found is very surprising: the optimal solution turns out to be well-known mechanisms in the matching literature under a wide range of parameters. Our …ndings enrich the debate, while we acknowledge the importance of other features: varying ordinal preferences for di¤erent classes, 9 nonstrategic players, preexisting priorities, precedence, etc.
The rest of the paper is organized as follows. Section 2 introduces the model and the problem, for which we provide a solution. Section 3 analyzes the implementation of the optimal assignment rules. Section 4 discusses other assumptions of agents'preferences, other objective functions, and the failure of PM and BM being optimal. Section 5 concludes. An Appendix contains the longer proofs.

Allocation to Ranked Positions
There are three kind of positions: top, medium, and low. Every agent's utility from obtaining a top position is 1. Obtaining a low position gives zero utility. The medium position gives a utility of v, which is distributed over [0; 1] according to continuous distribution F 2 C 2 and strictly positive density f: The valuation for the medium position is agents' private information. There is a continuum of agents with a mass 1; 1 measure of top positions, 2 measure of medium positions, and 1  We consider cardinal mechanisms without transfers, and by the revelation principle we focus on direct truthful mechanisms. An assignment rule is a function (p; q) : [0; 1] ! where the range is the tridimensional simplex. In this notation, p (v) and q (v) denote the probability of being assigned to high and medium positions, respectively (since everybody will be allocated a position, the probability of being assigned to low position is 1 p (v) q (v)).
We have the following market-clearing conditions: which need to be satis…ed by any feasible rule (note that the third market-clearing condition 2 is automatically satis…ed). We say that a direct rule (p ( ) ; q ( )) is feasible if it satis…es the above two market-clearing conditions, and A rule is truthful (or incentive compatible) if no agent can be better o¤ by announcing any other type. That is, for all v; v 0 2 [0; 1] ; the following condition needs to hold: By the standard envelope theorem (or Myerson's) method, we …rst establish the following payo¤ equivalence result: Lemma 1 Incentive compatibility is equivalent to and q increasing, p decreasing, q + p increasing (together called monotonicity conditions).
Proof. The interim expected utility of a player with value v and announcement v 0 is Incentive compatibility requires that u (v; v 0 ) is maximized at v = v 0 ; for which a necessary condition is the local incentive compatibility, which implies the derivative of u (v; v 0 ) with respect to v 0 at v 0 = v to be zero: , we have the following necessary condition: By standard arguments, we can argue that q ( ) has to be increasing and p ( ) has to be decreasing. Moreover, it follows that q ( )+p ( ) has to be increasing. Also, again by standard arguments (see Krishna, 2002, Section 5.1.2), in this setup the "envelope condition"U 0 (v) = q (v) together with monotonicity conditions (q increasing, p decreasing, q + p increasing) is equivalent to incentive compatibility. Hence, we have which is equivalent to incentive compatibility.

Utilitarian and Rawlsian Social Welfare
Utilitarian social welfare is given by where the last line follows from the second of the market clearance conditions.
On the other hand, Rawlsian social welfare is equal to the lowest utility of the society. Since in any incentive-compatible rule the utility is increasing, Rawlsian social welfare is equal to the utility of 0 type, which is

Achieving Highest Social Welfare
In this subsection, we further simplify the incentive compatibility and feasibility conditions by writing the constraints as a function of q ( ) only. Before we move on to the simpli…cation, we de…ne virtual valuations and state our technical assumptions, which are fairly weak and standard.

De…nition 2 Denote Myerson's (or buyers') virtual valuation by
and sellers'virtual valuation by Assumption We assume that H is increasing. This is a rather weak assumption; if F is logconcave, 10 that is, if F f is nondecreasing, then H is obviously increasing. Many distributions widely used in the literature are logconcave: all power, normal, lognormal, Pareto, Weibull, Gamma, exponential, logistic, extreme value, Laplace, Chi distributions have logconcave CDF's, and thus also result in an increasing H. We also assume that J is increasing, which is a standard assumption in mechanism design literature and is also satis…ed by many widely used distribution functions.
The proof of the following proposition is relegated to the Appendix. In the proof, …rst by Lemma (1) and changing the order of integration, we write p( ) as a function of q( ) and F ( ): Second we show that q (0) 0; p(1) + q(1) 1 and p (0) 0 implies the rest of the boundary constraints and rewrite these constraints as a function of q( ) and F ( ) only. Finally, we show that q being increasing implies the other monotonicity constraints. and We ignore the last two constraints from now on, as they will be satis…ed in the welfaremaximizing rules in what follows. We call the …rst constraint the market-clearing (MC ) condition; the second inequality the upper bound for H (UB); and the third inequality the lower bound for H (LB).

The Utilitarian Problem
By (1) and Proposition 3, and since 1 is a constant, utilitarian social welfare maximization is equivalent to subject to (4), (5), and (6).

The Rawlsian Problem
On the other hand, by (2), equation (29) in the proof of Proposition 3, Proposition 3, and since 1 is a constant, Rawlsian social welfare maximization is equivalent to subject to (4), (5), and (6). To give some intuition behind this objective function, observe that the min-utility type is always the lowest type. This type does not value middle-class positions; therefore, a way to maximize her utility is to allow her to "sell" those to the other agents in exchange of probabilities for high-class positions. As a consequence, the objective function coincides with the objective function in revenue-maximizing auction design problems.
Next, we consider the solution of the two problems in which we ignore UB and LB constraints. The solution to this relaxed problem turns out to be useful for the solution of the original problem.

The Relaxed Problem
Let us consider the (utilitarian or Rawlsian) problem in which we consider only the …rst constraint, MC ( . It is easy to show the following: In the relaxed problem, the solution to both the utilitarian and the Rawlsian problem is given by for v that satis…es Proof. This is simply because marginal bene…t of increasing q (t) is tf (t) in the utilitarian problem and J (t) f (t) in the Rawlsian problem. In both problems, the marginal cost is The bene…t-cost ratios are therefore given by t and J (t) ; respectively. Since they are both increasing functions of t; in the optimal solution, we should not allocate any positive q's to any t's unless all higher b t's are already maxed out at q( b t) = 1: Hence, the result obtains.
In what follows, we simplify compare this optimal solution with 1 1 ; and analyze the di¤erent cases separately.
for the optimal solution of the relaxed problem also satis…es UB, that is, if we call this a tough economy (and otherwise a mild economy). 11 This is because 1 is increasing in both 1 and 2 : Hence, lower capacities of high and medium hierarchical positions (i.e. a market that is competitive) would make this condition hold, whereas higher capacities of high and medium positions (i.e. a market that is not competitive) would violate this condition. Whether 1 (1 2 ) F 1 (1 2 ) is greater or smaller than 0 turns out to be crucial in our model. We therefore formally introduce the following de…nitions.

De…nition 5
We call an economy with 1 (1 0 a tough economy, and an economy with In the next section, we show that under a tough economy, the optimal solution has to be a particular two-step function that satis…es q (0) = 0 and LB has to hold. Then we show that under a mild economy, the optimal solution depends on the curvature of F .

Tough Economy
In a tough economy ( 1 (1 2 ) F 1 (1 2 ) 0), the utilitarian and Rawlsian optimal mechanism turn out to be identical to each other.

Proposition 6
In a tough economy, the optimal solution for both utilitarian and Rawlsian social welfare is for v that uniquely solves solves the problem subject to only MC and also satis…es UB and LB (as equalities since hence it is the solution to the social welfare maximization problem for both the utilitarian and Rawlsian cases. Note that for Hence, v = v ; and the optimal solution satis…es (7).
; then we can argue that UB never binds, since given that MC holds (and the assumption that H is increasing), the highest which is by assumption smaller than 1 1 : We …rst establish the following lemma, whose proof is relegated to the Appendix. In the proof, we …rst argue that the optimal solution has to be a "two-step" function by showing that an "ironed out"version of a non-two-step function gets a better welfare. Then we show that the lower step has to be 0: The optimal solution for both social welfare problems has to be of the form By Lemma 7, the maximization problem becomes for the utilitarian maximization, and for the Rawlsian maximization. They are both subject to the following two constraints.
Note that the second equality can be written as From the …rst constraint, we have which can be incorporated to the objective functions, making them for the utilitarian maximization, and for the Rawlsian maximization. They are both subject to Furthermore, note that both objective functions are increasing in d and the right-hand side of the constraint is increasing in d: Therefore, optimal v uniquely solves and optimal q (1) satis…es

Mild Economy
In a mild economy ( 1 (1 2 ) F 1 (1 2 ) > 0), it turns out that optimal rules can take di¤erent forms depending on the convexity or concavity of H and the monotonicity of v=F (v) : Proposition 8 In a mild economy, for the utilitarian maximization, we have: (1) if H is linear, we have in…nitely many optimal rules.
(2) if H is strictly convex, the optimal rule is 12 for d 2 (0; 1) that uniquely solves 12 If H is convex, the given optimal mechanism is an optimal mechanism.
(3) if H is strictly concave, the optimal rule is 13 As for Rawlsian maximization, if H is convex and v=F (v) is decreasing, then q M is optimal. If H is concave and v=F (v) is increasing, then q M is optimal.
Proof. In the proof, we …rst show that UB has to bind at the optimal solutions, then solve for the maximizers among the two-step rules, then …nally show that the two-step maximizer gives a higher social welfare than any q for which UB binds.
We …rst establish the following lemma, whose proof is relegated to the Appendix. In the proof, we …rst argue that if UB does not bind, then q cannot be optimal unless it is a two-step function (again by considering an "ironed out" version of the function); then we argue that the maximizer among the two-step functions has to satisfy UB.
Lemma 9 UB has to bind at the optimal solution for both problems.
Hence, without loss of generality we consider assignment rules such that UB binds. We …rst consider the Utilitarian problem.

Utilitarian Problem:
Let us solve for the maximizers among the two-step functions. That is, among the functions of the form for c 2 [0; 1] ; 0 l < k 1: Note that MC can be simpli…ed as and that Also, we have to have by Lemma 9.
In a two-step rule with parameters k; l; c where both MC and UB bind, we solve the equations (13) and (14) together for k and l and get Notice that c is then acceptable if it lies on the interval [d ; 2 (as a condition of the proposition) and the fact that 1 2 = 1 1 2 Let us denote the objective function among the two-step functions with cuto¤ c by o (c) : De…ne T (x) as In the remainder of the proof, we analyze the three cases, where we assume H to be linear, strictly convex, or strictly concave.
(1) H is linear In this case, H(v) = hv (note that intercept has to be zero in order not to violate the constraint F (0) = 0). Then the binding UB constraint would be rewritten as h . That is, the objective function must take value 1 1 h . Any feasible rule q such that UB binds obtains this result. The set of such rules is not empty. For instance, any two-step rule with parameters c 2 [d ; 1 1 2 ]; k(c) and l(c) readily obtains h , by construction. Also, any convex combination of these two-step rules obtains the same result.
(2) H is strictly convex We …rst establish the following lemma, whose proof is relegated to the Appendix.

Lemma 10
If H is strictly convex, then T is strictly concave (hence S is strictly decreasing).
Then, among the two-step rules, the one depicted in the proposition, q M , is optimal. In the rest of the proof we show that no other rule such that both MC and UB bind can obtain higher welfare.
Each rule q has an associated density function is the distribution function associated to q. The maximization problem could be rewritten as …nding a distribution function R; as follows: The problem is incomplete because R should be compatible with a monotonic q. Yet for the moment this is irrelevant. We use the notation R and R for the distributions associated with q M and q M , respectively. Notice that Next, we establish the following lemma, whose proof is relegated to the Appendix.
, then R either second-order stochastically dominates, or is dominated by, R (R ).
Corollary 12 An immediate implication of Lemma 11 and the assumption of a strictly convex H is that Finally, we have the tools to show that q M is optimal. By the method of contradiction suppose that there is a feasible q and its associated distribution R is such that 2 , which is a contradiction. 15 Note that any convex combination of two feasible mechanisms is also feasible.

(3) H is strictly concave
The proof is analogous to the case where H is strictly concave, with analogous claims. In this case, we argue that if H is strictly concave, then T is strictly convex (hence S is strictly increasing). Thus, q M is optimal among two-step rules. To show that no other feasible rule q obtains higher welfare, the analogous results apply. By method of contradiction, consider a feasible q and its associated distribution R be such that We have that R either second-order dominates, or is dominated by, R . Hence we know that 2 , which is a contradiction.
Next, we consider the Rawlsian maximization problem.

Rawlsian Problem:
Solving for the maximizers among the two-step functions as in the utilitarian case, we have Let us denote the objective function among the two-step functions with cuto¤ c by ro (c) : We can then see that ro (c) is equivalent to (note that Hence, the optimal c among the two-step allocations is given by Now, we establish the following lemma, whose proof is relegated to the Appendix. Lemma 13 (1) If H is strictly convex and v=F (v) is decreasing, thenT is strictly concave (henceS is strictly decreasing).
(2) If H is strictly concave and v=F (v) is increasing, thenT is strictly convex (henceS is strictly increasing).
In case (1), the Rawlsian-optimal two-step rule implies c = d . In case (2), the Rawlsianoptimal two-step rule implies c = 1 1 2 . In both cases, as in the utilitarian problem, no other feasible assignment rule such that UB binds can obtain a better value for the objective function. The argument for this step is identical to the one in the utilitarian case, and therefore we omit it here.

Implementation via pseudomarket and Boston Mechanism
In this section, we solve for equilibria of Hylland and Zeckhauser (1979)'s pseudomarket with equal budgets (PM) and Boston mechanism without priorities (BM) in our setup. We establish that, in a tough market, they both result in the same allocation as the optimal allocations in the utilitarian and Rawlsian setups. We also show that in a mild market, the competitive equilibrium of PM implements q M ; and the Bayesian Nash equilibrium of BM implements q M : Hence when H is strictly convex (concave), PM (BM) implements the utilitarian optimal assignment. Moreover, when H is strictly convex and v=F (v) is decreasing (H is strictly concave and v=F (v) is increasing), PM (BM) implements the Rawlsian optimal assignment.
We …rst formally describe and analyze the equilibria of the two mechanisms. We also show the uniqueness of the equilibria. We …nally compare the equilibrium assignments to those arising from the optimal mechanisms.

Pseudomarket with Equal Budgets
In Hylland and Zeckhauser (1979)'s pseudomarket with equal budgets (PM ), all agents are endowed with the same budget, which is normalized to 1. This budget consists of "fake money," and thus does not generate utility per se. It is used to purchase probability units of the available social positions. We normalize the price for low-class positions to 0, and we denote the price for upper-class positions as 1 and the price for medium-class positions as 2 . Without loss of generality, we set 1 > 2 > 0. Also, we can argue that 1 1: This is because any other type of price vector would entitle all agents to get the high position and therefore could not possibly clear the market. Let p(v; 1 ; 2 ) be the probability that a v type agent buys to in order to be assigned the upper-class position. Also, let q(v; 1 ; 2 ) denote her purchased probability of a medium-class position. A v type agent solves the problem max p;q p + qv s:t: 1 p + 2 q 1 where p; q 0, p + q 1. The solution to the problem is unique for almost all types v 2 [0; 1], 16 and it is denoted as p (v; 1 ; 2 ) and q (v; 1 ; 2 ).
Existence of CE is guaranteed from Hylland and Zeckhauser (1979). The following proposition solves for the CE of the PM, and it also establishes uniqueness of CE. The proof is relegated to the Appendix. In the proof, we analyze two cases: the …rst is when medium positions are expensive ( 2 1); and the second is when medium positions are cheap ( 2 < 1); : It turns out that the former case corresponds to a tough market, and the latter one corresponds to a mild market. 16 For all the types except for v = 1 2 :

Proposition 14
In a tough market, the unique CE prices are In this CE, types v < v obtain the probability bundle and types v > v get (where the …rst, second, and third components represent probability shares of high, medium, and low positions, respectively).
On the other hand, in a mild market, the unique CE prices are In this CE, the assignment of probabilities is as follows. Types v < v obtain the probability bundle and types v > v get

Boston Mechanism without Priorities
In the Boston mechanism without priorities (BM ), agents simultaneously rank social classes. A round-by-round algorithm serves to assign the available positions. In a …rst round, we consider each agent for the social class she ranked in the top position. When there is an excess of considered individuals with respect to available positions, a fair lottery de…nes who is accepted and who is rejected. If there is no such excess demand, every considered agent is accepted. An accepted agent obtains a position for which he was being considered. The rejected agents go to a second round in which they are considered for the social class they ranked second, and a similar acceptance/rejection procedure applies for the not-yetassigned positions. After a …nite number of rounds (three at most in this case), all agents are eventually accepted for some social class position. It is apparent that no agent would rank the low-class position other than last. So the strategy space simpli…es to two relevant strategies: either ranking the high class in …rst position (strategy 1) or ranking the middle class in …rst position (strategy 2). Let m j be the mass of agents using strategy j 2 f1; 2g.
In Proposition 15, we solve for the unique Bayesian Nash equilibrium of BM. The proof is relegated to the Appendix. In the proof, as in the proof of Proposition 14, we analyze two cases: …rst when medium positions are overdemanded (m 2 2 ; ) and second when medium positions are underdemanded (m 2 < 2 ): It turns out that the former case corresponds to a tough market, and the latter corresponds to a mild market.
In the bayesian Nash equilibrium of the tough market, types v < v obtain the probability bundle whereas types v > v get On the other hand, in the Bayesian Nash equilibrium of the mild market, types v < v obtain the probability bundle whereas types v > v get (0; 1; 0) for types v < 1 1 2 .

Implementation of the Optimal Rules
As a corollary to Propositions 6,8,14, and 15, we establish our main result. The proof follows from noting that in a tough market both PM and BM result in allocation q T ; and in a mild market PM results in allocation q M ; whereas BM results in allocation q M . 17;18 Theorem 16 In a tough market, utilitarian and Rawlsian optimal assignments are implemented by both the competitive equilibrium of the pseudomarket with equal budgets and the Nash equilibrium in the Boston mechanism without priorities. In a mild market, the utilitarian optimal assignment is implemented by competitive equilibrium of the pseudomarket if H is convex, and by the Boston mechanism without priorities if H is concave.
For the Rawlsian problem in a mild market, the optimal assignment rule is implemented by competitive equilibrium of the pseudomarket if H is convex and c=F (c) is decreasing, and by the Boston mechanism without priorities if H is concave and c=F (c) is decreasing.

Discussion
In the following subsections, we discuss several observations regarding the results of our model. First, we consider an extension of our model in which we allow agents to have varying ordinal preferences. Speci…cally, we suppose that the high position gives a constant utility a 2 (0; 1] to every agent. In this extension, we show that PM and BM may implement the utilitarian and Rawlsian maximization problems under some assumptions. Second, we illustrate that not all weighted utilitarian welfare functions have the same maximand in a tough market. Therefore, the coincidence between utilitarian and Rawlsian optimal rules in tough markets is not a subcase of a general equivalence across weighted welfare functions. Third, in a mild market, we show that the utilitarian-and the Rawlsian-optimal assignments may not coincide. For instance, it could be the case that BM provides the solution for one problem while PM provides the solution for the other problem. Finally, we show that neither the utilitarian-nor the Rawlsian-optimal assignments are always given by either PM or BM. With this we illustrate that the optimality of either PM or BM cannot be extended to every possible case.

Varying Ordinal Preferences
A natural question is whether our result collapses if we relax our assumption that high-class positions are everyone's favorite. We work with the same model, but suppose that the high position gives a constant utility a 2 (0; 1] to every agent. If a is high enough (we do not require a to be arbitrarily close to 1; we assume a H (F 1 (1 2 )) 19 ), that is, if high-class positions are still highly valued, we …nd the following facts: 20 1. Tough markets emerge "more easily"than when a = 1, for …xed primitives F; 1 ; and 2 : Intuitively, lower a implies higher demand for mid-class positions; hence the likely impossibility of ensuring mid-class positions to high types.
2. In tough markets, both BM and PM are still optimal, in the utilitarian as well as in the Rawlsian sense.
3. In mild markets, a bias arises in favor of BM. Su¢ cient conditions for optimality of BM are still su¢ cient in this extended model. The intuition is similar to the one of the fact 1 above. Because medium positions are more appreciated overall, BM becomes more appealing than PM. The former guarantees certain assignment of middle positions to su¢ ciently high types, while the latter does not.
We …rst establish the following payo¤ equivalence result. Its proof's steps are the same as in proof the of Lemma 1.
Lemma 17 Incentive compatibility is equivalent to 19 It is possible to achieve similar results for the case a < H F 1 ( 2 ) ; yet the analyzed case is simpler to illustrate. 20 While we explain the model below, we do not provide a full statement and proof of these results due to its complexity. All proofs are available upon request. and q increasing, p decreasing, q + p increasing for v 2 [0; a] and decreasing for v 2 [a; 1] (together called monotonicity conditions).
Note that the extended problem becomes more complex than the original one since UB applies to a instead of the highest type: we need to ensure that p(a) + q(a) 1.
Utilitarian social welfare can be shown to be Rawlsian social welfare is equal to We establish the following result. The proof is similar to the proof of Proposition 3.

Proposition 18 A rule (p ( ) ; q ( )) is incentive compatible and feasible if and only if
and The …rst constraint is market-clearing (MC), the second one is the upper bound (UB), and the third one is the lower bound (LB).
We can easily see that, as in the original model, utilitarian social welfare maximization is equivalent to subject to above MC, UB, LB.
On the other hand, Rawlsian social welfare maximization is equivalent to subject to MC, UB, LB.
In the relaxed problem, in which we consider only MC (and ignore UB and LB), since the objective functions and MC are the same, Lemma 4 holds and the solution to the relaxed problem of both the utilitarian and the Rawlsian problem is given by Since we assume a H (F 1 (1 2 )) (> F 1 (1 2 )); the optimal rule in the relaxed problem satis…es UB if and only if As in our main model, we call an economy a tough market if this condition is satis…ed. Otherwise it is considered a mild market. Note that in this extension, a tough market is more likely: the condition in the main model required (1 2 ) F 1 (1 2 ) to be greater than 1 ; in the extension it should only be greater than a 1 : This brings us to the …rst fact we stated above.
As for the second statement, we …rst observe that when a H (F 1 (1 2 )) ; in a maximization problem where the objective function is dt and the constraint is just MC, the solution is q . This is because E [J (t) j t v] = v and, therefore, in the optimal solution, q has to be constant between b H 1 (a) and 1: Given this, and also b > F 1 (1 2 ) ; one can easily argue that the highest value that the LHS of the UB constraint can get is achieved by q ; and this means that in a tough market UB never binds. With this simplifying insight, the proof of the following proposition follows the same steps as the proof of Proposition 6, and it is omitted.

Proposition 19
For a H (F 1 (1 2 )) ; in a tough market, the optimal solution for both utilitarian and Rawlsian social welfare is for v a that uniquely solves The next main result follows immediately. It stems from similar arguments as in Proposition 14, Proposition 15, and Theorem 16.
Proposition 20 For a H (F 1 (1 2 )) ; in a tough market, the utilitarian and the Rawlsian optimal assignments are implemented by both PM and BM.
As for mild markets, we can get results in this extension similar to the ones in our main model. For mild markets, it turns out that under the same conditions as in Theorem 16, BM continues to be optimal in the utilitarian and Rawlsian problems. Yet, su¢ cient conditions for PM being optimal in Theorem 16 need to be strengthened. 21 Hence, in a way, this extension brings a bias in favor of BM rather than PM, as we stated at the beginning of the subsection.
Next, we demonstrate that in a tough market PM and BM may fail to maximize a weighted utilitarian social welfare-maximization problem.

Weighted Utilitarian Maximization in a Tough Market
In this subsection, we consider a weighted utilitarian objective and demonstrate that even in a tough market, the optimal assignment for weighted utilitarian maximization may di¤er from the utilitarian maximizing maximization, and therefore may also be di¤erent from PM and BM allocations.
In the weighted utilitarian maximization, consider the weight (v) for type v with The weighted utilitarian social welfare is given by Finally, by changing the order of integration in the third term, we can write 22 to be K (t) ; as long as K (t) is increasing, for the "tough market," we would have the same solution as the utilitarian or Rawlsian problem.
However, the following example shows that the solution to weighted utilitarian maximization may di¤er from the solution to the utilitarian and Rawlsian problems.
Example 21 Consider F (t) = t; (t) = 3t 2 (so that f (t) = 1; G (t) = t 3 ; H (t) = 2t); 2 = 0:2, and 1 = 0:64: For these speci…cations, K (t) = 2t t 3 : Then, the relaxed problem in the weighted utilitarian case is to maximize The solution to this problem is given by the solution to the following problem  Finally, for these speci…cations, we can quickly check that the optimal solution for the utilitarian and Rawlsian cases are di¤erent from the above solution. It is ( 1 t 0:8 0 t < 0:2: Next, we consider an example that shows that in a mild market, the utilitarian and Rawlsian optimal assignments may di¤er, but may coincide with either PM or BM.

Di¤ering Utilitarian-and Rawlsian-Optimal Assignments in a Mild Market
A …rst glance at the su¢ cient conditions for the optimality of either the PM assignment rule or the BM assignment rule 23 in a mild market reveals that convexity/concavity of H is a su¢ cient condition in the utilitarian problem, whereas this alone does not apparently su¢ ce in the Rawlsian problem. Some additional condition on the strength of F relative to the uniform distribution is needed in the proof. A fair question is whether this is a meaningful di¤erence or whether we were simply unable to …nd the right proof in the Rawlsian problem. It turns out that the strength of F relative to the uniform distribution makes a meaningful di¤erence. The following example illustrates that the strength of F has a signi…cance that can indeed counterbalance that of the convexity/concavity of H.
2v+1 is a strictly concave function; therefore the (incentive-compatible) utilitarian-optimal assignment rule in a mild market is the BM assignment rule. However, observe that v F (v) = 2v v+v 2 is a decreasing function; thus our results do not tell us what the Rawlsian-optimal assignment rule would be. In our su¢ cient conditions (Proposition 8), either H is concave and v=F (v) is increasing or H is convex and v=F (v) is decreasing. In this example, these two elements do not tend toward the same direction.
It turns out that we can easily calculateT (c) = E(J(v)jv c) = c 1 1=2+c=2 . We observe thatT is a concave function; therefore the Rawlsian-optimal two-step assignment rule in a mild market is the one provided by PM. By strict concavity of H, no other assignment rule with binding UB could improve the objective function. We conclude that the PM assignment rule is (incentive-compatible) Rawlsian-optimal. 24 Observe the contrast with the case where BM provides the utilitarian-optimal assignment rule.
Next, we consider an explicit example that shows that in a mild market, the Utilitarian and Rawlsian optimal assignments may di¤er from the allocations of PM and BM.

Failure of PM and BM to Be Optimal in a Mild Market
In Section 2.5, we gave su¢ cient conditions for PM or BM to be optimal. Now, we provide an explicit example in which neither PM nor BM is optimal in the utilitarian and Rawlsian maximization problems. To achieve this we consider an F such that H is neither convex nor concave.
In the next example, the utilitarian and Rawlsian optimal mechanisms are di¤erent from both PM and BM allocations.
Then can calculate that The proof of these assertions follows the lines of the proof of Proposition 8.
and we can see that they both have inverse U shapes (where S is the blue line and e S is the red line. ) For this example, neither the PM allocation nor the BM allocation coincides with either the utilitarian optimal allocation or the Rawlsian optimal allocations. All are di¤erent from each other. Speci…cally, the PM allocation is a two-step function with cuto¤ approximately at d = 0:19258; the BM allocation is a two-step function with cuto¤ at d = 0:75; the utilitarian optimal allocation is a two-step function with cuto¤ approximately at 0:523; and the Rawlsian optimal allocation is a two-step function with cuto¤ at 0:5:

Conclusion
Except for Miralles (2012), examples of optimal mechanism design tools being used for the study of assignment problems are virtually nonexistent. 25 In this paper, we consider a tractable problem with a continuum of agents and hierarchically ordered positions and solve important welfare maximization problems subject to incentive constraints. Our results are surprising in that they provide arguments in favor of mechanisms that are well known and debated in the matching theory literature. For the …rst time that we are aware of, well-studied mechanisms such as the pseudomarket and Boston mechanisms are shown to be "second-best" welfare maximizers among all possible assignment rules (in the sense of being "…rst-best"among the incentive-compatible ones). 26 It is also surprising that they are optimal not only in the utilitarian sense but also in the Rawlsian (max-min) sense. This is in sharp contrast to other mechanisms such as deferred acceptance, which works very poorly in this context.
We have also considered an extension of our model in which the ordinal rankings of the agents for positions may be di¤erent from each other. This extension highlights the fact that the results of the main model are not just an artifact of the same ordinal ranking assumption. 27 In our model, we abstracted away from real-world features such as preexisting priorities and precedence. We plan to consider these issues further in future work. We hope that the results of the present paper will be a …rst step for more general and interesting results that make use of optimal mechanism design tools in economic environments without money.
is the seller's virtual valuation or information rent. Hence, p (1) 0 is equivalent to On the other hand, p (1) + q (1) 1 is equivalent to Finally, we argue that if q is increasing, other monotonicity constraints (p is decreasing, q + p is increasing) are automatically satis…ed. Given v >ṽ; incentive compatibility implies Since q is increasing, p is decreasing, and 0 v 1, we must have q(v) q(ṽ) p(ṽ) p(v). This implies that p + q is increasing.
To sum up, p is uniquely determined given q; and the following conditions on q are necessary and su¢ cient conditions for feasibility and incentive compatibility.
Proof of Lemma 7. We …rst argue that optimal q has to be a two-step function. Suppose not, that is, there exists an interval [a; b] such that for all t 2 (a; b) ; we have q (a) < q (t) < q (b) : Then consider the "ironed out"version of q in the interval [a It is then immediate that b q satis…es MC. Also, one can check that Moreover, with the assumption that H is an increasing function, we have q also satis…es LB. Hence, we conclude that q cannot be optimal. Then we argue that we only need to consider the following form of q: This is because if a there is a feasible two-step function of the form for h > l > 0 (note that 1 > h since UB does not bind), we can …nd another two-step function with 1 > h > h 0 ; and l > l 0 that also satis…es the constraints and gives a higher objective function value for both problems.
Proof of Lemma 9. First, we argue that if UB does not bind, then q cannot be optimal unless it is a two-step function. Suppose q is not a two-step function, that is, there exists an interval [a; b] such that for all t 2 (a; b) ; we have q (a) < q (t) < q (b) : Then consider the "ironed out"version of q in the interval for c and d 2 (a; b) that satis…es It is then immediate that b q satis…es MC. Also, one can check that Moreover, with the assumption that H is an increasing function, we have q(1) = q(1), we can state that b q also satis…es LB. And for c and d close enough to a and d, respectively, it continues to satisfy UB. Hence, we conclude that q cannot be optimal.
Next, we argue that the maximizers among the two-step functions also should satisfy UB as equality. Consider a two-step function of the form for c 2 [0; 1] ; 0 l k 1: Suppose UB does not bind; then q (1) = k < 1: Consider l = 0: Then the following assignment rule clearly increases the objective function's value by choosing "; " 0 such that MC still holds, and "; and " 0 are small enough such that UB is still satis…ed. Moreover, we do not have to worry about LB in any two-step rule for a mild market when , and LB is written as k(1 F (c)c) k 1 . Joining both expressions we rewrite LB as 2 F (c)c 1 F (c) 1 . Since k 1 (or c F 1 (1 2 )) we have that the RHS of the previous inequality is not higher than (1 2 )F 1 (1 2 ), which is lower than 1 in a mild market. Now consider 0 < l < k: Then the following assignment rule also increases the objective function's value by choosing "; " 0 such that MC still holds, and "; and " 0 are small enough such that UB is still satis…ed. Since q 0 (1) = q(1) and The …nal case involves l = k = 2 : It is easy to check that this uniform rule does not bind either UB or LB. The following rule q 0 (t) = for small enough " > 0 meets MC, UB, and LB. q 0 clearly is an improvement over the uniform rule q(t) = 2 . Hence, we have shown that no rule can be optimal if UB does not bind.
Proof of Lemma 10. We have H 0 (c) = 2 f 0 (c)F (c) we obtain that the sign of T 00 (c) is the sign of Z(c) = 1=T 0 (c) H 0 (c).
Proof of Lemma 11. First, note that no feasible R can …rst-order stochastically dominate, or be dominated by, either R or R . This is because a domination implies (since H is increasing) E R H(v) 6 = 1 1 2 : This implies q(0) < l for all feasible rules other than q (otherwise R would be …rstorder stochastically dominated by R ). Moreover, for all feasible rules other than q , we have to have q(1) > k (otherwise R would be …rst-order stochastically dominated by R ).
Another implication is: If q(v) = 0 for almost all v d and q 6 = q , q is not feasible; if q(v) = 1 for almost all v 1 1 2 and q 6 = q , q is not feasible. From the previous two lines, we can establish that if q is feasible and is not either q or q , both functions [r(v) r (v)] and [r(v) r (v)] switch signs exactly twice.
Proof of Proposition 14. First, in the simple maximization problem (16) above, the "bene…t to cost ratio" of high positions is 1 1 ; whereas it is v 2 for the medium positions. Therefore, as long as the constraint p + q 1 is not binding, agents with v < v ( 1 ; 2 ) 2 1 would want to buy from high positions, and agents with v > v ( 1 ; 2 ) 2 1 would want to buy from medium positions. We already argued that 1 1; if we also have 2 1; then agents would have no money left for buying inferior positions (and p + q 1 does not bind). We present this case as Case 1 below, which turns out to correspond to the tough market. On the other hand, if we have 2 < 1; then agents with v > 2 1 would have money left after buying the whole probability of medium positions (q (v) = 1). We present this case as Case 2 below, which turns out to correspond to the mild market. Suppose 2 1 in a CE, and let the unique indi¤erent type be v (which will be v ( 1 ; 2 ) equal to 2 1 ). We can observe that types below v buy only high positions (p = 1 1 ; q = 0), and types above v buy only medium positions (p = 0; q = 1 2 ). For this to be a CE, we have to have F (v ) These two imply : ; we can conclude that a CE can exist only if there is a type v 2 (0; 1) such that It is immediate that this type exists and is unique. This is because F (v)v 1 F (v) is strictly increasing with range [0; 1). However, this does not mean that this type of a CE necessarily exists. One must check the condition 2 1, or 2 . Given that the LHS of equation (30) is monotonically increasing, this CE exists if and only if which is exactly when the economy is "tough." Hence, in a tough market, the CE prices are where v uniquely solves (30). In this CE, the assignment of probabilities is as follows. Types v < v obtain the probability bundle and types v > v get where the …rst, second, and third components represents probability shares of high, medium and low positions, respectively.
Suppose 2 1 in a CE, and let the unique indi¤erent type be v : Types below v buy only high positions (p = 1 1 ; q = 0). On the other hand, types above v buy medium positions, and buy high positions with the rest of their money in such a way that the total probability of being assigned high or medium positions does not exceed 1 (p + q 1). The solution to the high types'maximization problem are given by p = 1 2 1 2 and q = 1 1 1 2 : 29 Also, as in Case 1, we can argue that the unique indi¤erent type v ( 1 ; 2 ) is again equal to 29 The maximization problem is max p + qv subject to 1 p + 2 q 1 and p + q 1: We can argue that at the optimal solution both constraints have to bind, and p = 1 2 1 2 and q = 1 1 1 2 solve them simultaneously and therefore are the maximizers. (1 F (v )) 1 1 1 2 = 2 : The above system of two linear equations has the following unique solution in prices, as a function of v ; 1 and 2 : The question is whether there exists a v that solves (31), and whether for that v we would have 2 < 1: We can also show the uniqueness of v : Hence, its sign is equivalent to that of G 0 (v)=f (v) = 1 1 2 H(v); which is a decreasing function (since H( ) is increasing). We therefore conclude that G is concave. Since G is concave, G (0) < 0; G(F 1 (1 2 )) > 0; and G (1) = 0; we can conclude that there exists a unique v that satis…es G (v ) = 0 (and also v 2 (0; F 1 (1 2 ))).
Finally, we show that under a mild market, we would also have 2 < 1: This follows 30 If we compare the utility at the optimal bundle of lower types and higher types, we observe that again the critical type is v ( 1 ; 2 ) = 2 1 as 1 2 1 2 + v 1 1 < 1 reduces to 1 F (v ) > 2 , or v < F 1 (1 2 ); which we have shown. On the other hand, under a tough market we would have G(F 1 (1 2 )) > 0; which implies v F 1 (1 2 ); and 2 1: In conclusion, under a mild market, we would have 2 < 1; and in CE, the assignment of probabilities are as follows. Types v < v obtain the probability bundle and types v > v get where the …rst, second, and third components represents the probability shares of high, medium and low positions, respectively.
Proof of Proposition 15. Obviously we must consider only cases when m 1 1 (if m 1 < 1 using strategy 2 would never be a best response), in which we say that high-class positions are overdemanded. So we are left with two cases to analyze: one in which middleclass positions are overdemanded (m 2 2 ), and the case in which they are underdemanded (m 2 < 2 ). It turns out that the former case corresponds to the tough market and the latter to the mild market. In this case it is clear that those who are rejected in the …rst round end up being assigned to low-class positions. Those choosing strategy j 2 f1; 2g obtain j =m j chances at the position ranked …rst and 1 j =m j chances for a low-class position. An indi¤erent type v (m 1 ; m 2 ) meets 1 =m 1 = v (m 1 ; m 2 ) 2 =m 2 . Types above the indi¤erent type best-respond by choosing strategy 2, and types below choose strategy 1. Therefore, a Nash equilibrium (NE) is characterized by the existence of a v 2 (0; 1) such that As in Case 1 of the proof of Proposition 14, a solution to this equation exists and is unique. It remains be shown that in e¤ect m 2 > 2 , or 2 < 1 F (v ), or v < F 1 (1 2 ). Given that the LHS of the equation above is monotonically increasing, a Case 1 NE exists if and only if (1 2 )F 1 (1 2 ) 2 > 1 2 or 1 (1 2 )F 1 (1 2 ) 0; which exactly is when the market is "tough." In this Bayesian Nash equilibrium, Types v < v obtain the probability bundle whereas types v > v get ): Note that in Cases 1, both the pseudomarket (CE) and the Boston mechanism (NE) obtain the same random assignment. This is not a coincidence. Miralles (2008) shows that both mechanisms obtain the same assignment in cases where only one kind of position is underdemanded. In this case, those agents who play strategy 2 are assigned to middle-class positions with certainty. Agents playing strategy 1 obtain 1 m 1 chances at the high-class positions in the …rst assignment round, 2 m 2 m 1 chances (in the second round) for middle-class positions, and Let v be the type who is indi¤erent between the two strategies. We then have We now check that m 2 < 2 holds. That is, 1 F ( 1 1 2 ) < 2 . This is equivalent to the market being "mild" 1 (1 2 )F 1 (1 2 ) > 0.
Finally, the obtained probability bundles are