Extensions of dynamic programming for combinatorial optimization and data mining. (2019)