Rat In A Maze Problem