Text this: 3D Dynamic Programming Approach to Functional Equations with Applications