LQ Dynamic Programming Problems