Allocating resources via price management systems: a dynamic programming-based approach