The Josephus Problem in Both Directions
The Josephus Problem in Both Directions
The classical version of the Josephus problem counts off uneliminated people arranged in a circle and eliminates the person. The process continues until only one person is left.
n
th
k
In this variant of the Josephus problem, two people are to be eliminated at each stage, but the two processes of elimination go in opposite directions.
Suppose that there are people and every person is eliminated. The first process starts at the first person and eliminates the people at positions , , …. The second process starts with the person and eliminates the people at positions , , …. Suppose that the first process comes first and the second process second at each stage. Denote the position of the survivor by . The graph of the list is very interesting.
n
th
k
k
2k
th
n
n-k+1
n-2k+1
S(n)
{(n,S(n)),n=1,2,...}