Code for exercises about the Josephus problem from Knuth's Art of Computer Programming, Volume 1.
Charles Reid 4b6cc7902b remove 13 hours ago
part2 remove 13 hours ago
tex removing old diagrams (now in part2) 14 hours ago
LICENSE add mit license 6 days ago
Readme.md add readme 6 days ago
josephus.py update values in driver 14 hours ago

Readme.md

Josephus Problem (Improved)

a.k.a., The Sushi Boat Problem

There are n plates of sushi on sushi boats. Each plate of sushi is labeled 1 to n and is arranged in a linked circle of sushi boats. The sushi boats move by in a small canal in front of you.

Beginning at plate 1, you count m plates of sushi, stopping at every mth plate to eat it. When you eat a plate of sushi, you remove the numbered plate from the boat.

In what order will the plates be stacked on our plate, starting with the top plate?