Text this: A dynamic programming approach to network problems :