I am trying to formulate the following dynamic programming model: Along the shortest route, I have gas stations and hotels. The tank capacity is U and I can drive for a maximum of 8 hours or (R). I am averaging a speed of 70 mph. Gas and hotel prices are different at each node. What is the minimum cost to travel from point a to b, considering the number of stops to be S. Where should I stop for gas and how much should I fill, also where should I stop for hotels? It has to be using dynamic programming backward or forward. I need objective function, recursion, argument, policy function, and boundary condition.