Matching MIR students with hospitals in Spain

Matching MIR students with hospitals

In this article I summarize the recently published paper by José Alcalde 1. In this article, the author discusses the current matching mechanism that is used in Spain to assign medical graduates who pass the MIR exam to residency positions. The system works as follows. Students are ranked according to their marks in the MIR exam, and public hospitals announce the positions available. Then, the best student chooses her preferred position, after that, the next student chooses among the reminding positions, and so on. If at some point there are no positions available for a given specialization, students may choose among the positions for that specialization in private hospitals that participate in the system, but not before that. Private hospitals are not as passive as public ones: like public hospitals, they cannot choose students, but unlike them they can veto some of them (this system to assign students to private hospitals will be called MIR with consent, MIRC). Alcalde studies this part of the system and finds it to be unstable. Then he proposes an alternative allocation mechanism for matching medical students to private hospitals that does not have this problem.

To understand the potential problem with the current system (MIRC), consider two (private) hospitals, 1 and 2, and three medical students, A, B and C, that are eligible to apply for residency in them. Students A and C prefer Hospital 1, and student B prefers Hospital 2. One their part, Hospital 1 ranks students according to the ordering (B, A, C), while Hospital 2 ranks them according to (A, B, C). Finally, Hospital 1 has two positions and Hospital 2 has just one. How should the students be assigned to the hospitals? There are only three possibilities: either of the three students goes to Hospital 2 and the rest go to Hospital 1.

If student A is assigned to Hospital 2, the system faces a stability problem, as both, student A and Hospital 2 can block the allocation: student A prefers Hospital 1 and Hospital 1 prefers having A rather than C. A similar thing occurs if student C is assigned to Hospital 2 (student B and Hospital 2 will block the assignment.) If, however, student B is assigned to Hospital 2, and the others to Hospital 1, there is no blocking by any agreement between a student and a hospital. This last assignment is stable.

Now, the question is: how can we design a system to obtain that assignment as a result of individual decisions made by everyone involved. The way the MIR is organized requires that the hospitals select which students can apply to them, and that students rank the hospitals they want to go. Recall that hospitals do not choose students, they just can veto some of them. Let us apply this mechanism to our case, and suppose that Hospital 1 vetoes student B and Hospital 2 vetoes students A and C. By doing this, and no matter how students rank hospitals in the order in which they choose, we will have the stable allocation. However, Hospital 2, which gets its second option (student B) according to this way of vetoing, is not playing its cards well.

If Hospital 2 vetoes no one it will never be worse off no matter what Hospital 1 does, as it will always be chosen by student B, and may even be chosen by student A if Hospital 1 vetoes him. The same happens if Hospital 2 vetoes only student C. So these two strategies are better than vetoing students A and C. Now, if Hospital 1 understands this, it will choose to veto student A: if it vetoes no-one, A will go to Hospital 1; B will go to Hospital 2, and C will go to Hospital 1; but if it vetoes student A, she will go to Hospital 2, and students B and C will go to Hospital 1, a better prospect for Hospital 1. This choice of vetoes is an equilibrium in the game played by the hospitals: no one has a better option given what the other does; but it is not a stable assignment of the whole game as we saw before.

After detecting this flaw In the MIRC system, Alcalde (2018) suggest a different mechanism, which he calls Dual MIRC, or DMIRC. It works like MIRC, but switching the roles of students and hospitals. In Alcalde’s words, it works like this:

The intuitive description of how the DMIRC mechanism operates is very simple. At the initial stage each student declares which hospitals (if any) are acceptable from her point of view. Then, hospital h1 selects a set of students among the ones declaring that h1 is acceptable. Students selected by h1 are enrolled to h1, and thus they are no longer available for the remaining hospitals. For the other hospitals the argument is similar, just taking into account that for a student to be achievable it is not only necessary that she declares that the hospital is acceptable for her, but also that the student has not already been assigned to another hospital.”

This mechanism may have a plethora of equilibria. However, Alcalde shows that if students choose their strategies keeping in mind that there may be some uncertainty in the order in which hospitals make their choice, then the set of equilibria is reduced. Once this requirement is taking into account, the main result of the article follows: any equilibrium of the CMIC mechanism is stable.

Why the mechanism works if the hospitals choose and the students veto, but not if it is the other way around? Notice that the symmetry (or duality) between the two systems is not complete, as hospitals are matched to many students, but students are matched to only one hospital. This is the key to the different performance of the mechanisms. In fact, in the introductory example, if each student vetoes their least preferred hospitals, hospitals have no choice but to choose the student for whom they are the most preferred hospital, and no one has a better strategy. The properties of the different mechanism are derived after the analysis of the agents’ behavior. One important feature is that neither hospitals nor students should play dominated strategies (i.e., strategies that are dominated by some other one, in the sense of always being better or, at least, not worse). Being matched only to a hospital, it is easy for a student to compare the performance of their strategies and rank them. This is not so for hospitals that are matched to a pre-specified number of students.

A last result highlights the importance of the hospitals’ quota in the design of an adequate mechanism. The author shows that when the quota is not binding, the first mechanism also produces stable matchings. Now the possibility of exceeding the quota means that it is easier for hospitals to accept a given set of students as a strategy that performs well under some uncertainty conditions on the order in which students choose.


  1. Alcalde, J. (2018) Beyond the Spanish MIR with consent: (Hidden) cooperation and coordination in matching. Games and Economic Behavior 110, 32–49. doi: 10.1016/j.geb.2018.03.007

Written by


Leave a Reply

Your email address will not be published. Required fields are marked *