100 people are sitting on a big round table such that (1,2),(2,3),...,(100,1) are next to each other. 1 has a gun with him. He shoots 2 and gives the gun to 3. 3 shoots 4 and passes gun to 5 (if 100 gets gun he will shoot the next living person). This continues till one person remains alive. Which person is alive?
Hint : Start with small number of person sitting on the table and solve that. You will get a pattern. Then solve this.
For part 2 Shooting Zone 2
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let "the champion" be the living person with the smallest index, and let a "turn" end when the gun crosses the 100-1 line. After every turn, the champion changes if and only if the number of survivors is odd; in that case its index increases by a power of two given by the turn number. This gives that if n people around a table play this kind of determistic russian roulette, the index of the last survivor is given by 2 ⋅ ( n − 2 ⌊ lo g 2 n ⌋ ) + 1 , that is a cyclic shift of the binary representation of n , where the leading 1 becomes the least significant bit.