The Stable Marriage Problem: Structure and Algorithms