Easy | General |

100 pirates stand in a circle. They start shooting alternately in a cycle such that 1st pirate shoots 2nd, 3rd shoots 4th and so on. They continue in circle till only one pirate is left. Which position should Captain Jack Sparrow stand to survive?

Solution

This is not a puzzle at all, this is apti/maths question, but has become quite common. You can calculate for a N=100, 73rd position is safe. For a general N, find largest m such that 2^m < N. Take t = N-2^m. Then Safe position is 2*t + 1. Please learn this formula. No need to prove it using strong induction. Proof: http://en.wikipedia.org/wiki/Josephus_problem#k.3D2

Source: Written Tests

Enable Like and Comment Latest solved Puzzles

Color Switches Weird Sequences Intersecting Pillars Consecutive sums Scaling a Square Difficulty Level

© BRAINSTELLAR |