Seol mar théacs é seo: Extensions of Dynamic Programming for Combinatorial Optimization and Data Mining