An elementary introduction to dynamic programming : a state equation approach