The Josephus Problem

Introduction The Josephus Problem is a count-out game which is regarded as a theoretical problem in Computer Science or Mathematics. In this game, n people stand in a circle s is the starting number of people. s is holding a sword where s kills s+k-1’th people from his position and gives his sword to s+k’th people. Thus s+k becomes new s. Going in the same direction this procedure is repeated until one person is left. Remaining one person is marked as a winner. The gif below explains the procedure. Here n = 12, k = 3 & s = 1. ...

February 8, 2018 · 2 min · Adnatull Al Masum