CISE Department Prof. Tim Davis,
P.O. Box 116120
University of Florida
Gainesville, FL 32611-6120
phone (352) 392-1481, fax (352) 392-1220
email: my last name AT cise.ufl.edu

A student writes:

Dr Davis: Looking in their example of the Josephus Problem (figure 11.12), why, on the third iteration, do they suddenly start at 5?

My reply:

I have the answer, but it's a little tricky to say over email. I'll try... They don't restart, but always continue in a circle. So if you have 10 people (1 to 10), and pick every 3, you would pick

skip 1
skip 2
kill 3
skip 4
skip 5
kill 6
skip 7
skip 8
kill 9

at which point the list has [1 2 4 5 7 8 10] and continuing, wrapping around, you get:

skip 10
skip 1
kill 2
skip 4
skip 5
kill 7
skip 8
skip 10
kill 1

at which point the list has [4 5 8 10], continuing

skip 4
skip 5
kill 8
skip 10
skip 4
kill 5
skip 10
skip 4
kill 10

4 wins ... the last survivor.