Describir: Algebraic dynamic programming