An indecisive student contemplates whether he should stay home ortake his final exam, which is being held 2 miles away. Starting at home, the student travels half the distance to the exam venue before changing his mind. The student turnsaround and travels half the distance between his current location and his home beforechanging his mind again.
This process of changing direction and traveling half the remaining distance continues until the student reaches a certaindestination.
The calculation seems to be studentscurrent position = (2-last position)/2 Which would alternate giving distance to school and to home.