Using a Graph to Solve a Problem