Existence theorems of solutions for certain classes of functional equations arising in dynamic programming