On a reduction principle in dynamic programming