Here are the links on Parag Pathak's page, including the links to the original working paper which has some material absent from the published version.
Kojima, Fuhito, Parag A. Pathak, and Alvin E. Roth,
Matching with Couples: Stability and Incentives in Large Markets
(Appendix, Computer Programs, older version NBER 16028 with statement and proof of Thm 2)
Quarterly Journal of Economics, 2013, 128(4)
I blogged about it earlier here.
Here's the abstract:
Accommodating couples has been a long-standing issue in the design of centralized labor market clearinghouses for doctors and psychologists, because couples view pairs of jobs as complements. A stable matching may not exist when couples are present. This article’s main result is that a stable matching exists when there are relatively few couples and preference lists are sufﬁciently
short relative to market size. We also discuss incentives in markets with couples. We relate these theoretical results to the job market for psychologists, in which stable matchings exist for all years of the data, despite the presence of couples.