Strategyproof and fair matching mechanism for ratio constraints

We introduce a new type of distributional constraints called ratio constraints, which explicitly specify the required balance among schools in two-sided matching. Since ratio constraints do not belong to the known well-behaved class of constraints called M-convex set, developing a fair and strategyproof mechanism that can handle them is challenging. We develop a novel mechanism called quota reduction deferred acceptance (QRDA), which repeatedly applies the standard DA by sequentially reducing artificially introduced maximum quotas. As well as being fair and strategyproof, QRDA always yields a weakly better matching for students compared to a baseline mechanism called artificial cap deferred acceptance (ACDA), which uses predetermined artificial maximum quotas. Finally, we experimentally show that, in terms of student welfare and nonwastefulness, QRDA outperforms ACDA and another fair and strategyproof mechanism called Extended Seat Deferred Acceptance (ESDA), in which ratio constraints are transformed into minimum and maximum quotas.


Introduction
The matching theory has been extensively developed for markets in which two types of agents (e.g., students/schools, hospitals/residents) are matched [39]. Recently, this topic has been attracting considerable attention from AI researchers [3,4,23,24,27,31]. A standard market deals with maximum quotas, which are capacity limits that cannot be exceeded. However, many real-world matching markets are subject to a variety of distributional constraints, including regional maximum quotas, which restrict the total number of students assigned to a set of schools [25], minimum quotas, which guarantee that a certain number of students are assigned to each school [7,15,17,20,41,42], and diversity constraints, which enforce that a school satisfies a balance between different types of students, typically in terms of socioeconomic status [13,19,28,31,43].
Policymakers often hope for a well-balanced matching outcome, i.e., where the number of students (or doctors) assigned to each school (or hospital) is not too diverse. For example, the Japanese government does not want the number of doctors assigned to rural hospitals to be drastically fewer than the number assigned to urban hospitals [25]. The United States Military Academy solicits cadet preferences over assignments to various army branches while simultaneously trying to keep a good balance among the branches [41,42]. In China, there are two types of master's degrees: professional and academic. Since academic master programs are much more popular than professional ones, the Chinese government seeks a good balance between these two programs [25]. One way to obtain a balanced outcome is to impose artificially low maximum quotas to guarantee that students/ doctors are not overly concentrated in popular schools/hospitals. Another way is to introduce minimum quotas to guarantee that a certain number of students/doctors are allocated to unpopular schools/hospitals. In recent years, strategyproof (i.e., no student has an incentive to misreport her preference) and fair (i.e., no student has a justified envy) mechanisms that satisfy minimum quotas have been developed in a variety of settings [15,17,20].
In this paper, we introduce a new type of constraints called ratio constraints that can explicitly specify the required balance among schools/hospitals, where parameter specifies the acceptable minimum ratio between the least/most popular schools. Such ratio constraints are used in practice. For example, in many universities (including the authors' university), a department is divided into several courses. When assigning undergraduate students to courses, ratio constraints are imposed to maintain the balance among courses. Ratio constraints can be indirectly implemented by minimum and maximum quotas, i.e., if the maximum quota of each school is q and the minimum quota of each school is p, we can guarantee that the ratio is at least p/q. However, this approach lacks flexibility because we may find a matching that is better for students while still satisfying the ratio p/q. In contrast, our ratio constraints enforce a good balance among schools in a more flexible way; students can be assigned beyond q or p based on student preferences.
In this paper, we develop a novel mechanism called Quota Reduction Deferred Acceptance (QRDA), which repeatedly applies the well-known Deferred Acceptance (DA) mechanism [16] by sequentially reducing artificially introduced maximum quotas. Fragiadakis and Troyan [14] use the idea of sequentially reducing maximum quotas for a different goal. In their model, students are partitioned into different types and the goal is to satisfy typespecific minimum and maximum quotas.
Developing a non-trivial strategyproof and fair mechanism that can handle ratio constraints is theoretically interesting and challenging. In existing works, it is shown that if constraints belong to a well-behaved class (which is called M-convex set), then a Page 3 of 29 23 mechanism called generalized DA, which is based on DA, is strategyproof and fair [18,30]. As we discuss later, ratio constraints do not belong to this class. Our result is a first step toward identifying a class beyond an M-convex set, such that we can develop a non-trivial strategyproof and fair mechanism.
As well as being fair and strategyproof, QRDA is also proved to be weakly group strategyproof. In terms of student welfare, we show that QRDA is weakly Pareto optimal, and moreover, no strategyproof mechanism exists that dominates QRDA. Furthermore, we show that QRDA outperforms a baseline mechanism called Artificial Cap Deferred Acceptance (ACDA), which uses predetermined artificial maximum quotas, both theoretically and experimentally. In terms of another desirable property called nonwastefulness (i.e., no student claims an empty seat in a more desirable school), we experimentally show that QRDA outperforms ACDA. We extend these experiments by comparing QRDA with an additional mechanism, Extended Seat Deferred Acceptance (ESDA), with similar conclusions.

Related work
To the best of our knowledge, we are the first to formally examine ratio constraints even though a similar concept called proportionality constraints is introduced [36]. In their model, students are partitioned into different types (e.g., minority/majority) and the focus is on the ratio between different types of students within a school. 1 In addition, they consider that proportionality constraints are soft, which can be violated to some extent; in our model, constraints are hard and cannot be violated. Furthermore, they do not consider strategyproofness. Some papers have investigated strategyproofness in matching models with quotas constraints although they consider a completely different setting from ours [8,9,22,37]. These papers are concerned with a students-courses setting where only students have preferences over courses and both students and courses have quotas/capacities, whereas in our setting, both students and schools have preferences and only schools have quotas. Closer to our setting, Kamada and Kojima [26] study students-schools matchings and characterize the constraints (called general upper bounds) that guarantee the existence of a student-optimal and fair matching. However, they differ from us by considering constraints imposed on individual schools whereas our constraints involve all schools, and by allowing constraints to depend on the identity of students whereas ratio constraints are based on the number of students.
There are two streams of works on matching with distributional constraints. One stream considers constraints that arise from real-life applications, e.g., regional maximum quotas [25], individual/regional minimum quotas [15,17], affirmative actions [13,31], etc. The other stream is more mathematical and considers an abstract and general class of constraints, e.g., constraints that can be represented as a substitute choice function [21], an M-convex set [30], a general upper bound [26] etc. The first stream is based on practical applications. Thus, the obtained results are easier to understand and can be directly applied to real-life applications. The second stream is more general and mathematically well-organized, but applying obtained results to real-life applications can be non-trivial.
We have proposed a new abstract model of distributional constraints called a union of symmetric M-convex sets, which subsumes our ratio constraints, and we showed preliminary results including QRDA's strategyproofness in this extended model [46]. Our current paper belongs to the first stream, for instance, ratio constraints are relevant when dividing university students into several courses in a department while Zhang et al. [46] belongs to the second stream. Thus, we believe that the results of this paper are easier to understand and directly applied to real-life applications compared to theirs [46]. Furthermore, the proof techniques showing strategyproofness of QRDA differ on these two papers. Constructing theoretical results in a general model is much harder compared to a more specialized model. We cannot easily extend theoretical results presented in this paper to the general model (or some of them might not hold in the general model).

Model
A student-school matching market with ratio constraints is defined by a tuple (S, C, ≻ S , ≻ C , ).
-S = {s 1 , … , s n } is a finite set of n students.
is the profile of the student preferences, where each ≻ s is a strict and complete preference order over C. For example, if s strictly prefers c over is the profile of the school preferences, where each ≻ c is a strict and complete preference order over S. For example, if c strictly prefers s over s ′ , it is denoted by s ≻ c s ′ . Moreover, we denote by s ⪰ c s � if either s ≻ c s ′ or s = s � . -0 ≤ ≤ 1 defines the acceptable minimum ratio between the least/most popular schools.
X = S × C is a finite set of all possible contracts. Contract (s, c) ∈ X means that student s is matched to school c. For Ẋ ⊆ X , Ẋ s denotes {(s, c) ∈Ẋ | c ∈ C} , and Ẋ c denotes {(s, c) ∈Ẋ | s ∈ S} . In other words, Ẋ s (resp. Ẋ c ) denotes all contracts in Ẋ related to s (resp. c). For Ẋ ⊆ X , we define r(Ẋ) as follows: In other words, r(Ẋ) is the ratio between the numbers of students in the least/most popular schools in Ẋ .

Definition 1 (Feasibility) For
In this market, we assume all schools are acceptable to all students and vice versa. Even though this is a strong assumption, it is a necessary condition for the existence of a feasible matching in our model. The same assumption is widely used in existing works [2,15,18,43]. Moreover, to guarantee the existence of a feasible matching, ratio must be at most ⌊n∕m⌋∕⌈n∕m⌉ since even in the most balanced matching, the most popular school has ⌈n∕m⌉ students and the least popular school has ⌊n∕m⌋ students. For matching Ẋ , we call school c strictly minimum if for all c ′ ( ≠ c ), |Ẋ c | < |Ẋ c ′ | holds, and strictly maximum if for With a slight abuse of notation, for two matchings Ẋ and Ẍ , we denote , if student s prefers the school that she obtained in Ẋ to the one in Ẍ . We also use notations like c ≻ sẊs or Ẋ s ≻ s c , where c is a school and Ẋ s is student s's contract. Furthermore, if either Ẋ s ≻ sẌs or Ẋ s =Ẍ s , we denote Ẋ s ⪰ sẌs , which reads as student s weakly prefers Ẋ s over Ẍ s . Mechanism is a function that takes a profile of student preferences ≻ S as input 2 and returns a set of contracts. Let s (≻ S ) denote Ẋ s , where (≻ S ) =Ẋ . Let ≻ S⧵S ′ denote a profile of the preferences of all students except students in S ′ , and let (≻ S � , ≻ S⧵S � ) denote a profile of the preferences of all students, where the preferences of students in S ′ are ≻ S ′ and the preferences of the other students are ≻ S⧵S ′.
In this paper, we study three mechanism properties that are desirable in the context of matching, namely strategyproofness, fairness and nonwastefulness. Strategyproofness guarantees that students always have an incentive to truthfully report their preferences. A mechanism satisfies strategyproofness if no profile exists where an individual student can benefit from misreporting.

Definition 2 (Strategyproofness) Mechanism
is strategyproof if no truthful preference profile ≻ S , student s ∈ S , and ≻ ′ s (a misreport of s's preference) exist such that A stronger requirement than strategyproofness is group strategyproofness, which ensures that no group of students can benefit from misreporting.

Definition 3 (Group Strategyproofness)
Mechanism is weakly group strategyproof if no truthful preference profile ≻ S , group of students S ′ ⊆ S , and ≻ ′ S ′ (a misreport of the preferences of students in S ′ ) exist such that for all s ∈ S � , s ((≻ � S � , ≻ S⧵S � )) ≻ s s ((≻ S � , ≻ S⧵S � )) . Mechanism is strongly group strategyproof if no truthful preference profile ≻ S , group of students S ′ ⊆ S , and ≻ ′ S ′ (a misreport of the preferences of students in S ′ ) exist such that for all s ∈ S � , s ((≻ � S � , ≻ S⧵S � )) ⪰ s s ((≻ S � , ≻ S⧵S � )) , and for some student s ∈ S � , Fairness is defined through the notion of justified envy. Given a specific matching, student s has justified envy toward student s ′ if s ′ is assigned to school c ′ which s prefers to her current school despite the fact that c ′ prefers s over s ′ . Definition 4 (Fairness) In matching Ẋ , where (s, c) ∈Ẋ , student s has justified envy toward Matching Ẋ is fair if no student has justified envy in Ẋ . Furthermore, a mechanism is fair if it always produces a fair matching.
Nonwastefulness is concerned with the efficiency of a mechanism and guarantees that no student claims an empty seat. Given a specific matching, student s claims an empty seat in c ′ , which s prefers to her current school c, if moving her from c to c ′ holds the school-feasibility.

Definition 5
In matching Ẋ , where (s, c) ∈Ẋ , student s claims an empty seat in c ′ if Matching Ẋ is nonwasteful if no student claims an empty seat in Ẋ . Furthermore, a mechanism is nonwasteful if it always produces a nonwasteful matching.
In standard matching terminology, fairness and nonwastefulness are combined to form a notion called stability [14,17,18,26]. Decomposition of stability into fairness and nonwastefulness is commonly used when dealing with distributional constraints [15,18,25,26,30]. However, in our setting, these two properties are incompatible as Theorem 1 shows. Therefore, in this paper, we focus on finding a fair matching while reducing wastefulness as much as possible.

Theorem 1 Under ratio constraints, fairness and nonwastefulness are incompatible.
We use the following example to show that, when considering ratio constraints, fairness and nonwastefulness are incompatible in general.
Preferences of students and schools are as follows: Proof Consider Example 1. For satisfying the ratio constraints, two students must be assigned to exactly one school, and each of the other two schools must be given one student. If feasible matching is fair, it must contain (s 2 , c 2 ) and (s 4 , c 3 ) ; otherwise, either s 2 or s 4 has justified envy. Here, c 1 is the least popular school for everybody, but at least one student must be assigned to it. Assigning both s 1 and s 3 to c 1 is wasteful. Assume we assign s 1 to c 1 . If we assign s 3 to c 2 , s 3 claims an empty seat in c 3 . If we assign s 3 to c 3 , s 1 has justified envy toward s 3 . Next, assume we assign s 3 to c 1 . If we assign s 1 to c 3 , s 1 claims an empty seat in c 2 . If we assign s 1 to c 2 , s 3 has justified envy toward s 1 . ◻ We mention a family of well-studied distributional constraints in student-school market, for which there already exists a strategyproof and fair mechanism, namely M-convex constraints, motivated by discrete convex analysis [34,35].

Page 7 of 29 23
M-convexity is a discrete analogue of maximum elements of a convex set in a continuous domain. Intuitively, an M-convex set has no hollow in the set. Definition 6 means that for any two vectors , � ∈ V , we can find another element of V , i.e., − i + j , which is obtained by moving one step from toward ′ (as well as � + i − j ∈ V , which is obtained by moving one step from ′ toward ). For example, consider the standard school choice market, where the distributional constraints correspond to maximum quotas on schools. Assume there are three students and two schools whose maximum quotas are three. Since we require each student must be assigned to a school, feasible vectors are: {(0, 3), (1, 2), (2, 1), (3, 0)} . For (0, 3) and (3, 0), by moving one step from (0, 3) toward (3, 0), we obtain (1,2). Similarly, by moving one step from (3, 0) toward (0, 3), we obtain (2, 1).
Kojima et al. [30] shows that if the set of feasible vectors forms an M-convex set, then a mechanism called generalized DA is strategyproof and fair. 3 However, we cannot apply the generalized DA to the setting of ratio constraints since the following theorem shows that ratio constraints do not belong to the family of M-convex constraints.

Definition 7 (Pareto Optimality and Domination)
Matching Ẋ strongly dominates another matching Ẍ if Ẋ s ≻ sẌs holds for every s ∈ S . Matching Ẋ weakly dominates another matching Ẍ if Ẋ s ⪰ sẌs holds for every s ∈ S and student s ∈ S exists such that Ẋ s ≻ sẌs holds. Matching Ẋ is weakly (resp. strongly) Pareto optimal for students if no matching Ẍ that strongly (resp. weakly) dominates Ẋ exists. Furthermore, a mechanism is weakly (resp. strongly) Pareto optimal if it always produces a weakly (resp. strongly) Pareto optimal matching for students. Mechanism dominates another mechanism if for each preference profile of students ≻ S , (≻ S ) weakly dominates (≻ S ) or (≻ S ) = (≻ S ) holds, and ≻ S exists such that (≻ S ) weakly dominates (≻ S ).
Finally, we define two properties, weak non-bossiness and weak Maskin monotonicity, which are closely related to weak group strategyproofness. First, we present some definitions used to describe these properties.
The strict upper contour set of school c at preference ≻ s , noted U(≻ s , c) , is the set of school that student s strictly prefers to school c, formally: . In other words, the set of schools that are preferred to c in ≻ ′ s is a subset of the schools that are preferred to c in ≻ s . Preference ≻ ′ s is an uppercontour-set preserving transformation of ≻ s at school c (or equivalently at contract (s, c)), . Informally, the set of schools that are preferred to c in ≻ ′ s is exactly the set of schools that are preferred to c in ≻ s .
These notions naturally extend to preference profiles. Profile ≻ ′ S is a monotonic (resp. upper-contour-set preserving) transformation of profile ≻ S at matching Ẋ if for each student s, preference ≻ ′ s is a monotonic (resp. upper-contour-set preserving) transformation of preference ≻ s at Ẋ s .

Definition 8 (Weak Non-bossiness)
Mechanism is weakly non-bossy if for any preference profile ≻ S , student s and preference ≻ ′ s such that ≻ ′ s is an upper-contour-set preserving transformation of ≻ s at s (≻ S ) , it holds that:

Mechanism description
We first introduce the standard DA, which is a component of our mechanism. A standard market is a tuple (S, C, ≻ S , ≻ C , q C ) , whose definition resembles a market with ratio constraints. The only difference is that its constraints are given as a profile of maximum quotas: q C = (q c ) c∈C . Matching Ẋ is school-feasible if for all c ∈ C , |Ẋ c | ≤ q c holds. The standard DA is defined as follows:

Mechanism 1 (Standard DA)
Step 1 Each student s applies to her favorite school according to ≻ s from the schools that did not reject her so far.
Step 2 Each school c provisionally accepts the top q c students from the applying students based on ≻ c and rejects the rest of them (no distinction between newly applying students and already provisionally accepted students).
Step 3 If no student is rejected, return the current matching. Otherwise, go to Step 1.
Informally, quota reduction deferred acceptance (QRDA) produces an initial standard market from a market with ratio constraints, and then, at each stage, iteratively (i) applies DA on the standard market and (ii) restricts the constraints on this market (i.e., reduces the maximum quotas), until the matching returned by DA is also feasible with respect to the ratio constraints.
To determine the initial standard market, we use q max , which is the largest value that satisfies the following equation: Indeed, note that if t ( > q max ) students are assigned to c, a school that is assigned at most t � = ⌊(n − t)∕(m − 1)⌋ students exists. Since q max is the largest value satisfying Eq. (1), t � ∕t < holds. Thus, no matching is feasible where t students are assigned to c, i.e., in a feasible matching, a school accepts at most q max students. Which maximum quota is reduced at each stage is defined by , the sequence of schools based on the round-robin order c 1 , c 2 , … , c m . Let (k) denote the k-th school in , i.e., (k) = c j , where j = 1 + (k − 1 mod m) . For simplicity, we assume is based on a fixed round-robin order, but all our results hold for any balanced sequence , i.e., for each Furthermore, this requirement is crucial to guarantee the strategyproofness of QRDA as Example 3 later demonstrates.
QRDA is defined with respect to a specific quota reduction sequence . However, in the following, we assume that is the round-robin order c 1 , c 2 , … , c m , and we only specify when necessary. The formal definition of QRDA is given in Mechanism 2. We denote by q k c the quota of school c at stage k of QRDA.

Initialization:
For Step 1 Run the standard DA in market (S, C, ≻ S , ≻ C , q k C ) and obtain matching Ẋ k .
We illustrate the QRDA's execution in Example 1. We choose q max = 2 such that Eq. (1) is satisfied. In stage 1, s 1 and s 2 are assigned to c 2 , and s 3 and s 4 are assigned to c 3 . This matching is not feasible. Thus, in stage 2, the quota of c 1 is decreased but the obtained matching is identical. In stage 3, the quota of c 2 is decreased. Then s 3 is assigned to c 1 , s 2 is assigned to c 2 , and s 1 and s 4 are assigned to c 3 . This matching is feasible and fair.

Mechanism properties
In this subsection, we analyze the properties that QRDA satisfies starting with feasibility and fairness.

Theorem 3 QRDA returns a feasible and fair matching.
Proof QRDA terminates when it obtains a feasible matching. As mentioned in Sect. 2, recall that in the most balanced matching, the most popular school has ⌈n∕m⌉ students and the least popular school ⌊n∕m⌋ . Assume QRDA continues to reduce the maximum quotas of the schools without obtaining a feasible matching. Eventually, since the average number of students per school is n/m and the sequence is balanced, there will be stage k such that the following conditions hold: ∑ c∈C q k c = n and for all c ∈ C , ⌊n∕m⌋ ≤ q c ≤ ⌈n∕m⌉ . In this stage k, the provisional matching of QRDA, Ẋ , satisfies r(Ẋ) = ⌊n∕m⌋ ∕ ⌈n∕m⌉ ≥ , and thus, Ẋ is feasible. Therefore, QRDA must terminate before k, i.e., QRDA terminates at stage k ′ ( ≤ k ). Hence, Ẋ k ′ is identical to the matching obtained by the standard DA for the market (S, C, ≻ S , ≻ C , q k � C ) . Since DA is fair [16], Ẋ k ′ must be fair. ◻ From the Proof of Theorem 3, we can show the following useful lemma.

Lemma 1
During the QRDA's execution, the maximum quota of any school is at least ⌊n∕m⌋.
Proof As indicated in the Proof of Theorem 3, QRDA must terminate at stage k ′ ( ≤ k ).
Since QRDA decreases quotas and, at stage k, ⌊n∕m⌋ ≤ q c ≤ ⌈n∕m⌉ for any c ∈ C , school quotas are always at least ⌊n∕m⌋ while running QRDA. ◻ QRDA's strategyproofness is not trivial at all. Since schools' quotas are decreasing, a student might have an incentive to terminate the mechanism early to secure the seat in a school, which might not be available in later stages.
Moreover, when considering more general constraints (non M-convex), iterative DA mechanisms do not automatically inherit DA's strategyproofness, even with a balanced quota reduction sequence. For illustration, consider an iterative DA mechanism in Example 2, where initial quotas are equal to the largest number of students in a school in any feasible matching and the quota reduction sequence is balanced. The initial maximum quotas are q 1 C = (3, 3, 3) . In stage 1, all students are assigned to their favorite school, and the matching is not feasible. The mechanism proceeds by reducing by one the quota of schools c 1 and c 2 in stage 2 and 3 respectively, and the matching remains the same. In stage 4, the quota of school c 3 is decreased by one. Student s 6 is rejected and then applies to c 1 which also rejects her. Hence, s 6 is assigned to c 2 , and the matching becomes feasible. However, if s 6 misreports her preference with ≻ ′ s 6 such that c 1 is her favorite school, s 6 is assigned to c 1 at stage 1 and the matching is feasible. Thus, s 6 can successfully manipulate the mechanism.
To show that no student can manipulate in QRDA under ratio constraints, we utilize several properties. Recall that school c is strictly maximum if any other school has strictly less students than c, and strictly minimum if any other school has strictly more students than c.
Lemma 2 Assume in stage k of QRDA that obtained matching Ẋ k is not feasible, and school c ′ is strictly maximum, i.e., for all c In stage k + 1 , if the number of students assigned to c ′ is decreased (due to the reduction of q c ′ ) to t, and the number of students assigned to another school c ′′ is increased, i.e., |Ẋ k+1 c �� | = |Ẋ k c �� | + 1 , then one of the following two cases must be true: c �� | ≤ t holds, and for each school c, the number of assigned students is at most t.
Proof If the number of students assigned to c ′′ in stage k is t, then the first condition of case (a) holds. Furthermore, for each school holds. Thus, c ′′ is strictly maximum. If the number of students assigned to c ′′ in stage k is strictly smaller than t, then the first condition of case When analyzing the effect of manipulations of student s in stage k, it is convenient to assume in stage k (and thereafter) that a matching is obtained as follows. First, all students except s are provisionally matched to schools by DA with respect to q k C . Continue the DA procedure by adding s to the current provisional matching. The matching obtained in this way is identical to the matching obtained by applying DA when all the students enter the market simultaneously [11]. If the matching satisfies the ratio constraints, QRDA terminates. Otherwise, the quota of school c = (k) is reduced and the mechanism proceeds to stage k + 1 . In the current provisional matching, if school c accepts q k c students, the least preferred student s ′ is rejected. Then s ′ applies to the next school, and so on. Otherwise, the quota of school c = (k + 1) is reduced, and the mechanism proceeds to stage k + 2 , and so forth.
In the above procedure, when s enters the market, she first applies to some school c. If c accepts all the students applying to it, then the current stage terminates. Otherwise, c rejects one student, s ′ ( s ′ can be s or another student), who applies to the next school, and so on. We call such a sequence of applications and rejections a rejection chain. More formally, let C s = (c, c � , … , c �� ) be a partial order over S, denoting the order in which student s is going to apply, i.e., s applies first to c; if rejected, she applies to c ′ , and so on. C s is called a scenario, and does not need to be exhaustive. Assume s enters the market with scenario C s . Define R(C s ) as the rejection chain of C s . It starts when s applies to the first school in C s and describes the sequence of applications and rejections until s is rejected by the last school in C s , or the mechanism terminates. Table 1 shows an example of a rejection chain.
Another useful lemma to prove QRDA's strategyproofness is the Scenario Lemma. This lemma is inspired by the original Scenario Lemma [11], which is only proved for the standard DA and does not trivially extend to QRDA. Lemma 3 (Scenario Lemma) Consider two scenarios, C s and C ′ s , of student s starting from the same stage of QRDA. If (1) each school that appears in C ′ s also appears in C s (the order of appearance is irrelevant), (2) student s applies to all the schools in C s , and (3) all the actions of R(C � s ) happen in the same stage, then all the actions in R(C � s ) also happen in R(C s ).

Proof
The first action in R(C � s ) is "student s applies to school c," where c is the first school that appears in C ′ s . Since c also appears in C s , and s applies to all the schools in C s , R(C s ) also includes this action. For an inductive step, assume the first i − 1 actions in R(C � s ) also happen in R(C s ) , and consider the i-th action of R(C � s ) . The i-th action in R(C � s ) must be either (i) "student s ′ applies to school c ′ " or (ii) "school c ′ rejects student s ′ ." In case (i) with s � = s , since school c ′ must appear in C s and s applies to all the schools in C s , R(C s ) also includes this action. In case (i) with s ′ ≠ s , there must be a previous action, "school c ′′ rejects student s ′ ," in R(C � s ) . From the inductive assumption, this action also happens in R(C s ) . Thus, the action "student s ′ applies to school c ′ " also happens in R(C s ).
In case (ii), let S ′ c ′ be the set of students who applied to c ′ before the i-th action in R(C � s ) , and let S c ′ be the set of all the students applying to c ′ until all actions in R(C s ) are executed. Here, S ′ c ′ ⊆ S c ′ holds since every application before the i-th action in R(C � s ) also appears in R(C s ) . Since in the i-th action of R(C � s ) , s ′ is rejected by school c ′ , she is not among c ′ 's favorite q k c ′ students in set S ′ c ′ . Since the quotas of schools are non-increasing as QRDA continues, in some stage k ′ ( ≥ k ), student s ′ must not be among the favorite q k ′ c ′ students in S c ′ . Thus, the action "school c ′ rejects student s ′ " eventually occurs in R(C s ) . ◻ Now we are ready to prove our main theorem.

Theorem 4 QRDA is strategyproof.
Proof Assume student s is assigned to a better school when she misreports. Without loss of generality, we assume her true preference is c 1 ≻ s c 2 ≻ s ⋯ ≻ s c m , and s is assigned to school c j in stage k when misreporting while assigned to c i in stage k ′ under her true preference, where c j ≻ s c i . First, we show that if k ′ ≤ k , student s cannot benefit from misreporting. The standard DA satisfies a property called resource monotonicity, i.e., DA's outcome is weakly less preferred by each student if the quotas decrease [12]. It implies that when student s truthfully report her preference in both stages k and k ′ , her assignment is (weakly) worse in k than in k ′ . Furthermore, it is known that DA is strategyproof [11,38]. Hence, in stage k, student s's assignment is worse when she misreports than when she truthfully reports. Therefore, s's assignment is (weakly) worse when she misreports in k than when she truthfully reports in k ′ , and thus, s cannot benefit from misreporting if k ′ ≤ k . Hence, in the following, k < k ′ holds.
Let C s be (c 1 , c 2 , … , c i−1 ) , which is based on the true preference of s and truncated before c i . Then the last action in R(C s ) must be "school c i−1 rejects student s." On the other hand, let C ′ s be a sequence of schools to which s applies when s misreports, in which the last school is c j . For C ′ s , the following two cases are possible: (i) c j is the least preferred school for s within C ′ s based on her true preference ≻ s or (ii) C ′ s contains at least one school that is less desired than c j based on ≻ s .
In case (i), each school c that appears in C ′ s also appears in C s . Thus, we can apply Lemma 3. Let Ẋ denote the set of contracts obtained by assigning all students except s by DA with respect to q k C . Assume that when s enters the market with C s , she is assigned to school c ′ ( ≠ c j ) and infeasible matching Ẋ k is obtained. When s enters the market with C ′ s , she is assigned to c j and feasible matching Ẍ k is obtained. From these facts, at least one of the following four cases (which are not necessarily mutually exclusive) must be true: (1) c j is strictly minimum in Ẋ , i.e., |Ẋ c j | < |Ẋ c | holds for each c ( ≠ c j ).
(2) |Ẋ c j | = q k c j and a student is rejected when student s applies to school c j in scenario C ′ s . Then student s ′ ( ≠ s ) is eventually assigned to c ′′ ( ≠ c j ), such that c ′′ is strictly minimum in Ẋ .
c � and a student is rejected when s applies to school c ′ in scenario C s . Then student s ′′ ( ≠ s ) is eventually assigned to c ( ≠ c ′ ), such that c is strictly maximum in For case (1), the last action in R(C � s ) must be "student s applies to school c j ," which also appears in R(C s ) . Assume this action occurs in stage k ′′ ( ≤ k ′ ).
Since c j is strictly minimum in Ẋ , we obtain �Ẋ c j � < ⌊n∕m⌋ for the following reason. Let u denote |Ẋ c j | . Then for each school c ( ≠ c j ), |Ẋ c | ≥ u + 1 holds. Since the total number of students in Ẋ is n − 1 , and there are m − 1 schools except c j , we obtain (u + 1)(m − 1) + u ≤ n − 1 . By transforming this formula, we obtain u ≤ n∕m − 1 . Since n∕m − 1 < ⌊n∕m⌋ holds, we obtain u < ⌊n∕m⌋.
From Lemma 1, since the maximum quota of each school is at least ⌊n∕m⌋ , c j can accept another student. As the mechanism continues, the quotas are decreased according to the sequence , based on the round-robin order c 1 , c 2 , … , c m . It implies that the number of students assigned to the most popular school in each stage never increases. Thus, when c j accepts another student, the obtained matching is feasible, and the mechanism terminates. Therefore, in stage k ′′ , the mechanism terminates when s applies to c j . However, this contradicts our assumption that the last action in R(C s ) is "student s is rejected by school c i−1 ." For case (2), we can use a similar argument as case (1) and show that the mechanism terminates with a feasible matching in R(C s ) , which contradicts our assumption.
In the rest of this proof, we assume cases (1) and (2) do not occur. For case (3), let t denote |Ẋ c ′ | . Since Ẋ k is not feasible and Ẍ k is feasible, if the number of students of the most popular school becomes t + 1 , then the matching becomes infeasible. If the number of students of that school is at most t, then the matching becomes feasible. Assume the last action in R(C � s ) is "student s ′ applies to school c ," such that |Ẍ k c | = |Ẋ c | + 1 holds. Since Ẍ k is feasible, |Ẍ k c | = |Ẋ c | + 1 ≤ t must hold. According to Lemma 3, action "student s ′ applies to school c " also appears in R(C s ) . Assume this action happens in stage k ′′ ( ≤ k ′ ).
Then from Lemma 2, case (a) continues to hold until stage k ′′ in R(C s ) . Otherwise, case (b) holds and the number of assigned students for each school becomes at most t. Then the matching becomes feasible, and the mechanism terminates. Thus, the number of assigned students of c remains |Ẋ c | < t . At stage k ′′ in R(C s ) , case (b) must hold. Recall that quotas are decreased according to . Then, the quota of c must be at least t, since before stage k ′′ , there exists a school with t + 1 students. Thus, when s ′ applies to school c , an available seat exists in c , and s ′ will be accepted. Furthermore, every school accepts at most t students. Thus, the obtained matching is feasible, and the mechanism terminates. This contradicts the assumption that the last action in R(C s ) is "school c i−1 rejects student s." For case (4), we can use a similar argument as case (3) and show that the mechanism terminates with a feasible matching in R(C s ) , which contradicts our assumption. Furthermore, for case (ii), we can create a new scenario C ′′ s by removing all the schools that are less desired than c j based on ≻ s from C ′ s . Then if s is assigned to c j in R(C �� s ) , we obtain the same contradiction as case (i) by comparing R(C �� s ) and R(C s ) . Thus, action "school c j rejects student s" must appear in R(C �� s ) . Then by Lemma 3, this action also appears in R(C � s ) , but this is also a contradiction. ◻ QRDA's strategyproofness heavily relies on the fact that is balanced. Indeed, if is not balanced, QRDA is not strategyproof as Example 3 demonstrates. QRDA sets q 1 C = (5, 5, 5) , which satisfies Eq. (1). In stage 1, each student is assigned to her favorite school but this matching is not feasible. Then, in each of the two following stages, the quota of c 2 is decreased by one but the matching remains the same. In stage 4, the quota of c 1 is decreased by one and s 5 is rejected. Next, she applies to c 2 , which also rejects her, and she is finally assigned to c 3 . The corresponding matching is feasible: However, if student s 5 misreports with preference ≻ ′ s 5 such that c 2 is her favorite school, QRDA stops with a feasible matching at stage 1: Student s 5 manipulated the mechanism to get a better result (s 5 , c 2 ).
Furthermore, if is not balanced, the matching obtained by QRDA could not be feasible since we assume that all students must be assigned somewhere.
A question that naturally arises is whether a group of students can manipulate QRDA. It is known that DA is not group strategyproof in the strong sense, and thus it extends to QRDA. However, DA is weakly group strategyproof [6], and thus a legitimate question is whether QRDA inherits this property. To show that QRDA is weakly group strategyproof, we first show that QRDA satisfies weak non-bossiness and weak Maskin monotonicity. Notice first that DA is both weakly non-bossy 4 [6] and weakly Maskin monotone [29]. We first show that QRDA is weakly non-bossy.

Lemma 4 QRDA is weakly non-bossy.
Proof For a profile ≻ S , we write (≻ S ) the matching returned by QRDA on profile ≻ S , and k (≻ S ) the (maybe not feasible) matching returned by QRDA on ≻ S at some stage k. By contradiction assume profile ≻ S , student s and preference ≻ ′ s which is an upper-contour-set preserving transformation of ≻ s at s (≻ S ) exist such that s (≻ � s , ≻ S⧵{s} ) = s (≻ S ) , but student s ′ exists such that s � (≻ � s , ≻ S⧵{s} ) ≠ s � (≻ S ) . Assume also that QRDA terminates at stage k with ≻ S , and at stage k ′ with ≻ � S = (≻ � s , ≻ S⧵{s} ) . Then we consider three cases: k � = k QRDA finishes at the same stage with ≻ S or ≻ ′ S , but then it contradicts the fact that DA is weakly non-bossy. k ′ < k QRDA finishes earlier with ≻ ′ S . By strategyproofness of QRDA, it holds , then preference ≻ s is a manipulation for student s when assuming that ≻ ′ s is sincere; hence k s (≻ S ) = k � s (≻ � S ) . Thus ≻ ′ s is also an upper-contour-set preserving transformation of ≻ s at k � s (≻ � S ) , and equivalently, ≻ s is an upper-contour-set preserving transformation of ≻ ′ s at k � s (≻ � S ) . With a similar argument as above, at stage k ′ , by strategyproofness of DA, it holds k � s (≻ � S ) = k � s (≻ S ) . Thus, because DA is weakly non-bossy and k � s (≻ � S ) = k � s (≻ S ) , it holds that k � (≻ � S ) = k � (≻ S ) . Thus k � (≻ S ) is feasible at stage k ′ , and QRDA should terminate at stage k ′ on profile ≻ S , which is a contradiction. k ′ > k QRDA finishes later with ≻ ′ S . First, at stage k, by strategyproofness of DA, it holds , then preference ≻ s is a manipulation for student s when assuming that ≻ ′ s is sincere; because DA is weakly nonbossy and k s (≻ � S ) = k s (≻ S ) . Thus k (≻ � S ) is feasible at stage k, and QRDA should terminates at stage k on profile ≻ ′ S , which is a contradiction.
◻ Before showing that QRDA is weakly Maskin monotone, we prove the following property concerning DA when the preferences are monotonically transformed. Given a profile ≻ S , let D (≻ S ) denote the matching returned by DA on ≻ S , and then D s (≻ S ) denote the assignment of a specific student s.

Lemma 5 For any preference profiles ≻ S and ≻
, the number of students in each school is the same in D (≻ S ) and D (≻ � S ).
Proof We prove this claim in the case when only one student transforms her preference. By recursion, the argument adapts to the general case. Consider preference profiles ≻ S and ≻ � S = (≻ � s , ≻ S⧵{s} ) such that ≻ ′ s is a monotonic transformation of ≻ s at D s (≻ S ) . Now consider two scenarios when student s is added last in the market, scenario C s with preference ≻ S and scenario C ′ s with preference ≻ ′ S . Since ≻ ′ s is a monotonic transformation of ≻ s at D s (≻ S ) , we can apply the Scenario lemma for DA [11], and thus all actions that happen with C ′ s also happen with C s . In particular, consider school c ′ which is the last school that finally gains one student when s is added in the market. Then, in scenario C s , the action "school c ′ accepts an additional student" also happens and then DA terminates after this action. It implies that the number of students in each school is the same in both scenarios. ◻

Lemma 6 QRDA is weakly Maskin monotone.
Proof For a profile ≻ S , we write (≻ S ) for the matching returned by QRDA on profile ≻ S , and k (≻ S ) the (maybe not feasible) matching returned by QRDA on ≻ S at some stage k. By contradiction assume profile ≻ S and profile ≻ ′ S which is a monotonic transformation of ≻ S at (≻ S ) exist such that s (≻ S ) ≻ � s s (≻ � S ) for some student s. Assume also that QRDA terminates at stage k with ≻ S , and at stage k ′ with ≻ ′ S . Then we consider three cases: k � = k QRDA finishes at the same stage with ≻ S or ≻ ′ S , but then it contradicts the fact that DA is weakly Maskin monotone.
Recall that ≻ ′ S is a monotonic transformation of ≻ S at (≻ S ) . Then, with Lemma 5 at stage k, it holds that the number of students in each school is the same in matching k (≻ S ) and k (≻ � S ) , which implies that the ratio is the same in both matching. It contradicts the fact QRDA finishes at stage k ′ ( > k ) on profile ≻ ′ S . ◻ Now we prove that QRDA is weakly group strategyproof by using Barberà et al. [6]'s result. In addition to weak non-bossiness, weak Maskin monotonicity, and strategyproofness, this result requires an additional constraint on the richness of the preference domain. Intuitively, a preference domain is said to be rich if for any two admissible preferences, an admissible preference that is "between" these two preferences exists, i.e., a preference exists that combines the two preferences' properties in a specific way. Since we only require each preference to be a strict and complete order over C, this richness condition is trivially satisfied.

Theorem 5 QRDA is weakly group strategyproof.
Proof Barberà et al. [6] show that a mechanism that is based on a rich domain, strategyproof, weakly Maskin monotone, and weakly non-bossy is also weakly group strategyproof. 5 As the authors mentioned, this result applies to the many-to-one matching model. Moreover, their model can take any feasibility constraints into account, and hence, the ratio constraints as well. ◻ Concerning efficiency, it is known that DA is not strongly Pareto optimal and this result extends to QRDA. Indeed, recall that, in Example 1, QRDA returns the following matching:

Page 17 of 29 23
This matching is weakly dominated by the matching: Hence, QRDA is not strongly Pareto optimal. However, QRDA inherits weak Pareto optimality from DA.

Theorem 6 QRDA is weakly Pareto optimal.
Proof Let Ẍ denote a matching obtained by QRDA. We assume to the contrary that a matching Ẋ exists such that Ẋ s ≻ sẌs for all s ∈ S. First we consider that = 0 . All students are accepted to their first choice in Ẍ and no matching can strongly dominate Ẍ .
The other case is that ≠ 0 ( 0 < ≤ 1 ), i.e., |Ẋ c | ≥ 1 and |Ẍ c | ≥ 1 for all c ∈ C . As every student must be allocated to a school, the last action of QRDA must be "student s ′ applies to school c ′ " (no student is rejected after this action). Here QRDA terminates and returns the matching Ẍ . This implies that the number of provisionally accepted students in school c ′ is less than its artificial maximum quota while running QRDA, i.e., no student is rejected by c ′ in QRDA. Let S ′ be the set of students assigned to c ′ in Ẋ and it is true that |S ′ | > 0 since |Ẋ c | ≥ 1 . As mentioned in our assumption, Ẋ s ≻ sẌs also holds for each student s in S ′ , that is, all students in S ′ prefer school c ′ over their assignments in matching Ẍ . In QRDA, however, the students in S ′ must apply to school c ′ before applying to their assigned schools, which implies that all students in S ′ are rejected by school c ′ in QRDA. This is a contradiction because school c ′ rejects no student in QRDA. Hence, no matching strongly dominates Ẍ . ◻ An important property of DA is that no strategyproof mechanism exists that dominates DA [1]. However, this result has only been proved in the general two-sided matching framework, where unacceptable students/schools are allowed. Since it is a negative result, it does not trivially extend to our setting. 6 We show that this property holds for DA even when all students/schools are acceptable and all students have to be matched. First we prove the following property concerning the matchings that weakly dominate the matching returned by DA.

Lemma 7
Let Ẋ be a matching that weakly dominates the matching returned by DA which we denote Ẍ , and let S � = {s ∈ S |Ẋ s ≻ sẌs } . Then a permutation of S ′ exists such that for all s ∈ S � , Ẋ s =Ẍ (s) .
Proof Consider preference profile ≻ S , matching Ẋ that weakly dominates matching Ẍ which is returned by DA on ≻ S , and S � = {s ∈ S |Ẋ s ≻ sẌs } . Assume that no permutation of S ′ exists such that for all s ∈ S � , Ẋ s =Ẍ (s) . It implies that a school exists, denoted by c � ∈ C , that gains one (or more) student from Ẍ to Ẋ , and let s ⋆ denote such a student. Therefore, the matching Ẍ ⧵Ẍ s ⋆ ∪ {(s ⋆ , c � )} is feasible, which means that s ⋆ claims an empty seat in c ′ in matching Ẍ . Thus Ẍ is not stable, which contradicts the fact that DA returns a stable matching. ◻ Informally, this property means that students can only improve from the matching returned by DA by trading schools in cycles among them. Given a permutation of a set of student S ′ ⊆ S , we denote by trading cycle any of the disjoint cycles that compose , in the fashion of the Top Trading Cycle mechanism [40]. Now we can show the desired property for DA.
s ∈ S , Ẋ s ⪰ sẌs and for some s ∈ S , Ẋ s ≻ sẌs . Assume that QRDA terminates at stage k and consider student s ⋆ ∈ S such that Ẋ s ⋆ ≻ s ⋆Ẍ s ⋆ . Let c ⋆ denote the school to which s ⋆ is assigned in Ẍ . Since Ẍ is returned by DA at stage k, Lemma 7 implies that s ⋆ belongs to some trading cycle from matching Ẍ to Ẋ . We denote c the last school which accepts a student at stage k of QRDA . During stage k, c rejects no students and then Ẍ s ⪰ s c holds for all s ∈ S . It implies that s ⋆ is not assigned to c in Ẍ , otherwise s ⋆ cannot participate in any trading cycle since no student is willing to join c , and thus Ẍ s ⋆ ≻ s ⋆ c . Now consider the preference ≻ ′ s ⋆ which is similar to ≻ s ⋆ with the only difference that the positions of schools c ⋆ and c are exchanged. We denote Ẍ ′ (resp Ẋ ′ ) the matching returned by QRDA (resp. ) under profile ≻ � S = (≻ � s ⋆ , ≻ S⧵{s ⋆ } ) . Notice that profile under ≻ ′ S , QRDA may terminate at a stage different from stage k. However, we first focus on stage k. At stage k, consider the alternative DA when s ⋆ is added to the market after all other students with preference ≻ s ⋆ , and then matching Ẍ is returned, or with preference ≻ ′ s ⋆ , and then some matching denoted by X ′ is returned, which may be different from Ẍ ′ . In both cases, before adding s ⋆ , school c has an available seat. Then, when s ⋆ is added with preference ≻ ′ s ⋆ , the process of DA is the same as when s ⋆ is added with preference ≻ s ⋆ , until s ⋆ applies to c (instead of c ⋆ ) and is accepted. When s ⋆ is accepted in c under preference ≻ ′ s ⋆ , DA terminates with matching X ′ , but when s ⋆ is accepted in c ⋆ under preference ≻ s ⋆ , it occurs a rejection chain which ends when school c accepts a student. It implies that (a) for all s ∈ S ⧵ {s ⋆ } , X � s ⪰ sẌs holds; and (b) matching X ′ and Ẍ have the same number of students in each school, and thus under profile ≻ ′ S , QRDA terminates at stage k or earlier. Resource monotonicity of DA implies that for all s ∈ S , Ẍ � s ⪰ sXs . In particular Ẍ � s ⋆ ⪰ s ⋆X s ⋆ and with strategyproofness of QRDA , student s ⋆ is also assigned to c by QRDA under profile ≻ ′ S . Moreover, resource monotonicity and relation (a) imply that for all s ∈ S ⧵ {s ⋆ } , Ẍ � s ⪰ sẌs , and in particular, Ẍ � s ⪰ s c . Thus, under profile ≻ ′ S , s ⋆ cannot participate in any trading cycles since no student is willing to join c , and thus s ⋆ is assigned to c also in Ẋ ′ . Thus, when s ⋆ 's true preference is ≻ ′ s ⋆ , s ⋆ can misreport with ≻ s ⋆ and improve her school, from c to c ⋆ , which contradicts the fact that is strategyproof. ◻ Finally, we examine the time complexity of QRDA. We assume an alternative DA's execution in each stage used in the proof of Theorem 4: for stage k, instead of running DA from scratch, we start from the matching obtained in stage k − 1 , and continue the execution when a student is rejected.

Theorem 8 The time complexity of QRDA is O(mn).
Proof QRDA repeatedly applies the standard DA. Since a student is rejected by each school at most once, each step in DA is executed at most mn times in total. Additionally, school-feasibility can be checked in constant time. Thus, the time complexity of QRDA is O(mn). ◻

Comparison with baseline mechanism
To the best of our knowledge, no mechanism exists that is fair, strategyproof, and can handle ratio constraints. One way to handle ratio constraints is to use an indirect approach, i.e., to transform ratio constraints into other types of constraints by sacrificing flexibility to some extent. In this subsection, we present an indirect approach in which ratio constraints are transformed into standard maximum quotas, i.e., artificial maximum quotas are defined such that the obtained matching by the standard DA is guaranteed to satisfy the ratio constraints. Such a mechanism is called artificial cap deferred acceptance (ACDA). ACDA is used in Japanese medical resident matching programs [25] to handle regional maximum quotas as well as a baseline mechanism in many works related to distributional constraints [15,17,18]. Without loss of generality, assume q c 1 ≤ q c 2 ≤ ⋯ ≤ q c m holds. The following lemma holds:

Lemma 9
The matching obtained by the standard DA satisfies the ratio constraints if q C satisfies the following condition: Proof Assume matching Ẍ is obtained in the following method. We first assign q c m students to c m , q c m−1 students to c m−1 , and so on. Finally, n − ∑ m i=2 q c i students are assigned to c 1 (or no student is assigned to c 1 if n − ∑ m i=2 q c i is negative). Then for any matching Ẋ that is school-feasible in a standard market with quotas q C , r(Ẋ) ≥ r(Ẍ) holds. From Eq. (2), r(Ẍ) ≥ holds. Thus, r(Ẋ) ≥ holds. ◻ If we knew beforehand which schools are popular/unpopular, we might be able to find q C that satisfies Eq. (2) to maximize the student welfare. Otherwise, one simple and reasonable way for finding appropriate q C is using a quota reduction sequence, . Similarly to QRDA, ACDA is defined given a specific sequence , denoted by ACDA . When not specified otherwise, we assume that is the round-robin order c 1 , c 2 , … , c m . Similarly, we denote by q k c the quota of school c at stage k of ACDA. ACDA is defined as follows:

Initialization:
For all c ∈ C , q 1 c ← q max , k ← 1. Stage k ( ≥ 1): Step 1 If q k C satisfies Eq. (2), then run the standard DA in market (S, C, ≻ S , ≻ C , q k C ) and return the obtained matching.

Theorem 9 ACDA is strategyproof and returns a feasible and fair matching.
Proof ACDA terminates when Eq. (2) holds. Assume ACDA continues to reduce the maximum quotas since Eq. (2) does not hold. Similarly to the Proof of Theorem 3, eventually, there will be stage k such that the following conditions hold: ∑ c∈C q k c = n and for all c ∈ C , ⌊n∕m⌋ ≤ q c ≤ ⌈n∕m⌉ . In this case, n − ∑ m i=2 q c i = ⌊n∕m⌋ , and q c m = ⌈n∕m⌉ . Thus, Eq. (2) holds. Then ACDA must terminate at stage k ′ ( ≤ k ) and the obtained matching satisfies the ratio constraints. The result is identical to the matching obtained by the standard DA for the market (S, C, ≻ S , ≻ C , q k � C ) . Since DA is fair [16], ACDA is also guaranteed to be fair.
Furthermore, since stage k where ACDA terminates is determined independently from ≻ S and the standard DA is strategyproof, ACDA is also strategyproof. ◻ Theorem 10 Given a balanced , all students weakly prefer the matching obtained by QRDA over that of ACDA .
Proof If ACDA terminates at stage k, the matching obtained by the standard DA for the market (S, C, ≻ S , ≻ C , q k C ) satisfies the ratio constraints. Since ACDA and QRDA use the same quota reduction sequence , QRDA also terminates if it reaches stage k. Thus, QRDA must terminate at stage k ′ ( ≤ k ), i.e., QRDA terminates until stage k at the latest. Since we have q k ′ c ≥ q k c for any c ∈ C and DA satisfies resource monotonicity, as described in the second paragraph of the Proof of Theorem 4, each student weakly prefers the matching obtained by QRDA over that of ACDA. ◻ Since QRDA always obtains a (weakly) better matching for students than ACDA, it is natural to assume that QRDA will be less wasteful than ACDA, i.e., more students claim empty seats in ACDA compared to QRDA. However, we cannot guarantee this property as Theorem 11 holds. For its proof, we use the following example: Proof Consider Example 4 and the sequence based on the round-robin order c 1 , c 2 , … , c m . QRDA sets q max = 2 , which satisfies Eq. (1). In stage 1, s 1 and s 4 are assigned to c 1 , s 2 and s 5 are assigned to c 2 , and s 3 is assigned to c 4 . Since no student is assigned to c 3 , this matching is not school-feasible. Thus, q c 1 is reduced by one. Then in stage 2, the obtained feasible matching is as follows: Here students s 4 and s 5 claims an empty seat in school c 1 . The number of students who claim empty seats in QRDA is two.
On the other hand, in ACDA , the maximum quotas of c 1 , c 2 , c 3 are set to one, and c 4 is set to two. The obtained matching is as follows: Here only student s 1 claims an empty seat (in school c 1 ). Other students, for example, s 3 , can no longer claim an empty seat since by moving her from c 2 , the obtained matching is not school-feasible. By permutation of the schools, the proof adapts to any other sequence . ◻ This result is slightly in favor of ACDA because claiming more seats leads to the wasteful matching and implies that QRDA has still room for improvement by mitigating students' claim, but it is counterbalanced by the fact that when ACDA returns a nonwasteful matching, QRDA returns the same matching, which is shown by Theorem 12.
Theorem 12 Given a balanced , when ACDA returns a nonwasteful matching, QRDA and ACDA return the same matching.
Proof In market (S, C, ≻ S , ≻ C , ) with sequence , assume that QRDA returns matching Ẍ and that ACDA returns matching Ẋ which differs from Ẍ . By contradiction assume also that Ẋ contains no claiming student. Given a matching X ′ , let X ′ min (resp. X ′ max ) denote the set of contracts of a school with a minimum (resp. maximum) number of students in X ′ .
Consider the procedure which starts with matching Ẍ and keeps on applying the stages of QRDA , i.e., reducing quotas and applying DA (even though Ẍ is feasible) until the quotas reach the same quotas as in ACDA and the procedure returns Ẋ . Notice that, since QRDA finishes at an earlier stage than ACDA , |Ẍ max | ≥ |Ẋ max | and |Ẍ min | ≤ |Ẋ min | hold, and moreover, in any matching returned during this procedure, each school has at least |Ẍ min | students, and at most |Ẍ max | students. During this procedure, since Ẋ differs from Ẍ , some rejection chains must occur, and consider the last rejection chain, denoted by r, that occurs. We prove that one student involved in the rejection chain r is a claiming student in Ẋ , by considering three cases: (i) |Ẍ max | > |Ẋ max | , (ii) |Ẍ min | < |Ẋ min | , and (iii) |Ẍ max | = |Ẋ max | and |Ẍ min | = |Ẋ min | .
(i) Consider the last rejection in rejection chain r, and consider s r , the student rejected from a school c r and accepted in a school c a in this last rejection. Since |Ẍ max | > |Ẋ max | , it holds |Ẋ c r | ≤ |Ẍ max | − 1 . Moreover, since school c a accepts an additional student, it holds |Ẋ c a | ≥ |Ẍ min | + 1 . Therefore, since Ẋ is feasible, the matching (Ẋ ⧵ {(s r , c a )}) ∪ {(s r , c r )} is also feasible. Thus s r claims a seat in school c r in matching Ẋ , which is a contradiction. (ii) Consider the first rejection in rejection chain r, and consider s r , the student rejected from a school c r and accepted in a school c a in this first rejection. Since |Ẍ min | < |Ẋ min | , it holds |Ẋ c a | ≥ |Ẍ min | + 1 . Moreover, since school c r rejection is due to its quota being reduced, it holds |Ẋ c r | ≤ |Ẍ max | − 1 . Therefore, since Ẋ is feasible, the matching (Ẋ ⧵ {(s r , c a )}) ∪ {(s r , c r )} is also feasible. Thus s r claims a seat in school c r in matching Ẋ , which is a contradiction. (iii) In this case, it could be that neither the first nor the last rejection in rejection chain r concerns a claiming student in Ẋ . Then we have a closer look to rejection chain r. Rejection chain r starts by a quota reduction of a school, denoted by c r , which rejects a student, s r , which is then assigned to a school, c a , in Ẋ . If school c a is not minimum in Ẋ , it holds |Ẋ c a | ≥ |Ẍ min | + 1 , and similarly to case (ii), s r claims a seat in school c r in Ẋ . Assume that c a is minimum in Ẋ . Since |Ẍ min | = |Ẋ min | , when school c a accepts student s r , c a also rejects another student, otherwise c a cannot be minimum in Ẋ . From school c a , rejection chain r continues and eventually ends when a school, c l , accepts an additional student (without rejecting one) and then |Ẋ c l | > |Ẍ min | = |Ẋ min | = |Ẋ c a | . Thus, excluding student s r , rejection chain r must include a student, s ′ , who is rejected from a school, c ′ (which may be c a ), and finally (maybe after several rejections) accepted to a school, c ′′ (which may be c l ), such that |Ẋ c ′ | < |Ẋ c ′′ | . Thus it holds that |Ẋ c � | ≤ |Ẋ max | − 1 , and that |Ẋ c �� | ≥ |Ẋ min | + 1 . Therefore, since Ẋ is feasible, the matching (Ẋ ⧵ {(s � , c �� )}) ∪ {(s � , c � )} is feasible and s ′ claims a seat in school c ′ in matching Ẋ .

Experimental evaluation
In terms of student welfare, Theorem 10 guarantees that students weakly prefer QRDA over ACDA. We perform computer simulations to quantitatively explore the differences between QRDA and existing mechanisms. On the other hand, Theorem 11 shows that we cannot guarantee that QRDA is always better than ACDA in terms of nonwastefulness. However, we expect that a situation like Example 4 is rather extreme and would not happen very often; QRDA outperforms ACDA on average. We also confirm this conjecture by computer simulation. Furthermore, we examine another indirect approach in which ratio constraints are transformed into individual minimum and maximum constraints. Here, each school c has its minimum quota p c as well as its maximum quota q c . At least p c and at most q c students have to be assigned to school c. Fragiadakis et al. [15] present a strategyproof and fair mechanism called Extended Seat Deferred Acceptance (ESDA) to handle these constraints. We examine how to transform ratio constraints into individual minimum and maximum quotas. Assume all schools have the same minimum and maximum quotas p and q . If p∕q ≥ holds, the ratio constraints are clearly satisfied. The next question is how to determine q and p appropriately. We use the following method: choose q and p = ⌈ ⋅q⌉ as the maximum values that satisfy n ≥q + (m − 1)p . In other words, we choose q to the largest value such that the ratio constraints are satisfied and enough students exist to satisfy minimum quotas p . By choosing a large maximum quota, we can allocate more students to popular schools. 7 We considered two markets, A and B, which have different sizes. Market A has n = 800 students and m = 20 schools and market B has n = 2000 students and m = 40 schools. Student preferences are generated with the Mallows model 8 [10,32,33,44]. In this model, a strict preference ≻ s of student s is drawn with probability Pr(≻ s ): Here ∈ ℝ denotes spread parameter, ≻ � s is a central preference (uniformly randomly chosen from all possible preferences in our experiment), and d(≻ s , ≻ � s ) represents the Kendall tau distance , which is the number of pairwise inversions between ≻ s and ≻ � s . When = 0 , .
Mallows model becomes identical to the uniform distribution (which is equivalent to the impartial culture in our setting) and, as increases, quickly converges to the constant distribution returning ≻ � s . In our simulations, we chose two realistic values for which are 0.1 and 0.3. The priority ranking of each school c is drawn uniformly at random. We created 100 problem instances for each parameter setting. We first compare QRDA and ACDA with Figs. 1, 2, and 3. In Fig. 1, we plot the ratio of students who strictly prefer QRDA over ACDA depending on . Due to Theorem 10, no student strictly prefers ACDA, and thus, the students who do not strictly prefer QRDA over ACDA are indifferent between them. In market A and B, when = 0.3 and = 0.1 , approximately 38% of the students strictly prefer QRDA's outcome. When = 0.7 and = 0.1 , approximately 8% of the students strictly prefer QRDA's outcome. Therefore, we expect that policymakers will prefer QRDA over ACDA since it is never worse than ACDA and a non-negligible amount of students strictly prefer QRDA. Notice also that, as becomes smaller, i.e., the set of school-feasible matchings expands, more students strictly prefer QRDA; indeed, there is more room for improvement in QRDA compared to ACDA. Finally, when = 0.3 , student preferences are more similar and the competition among them becomes more severe. In such a case, the improvement obtained by QRDA is smaller than when student preferences are more diverse (i.e., = 0.1).
To measure the difference of student welfare more quantitatively, we study the Borda score of students: when a student is assigned to her k-th favorite school, the corresponding Borda score is m − k + 1 . Figure 2 shows the difference between the average Borda score obtained by students in QRDA and in ACDA. For example, when = 0.3 and = 0.3 in market B, the average of difference is close to 1.0, which means that each student gets her next favorite school on average. This measure provides a further insight in market A. Recall that the ratio of students who strictly prefer QRDA is larger when the preferences are more diverse in Fig. 1. However, when = 0.3 , the difference of Borda scores is greater with more similar preferences ( = 0.3 ) than with diverse preferences ( = 0.1 ). This result implies that the students who strictly prefer with QRDA improve greatly when = 0.3.
Next, we show that QRDA is less wasteful than ACDA, by measuring the ratio of students who claim empty seats in both mechanisms, i.e., we compute (|S ACDA | − |S QRDA |)∕n , where S ACDA (resp. S QRDA ) is the set of students who claimed empty seats in ACDA (resp. . When this value is positive, more students claim empty seats in ACDA than in QRDA. We illustrate the results in Fig. 3. For all the instances that we generated, the number of claiming students in QRDA is weakly smaller than that of ACDA. Similarly to Figs. 1 and 2, as becomes smaller, i.e., the set of school-feasible matchings expands, the difference becomes larger; there is more possibility to improve the matching with QRDA, but the trend is less definite compared to Figs. 1 and 2.
We continue our experimental evaluation by comparing QRDA and ESDA, with Figs. 4, 5, and 6. Figure 4 presents the ratio of students who strictly prefer QRDA over ESDA depending on . We cannot theoretically guarantee that students always weakly prefer QRDA over ESDA. However, for all the instances that we generated, all students weakly prefer QRDA over ESDA. The trend is similar to Fig. 1. Actually, ESDA is worse than ACDA in terms of students welfare. Indeed, to satisfy minimum quotas, many students are assigned to less preferred schools. Figure 5 shows that the average of the differences of Borda scores between QRDA and ESDA. The results are comparable to Fig. 2. Moreover, similar preferences lead to greater differences in Borda scores than diverse preferences when = 0.3 but also 0.4 and 0.5.
In Figure 6, we plot the difference of the ratio of claiming students between QRDA and ESDA, similarly to Fig. 3. For all the instances that we generated, the number of claiming students in QRDA is weakly smaller than that of ESDA. The trend is variable but in a similar way as in Fig. 3.

Conclusion
This paper introduced ratio constraints, which explicitly specify the required balance among schools in two-sided matching. Since they do not belong to a known well-behaved class of constraints (i.e., M-convex sets), we cannot use a general mechanism based on DA. We developed a fair and strategyproof mechanism, called QRDA, which is based on DA. We showed that QRDA inherits additional axiomatic properties from DA, such as weak group strategyproofness, weak Pareto optimality, and weak non-bossiness. In terms of student welfare, we proved that QRDA theoretically outperforms ACDA. Moreover, we experimentally showed that QRDA outperforms ACDA and ESDA in terms of student welfare and nonwastefulness.  Fig. 6 Difference in the ratio of claiming students between QRDA and ESDA Future works will (i) complete the axiomatic study of QRDA under constraints represented by union of symmetric M-convex [46], and (ii) generalize our model such that schools are divided into different types (e.g., small/large schools) and different values are imposed for different combinations of types (e.g., within small/large schools, should be 0.9, and between small and large schools, should be 0.3).