The Baton Pass Problem: A computational approach via Python
The Baton Pass Problem: A computational approach via Python Problem: In a circular line of 100 people everyone has been attached to a unique number that starts from 1 and ends with 100. They are now standing side by side making a loop, i.e., now player no. 1 is between player no. 2 and player number 100. A baton must be given to a random player. The player who has the baton has the power to eliminate one player from the ring and pass the baton to the next active player. Active in the sense that the player is not eliminated. The elimination must be done in the following manner. In a group of five people suppose that no. 1 has the baton. No. 1 will eliminate No. 3 (the player second next to no. 1) and pass the baton to no. 2. Next no. 2 will eliminate no. 5 and pass the baton to no. 4. No. 4 then eliminate no. 2 and this gives our finalists 1 and 4. You can visualize it as: Trial 1 1 2 3 4 5 Trial 2 ...