DYNAMIC PROGRAMMING, GENERALIZED STATES, AND SWITCHING SYSTEMS