<p>I am unsure about matchings of many to many as I haven't seen much of that in the literature but for your extension of exclusivity you may want to look at matching with incomplete lists. This changes the definition of a blocking pair such that they must also find each other acceptable. You could use that to set an agent with only one other agent in its preference list, the result of this would have the agent be unmatched or matched with the agent it ranks. Maybe if many companies can be assigned to one project you could consider this an adaptation of Stable Roommates problem? Where the room is the project and the companies are the people that occupy it. If you want to look further into this I suggest you research:
Stable Matching with incomplete lists (SMI)
Stable Roommates (SR)
Stable roomates with incomplete lists (SRI)</p>
<p>Best of luck!</p>

CC BY-SA 4.0
2020-12-13T15:36:46.523Z
2020-12-13T15:36:46.523Z
SLev
<p>The Gale-Shapley algorithm is an established algorithm that finds an optimal one-to-one match between two groups, each individual of which has a preference for the individuals in the other group (the &quot;stable marriage market problem&quot;). The algorithm has been further extended for one-to-many matchings, often called the college admissions problem. In this example, applicants with preferences for certain colleges are optimally matched with colleges that have preferences over applicants and that also have a certain number of vacancies to fill that can be more than one.</p>
<p><strong>Are there further extensions to this algorithm to optimally match many-to-many relationships?</strong>. For illustration, I would like to match projects to sources of funds, where a project might receive funding from multiple sources; and a source of funding may be able to fund more than one project. To use the college admissions analogy, this would be the same as specifying a student to attend one or more colleges whilst a college may accept one or more students.</p>
<p>A further extension of this concept would be to encode inclusivities (e.g., fund A must always be used with fund B), exclusivities (e.g., if project A is funded then project B must not be funded), but these added complexities first need the many-to-many algorithm described above.</p>

CC BY-SA 4.0
2020-11-09T17:06:40.680Z
You should perhaps read through David Manlove's book "Algorithmics of Matching Under Preferences", see for instance https://www.optimalmatching.com/AMUP/ .
Gamow
CC BY-SA 4.0
2020-11-17T23:55:37.073Z
A search turns up "stable many-to-many matchings with contracts": https://www.hbs.edu/faculty/Publication%20Files/09-046_143665ed-6026-4b7d-867e-e4d650d8517b.pdf
usul
<ds.algorithms>
An extension to the student/college admissions Gale-Shapley algorithm
RDavey
# An extension to the student/college admissions Gale-Shapley algorithm

(Asked by: username_0 on 2020-11-09)

The Gale-Shapley algorithm is an established algorithm that finds an optimal one-to-one match between two groups, each individual of which has a preference for the individuals in the other group (the "stable marriage market problem"). The algorithm has been further extended for one-to-many matchings, often called the college admissions problem. In this example, applicants with preferences for certain colleges are optimally matched with colleges that have preferences over applicants and that also have a certain number of vacancies to fill that can be more than one.

**Are there further extensions to this algorithm to optimally match many-to-many relationships?**. For illustration, I would like to match projects to sources of funds, where a project might receive funding from multiple sources; and a source of funding may be able to fund more than one project. To use the college admissions analogy, this would be the same as specifying a student to attend one or more colleges whilst a college may accept one or more students.

A further extension of this concept would be to encode inclusivities (e.g., fund A must always be used with fund B), exclusivities (e.g., if project A is funded then project B must not be funded), but these added complexities first need the many-to-many algorithm described above.

**Tags:** ds.algorithms

> **Comments:**
> **username_1**: You should perhaps read through David Manlove's book "Algorithmics of Matching Under Preferences", see for instance https://www.optimalmatching.com/AMUP/ .  
> **username_2**: A search turns up "stable many-to-many matchings with contracts": https://www.hbs.edu/faculty/Publication%20Files/09-046_143665ed-6026-4b7d-867e-e4d650d8517b.pdf  

---

## 1 answers

### Answer by username_3 on 2020-12-13. Score: 1

I am unsure about matchings of many to many as I haven't seen much of that in the literature but for your extension of exclusivity you may want to look at matching with incomplete lists. This changes the definition of a blocking pair such that they must also find each other acceptable. You could use that to set an agent with only one other agent in its preference list, the result of this would have the agent be unmatched or matched with the agent it ranks. Maybe if many companies can be assigned to one project you could consider this an adaptation of Stable Roommates problem? Where the room is the project and the companies are the people that occupy it. If you want to look further into this I suggest you research:
Stable Matching with incomplete lists (SMI)
Stable Roommates (SR)
Stable roomates with incomplete lists (SRI)

Best of luck!


---

