Josephus problem

174 Views Asked by At

I have started reading the book Concrete Mathematics and am going through the Josephus problem part. There, a note on the border says :

But there’s a simpler way! The key fact is that $J(2^m) = 1$ for all $m$, and this follows immediately from our first equation, $J(2n) = 2J(n)-1$. Hence we know that the first person will survive whenever $n$ is a power of $2$. And in the general case, when $n = 2^n+l$, the number of people is reduced to a power of $2$ after there have been $l$ executions. The first remaining person at this point, the survivor, is number $2l + 1$.

I understand that after $l$ executions we will be left with a power of $2$. But I cannot understand the obviousness of the fact that after $l$ executions, the first remaining person is numbered $2l+1$.

1

There are 1 best solutions below

0
On BEST ANSWER

The first $\ell$ people to be executed are numbers $2,4,6,\ldots,2\ell$ in the original circle. Once they’re gone, $2^m$ people are left, and the count starts with the next person after number $2\ell$, i.e., with number $2\ell+1$ in the original circle: that person is the first of the $2^m$ who remain.