Pulsars
0 %
Log inSign up

Assignment: the Josephus problem

Forty-one rebels in a circle, eliminated three by three: where should you stand to survive? A take-home assignment leading from a Python simulation to an exact formula readable off the binary expansion.

Advanced 120 min 45 viewsmathsarithmétiquealgorithmiquePythonrécurrenceDM

Table of contents

  1. 01

    Part I — Computational treatment

  2. 02

    Part II — Base-2 expansion

  3. 03

    Part III — A recurrence relation for the case k = 2

  4. 04

    Part IV — More general recurrences