The works are mostly based on Irving's paper An Efficient Algorithm for the “Stable Roommates” Problem (1985)