As per the book "Introduction to Algorithms" , to solve the rod cutting problem for a given length n, we basically iterate over all possible lengths of the first part , and calculate the optimal profit for the remaining part ( either through recursion or via stored values in array ). The profit for the first part is picked directly from the given profit array i.e. the length of the first part is taken to be as it is and not divided. Shouldn't we also consider the optimal cost for the first part ? Isn't the idea of making one part indivisble wrong ?