Like so many aspects of our lives these days, residency matching is determined by a computer algorithm. At a basic level, this algorithm tries to find matches between what students want (preferences) and what residency programs are looking for.