math_problem_algorithm