# Puzzle - reordering people in a line

Eighty players numbered I through $80$ are standing in a row, one behind the other, in the increasing order of their numbers. The physical director of the players performed eight successive inspections of the players and in each of the respective inspections he sent the first $10$, $20$, $30$, $40$, $50$, $60$, $70$ and $80$ players, from the front of the row to the end of the row. Each time the players being sent back one after another. After these eight rounds of inspections what is the position of the player numbered $5$?

Every time I solve it I gets confused, but still is there any general solution to this problem

-
Take it mod(80) – clark Aug 17 '12 at 4:57
What to you mean by mod 80 – Arpit Bajpai Aug 17 '12 at 5:38
every 80 that are sent back to the end of the row it is the same line – clark Aug 17 '12 at 5:45

Let there are $n$ players.
And say $j$ players are sent at the back, so the position of the $i^\text{th}$ player will be $$k\equiv(i-j)\pmod n$$ Repeat it $p$ number of times we get
$$k_1\equiv (i_1-j_1) \pmod n$$ $$k_2\equiv (k_1-j_2) \pmod n$$ $$\vdots$$ $$k_p\equiv (k_{p-1}-j_{p}) \pmod n$$ Adding all of them and noticing the all the $k_i's$ will get cancelled except $k_p$.
We will get
$$k_{p} \equiv(i_1-\sum _{q=1}^p j_q ) \pmod n$$ In your case $i_1=5 , \sum j=360,p=8\text{ and }n=80$.So the answer will be $k_8\equiv-355\pmod {80}\equiv45$.

-

from logical point of view as i am seeing it and if i get your question right , it will be like

Original Position : 10 20 30 40 50 60 70 80

first iteration : 80 70 60 50 40 30 20 10

2nd iteration : 10 20 30 40 50 60 70 80

3rd iteration : 80 70 60 50 40 30 20 10

4th iteration : 10 20 30 40 50 60 70 80

5th iteration : 80 70 60 50 40 30 20 10

6th iteration : 10 20 30 40 50 60 70 80

7th iteration : 80 70 60 50 40 30 20 10

8th iteration : 10 20 30 40 50 60 70 80

so the last one is the same , the player position will be same.comment if this is correct

-

If I understand this correctly...

Sending one player to the back moves player $i$ to position $i - 1$ (wrapping around by adding $80$ as needed). The director does it $10 + ... + 80 = 360$ times, so this sends $5$ to position $5 - 360$, which wraps around to $5 - 360 + 5 * 80 = 5 + 40 = 45$.

-

The player who started at position 5 will end up at 45. Please keep in mind that I solved this mentally, so someone may want to check this. To solve it, just keep picturing the person looping around. He starts at #5, but then is moved in a group of 10 to the back. #10 is now at the back, so the original #5 is now 5 spots from the end, meaning he is #75. Continue this process for each inspection. (The last inspection does nothing.)

-