Reduction of the simplest case to maximum weight perfect matching and integral polyhedral optimization.