A little world with the population of 2018 is having a happy life, but that is not for long. Out of nowhere, the alien warriors flew on the sky and release malicious pollen that implant infectious poison that would suffer the victims and if the victim touches someone, he or she would immediately be killed. Everyone on the planet is affected by the pollen and is suffering so much that they would rather die than continue suffering.
An alien descends down from the flying object to meet the people of the world. He would give the cure to last people remaining alive after the game he proposed. He offers the game to the people and the people immediately accepted. So, he commanded the people to form a circle and randomly appointed a person. The person is called Number 1. The person next to him clockwise is called Number 2. Keep the pattern until everyone in the circle have their own number. Then, the alien commands Number 1 to touch the person on his immediate right, which immediately kills that person. After that, the person to the right of the dead person touches the nearest living person to the right. This game will keep progressing until there is only last one alive.
If you are among the population of this little world, which number you should be at to make sure that you will remain alive in this world?
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 adapted from the Josephus Problem, but the original problem, people will take turn killing in the opposite direction.
The problem is defined that if there are N people in the circle.
Let N = 2 a + l where a is the maximum possible. Then the ( 2 l + 1 ) t h person will be alive.
For N = 2 0 1 8 , N = 2 1 0 + 9 9 4 So, the 2 × 9 9 4 + 1 = 1 9 8 9 t h person will be alive.
But the killing is in the opposite order. So let's try to renumber the person. The 1 9 8 9 t h person in original problem would become 1 + N − ( 1 9 8 9 − 1 ) = 1 + 2 0 1 8 − 1 9 8 8 = 3 1 t h person, which is the answer.