Sunday, January 17, 2010

The problem with Josephus

Titus Flavius Josephus or Yosef ben Matityahu

was a jewish historian of the first century. He was a military leader in the first Jewish-Roman war where his troop was defeated by Roman forces. Read up if you want about his very interesting life

Josephus's problem:

A legend says that caught upon a cave with the Jewish army being persecuted by the Romans, they decided to commit mass suicide to avoid the humiliation of being defeated, enslaved or tortured (a la Masada). However, Josephus was not too keen on this self sacrifice and to refuse to participate would have surely meant betrayal to his friends. The story goes on to say that they were to form a circle and that every third person would be killed and taken out of the circle until there was one standing that would commit suicide. J's only way of surviving was to cleverly position himself in the position of the last man standing. This turns out NOT to be a trivial calculation for large groups.

of course this story is not mentioned until the middle ages so its authenticity is very dubious.

PLAY THE JOSEPHUS GAME

It is very complicated to solve this problem for 'N people' and 'every K skips'
so we can try to solve for n number of people for a particular number of skips.

unfortunately an explicit solution can't be found for all n and k but instead must be the solution to the following difference equation:


If Josephus had a buddy and you would like to know where would he stand so that two people survive the problem becomes even more complicated.

Variations of this problem have entertained computer scientists for decades since it poses very good scenarios for optimization.
don't think however that you must be caught in an ethnic strife against the world power to be able to put skills like this to good use, this could be useful in other much more common situations like being stuck in a dessert island without food and trying to decide which survivors to eat first. It pays to know math.


3 comments:

David Akinin said...

This is pretty cool! Never thought of it before!
I like the "a la Masada" expression, btw.

孤單 said...

You may be disappointed if you fail, but you are doomed if you do not try...................................................

唱歌 said...

憂能傷身,保重哦!.........................