Rod-Cutting Problem