State of variables in dynammic programming
Dynamic programming was
invented/discovered by Richard Bellman as an optimization technique.
The notion of state comes from Bellman's original presentation of
Dynamic Programming (DP) as an optimization technique. This is
presented for example in the Bellman equation entry of Wikipedia.

The technique was then extended to a variety of problems.

You might usefully read the Wikipedia presentation, I think. The
concepts you are interested in, including that of states and state variables, are described there. It may still be
some work to see how it fits the algorithm you have to explain.