Examples Of Josephus Problem

Satisfactory Essays

The next base the essay will explore is base 3 also known as ternary, this is the base that was used in the original Josephus problem. By exploring this base and a few more bases, I will find a pattern and derive an equation to solve Josephus problem with any number of people in any number base.
Josephus problem in base 3 is when each person kills the person who sits two seats away from him and the following diagram will demonstrate how it happens, the numbers on the inside show the order of the people that are gone which will make it easier to follow.

Figure 7 An example of how Josephus problem works in base 3 with 12 people
I will now create the same table as I did for the problem in a binary form.
Table 3 Analyzing the Josephus problem in base 3 when 1≤n≤12
Number of people
Order in which people are gone
The winning number

3, …show more content…

Applying the equation to Josephus problem, to find we have to find as . We know how to solve as there are only 2 people and starts meaning he has to skip and therefore dies first and wins. Now we know that , we can see from the table above the answer is correct however we have to do it once more to find .
We can always consider position and we have to repeat the equation until getting to the required number. This solution can be very frustrating as you must do the same thing over and over, however it can be programmed very easily and save a lot of time.
This method is the third and the last method to solve the Josephus problem, it is the most useful method as it works for all bases however it is the most complicated one. In order to compare between this method and the other two methods, we first have to write the equation in base

Get Access