Solving stable matching problems using answer set programming

Sofie De Clercq, Ghent University, Belgium
Steven Schockaert, Cardiff University, UK
Martine De Cock, Ghent University, Belgium
Ann Nowè, Vrije Universiteit Brussel, Belgium


Since the introduction of the stable marriage problem (SMP) by Gale and Shapley (1962), several variants and extensions have been investigated. While this variety is useful to widen the application potential, each variant requires a new algorithm for finding the stable matchings. To address this issue, we propose an encoding of the SMP using answer set programming (ASP), which can straightforwardly be adapted and extended to suit the needs of specific applications. The use of ASP also means that we can take advantage of highly efficient off-the-shelf solvers. To illustrate the flexibility of our approach, we show how our ASP encoding naturally allows us to select optimal stable matchings, i.e. matchings that are optimal according to some user-specified criterion. To the best of our knowledge, our encoding offers the first exact implementation to find sex-equal, minimum regret, egalitarian or maximum cardinality stable matchings for SMP instances in which individuals may designate unacceptable partners and ties between preferences are allowed.


Bibtex (Use it for references)

journal = {Theory and Practice of Logic Programming},
publisher = {Cambridge University Press},
author = {Sofie {De Clercq} and Steven Schockaert and Martine {De Cock} and Ann {Now\’e}},
title = {Solving stable matching problems using answer set programming },
volume = {16},
number = {3},
year = {2016},
pages = {247-268}