1000 people stand in a circle. There is a sword in the hand of the 1st person, he kills the 2nd person and passes on the sword to the third,who kills the fourth and gives the sword to the 5th, this goes on until one person is left. At what number was that person standing at the start?
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.
This is a version of the Josephus Problem .
If 2 a is he largest possible power of 2 less than or equal to the number given, n ,
then l = n − 2 a
The person left is 2 l + 1 .
In this question,
n = 1 0 0 0
l = 1 0 0 0 − 2 9 = 1 0 0 0 − 5 1 2 = 4 8 8
⟹ 2 l + 1 = 2 × 4 8 8 + 1 = 9 7 6 + 1 = 9 7 7 .