solve reinforcement problem