RodCutting, LCS, and Knapsack problems