wants to swim across the river in the shortest time . Finally he will move in a direction