title: How to solve rod cutting p‌r‌o‌b‌l‌e‌m with limit on maximum no. of cuts allowed?
body: <p>I know how rod cutting problem is solved using dynamic programming.
  But when we have limit on maximum no of cuts that is allowed, dynamic programming fails to give correct answer.Even I couldn't think of a recursive solution for the problem. Help.   </p>
  
  <p>HERE IS THE PROBLEM,<br>
  Determine the maximum revenue obtainable by cutting up the rod and selling the pieces.<br>
  Given a rod of length N, and table of prices P(i) for the rod of length i.You can make no more than K cuts on the given rod.</p>
  
  <p>example:<br/>
  N=10<br>
  K=3<br/>
  | p(1) = 1 | p(2) = 5 | p(3) = 8 | p(4) = 9 |p(5) = 10| p(6) = 22 | p(7) = 17 | p(8) = 20 | p(9) = 24 | p(10) = 30 |</p>
  
  <p>maximum obtainable revenue is 31 by cutting the rod into 2 pieces (total no of cuts =1 which is less than K=3) of length 6 and 4.  </p>