Algorithms for Weighted Matching Generalizations II: f-factors and the Special Case of Shortest Paths (SIAM journal on computing)