http://thisthread.blogspot.com/2014/03/rod-cutting-by-dynamic-programming.html