The Josephus problem
people numbered to stand in a circle. Going around the circle starting from person 1, every second person is removed (first person 2, then 4, and so on, continuing around the circle) until one person remains. Find a formula for the position of the survivor.
History and references
Solved by folklore.
The problem is named after the first-century historian Flavius Josephus, who wrote that he and one other man were the last two left when a group trapped in a cave chose to die one by one rather than surrender. After one trip around the circle all even positions are gone and the problem repeats with about half as many people, which gives and . Solving these, if with then . In binary this is a cyclic shift of the digits of one place to the left. For other step sizes there is a simple recurrence, and the step 2 case is treated in detail in Graham, Knuth and Patashnik's Concrete Mathematics.
References
Solutions 0
Sign in or create an account to publish a solution