Implemented the Problem and ProblemAnnealing classes