Repository navigation
Structure: Utilities
Ben Whitehead edited this page Mar 9, 2026
·
2 revisions
This set of utilities produces valid instances of each problem class for larger-scale experiments. Here, we show the class diagram for SMT and SM but the others are analogous with the exception of SR which currently has no tied parallel SRT.
The basic structure is as follows:

This set of utilities takes in an instance and produces a list of all matchings that meets the problem's criteria for stability. For each problem class we have:
-
<problem acronym>GenericBruteForcer.py, which contains helpers for mutating a matching and saving ones that we find to be stable. It also contains abstract methods for agent's trial order, which we discuss more below, and_has_stability. -
<problem acronym>GenericEnumerator.py, which contains the process for recursively enumerating all stable matchings. It inherits from (1) but does not implement the above abstract methods. -
<problem acronym>Enumerator.py, one for the case with ties and one for the case without ties. These inherit from (2) and also the problem definition file<problem acronym>Abstract.py. It implements_has_stabilityby calling the definition of stability in the abstract file. It additionally defines the agent's trail order.
The trail order is a generator function that takes an agent, retrieves its preference list, and then unpacks it moving from best to worst.