Discrete Optimization Problems in Popular Matchings and Scheduling