The Josephus Problem: Exercises 3.9 and 3.10
- Exercise 3.9: Does not require the writing of any code, but you should do
it before proceeding to Exercise 3.10.
- For Exercise 3.10:
- Call your procedure renumber.
- Before writing it, study the 8-person version of the problem
depicted in Figure 3.3 on page 67. Make sure you understand how
all the positions are renumbered after a person is killed and
removed from the group.
- Test your renumber procedure thoroughly on all positions of
the 8-person version and convince yourself it is correct before
proceeding.