Josephus problem*:
circle=1,2,3,4,5,6,7,8,9,10. count=2. (Beginning at 1) The "last man standing" in this case=9.
Order of elimination or permutation (?): 2,4,6,8,10,3,7,1,9
For any size circle and any size count what is the math that produces the order of elimination? e.g. circle=1,2,3,4,5,6,7,8,9. count=10.
Order of elimination (starting at 1): 1,3,6,2,9,5,7,4,8
*(From wikipedia: http://en.wikipedia.org/wiki/Josephus_problem) The Josephus problem is a theoretical problem related to a certain counting-out game. There are people standing in a circle waiting to be executed. The counting out begins at some point in the circle and proceeds around the circle in a fixed direction. In each step, a certain number of people are skipped and the next person is executed. The elimination proceeds around the circle (which is becoming smaller and smaller as the executed people are removed), until only the last person remains, who is given freedom.
(Original post)
(please forgive me if this looks slightly familiar to anyone...)
Hello,
Does anybody know the math for a general case Josephus-like permutation (any size circle, any size count)?
e.g circle=9, count=10.
1,3,6,2,9,5,7,4,8
I only have access to what I can find on the web (Google) and what has previously been suggested doesn't cover this particular aspect (Concrete math; wikipedia....). The nearest I have found is http://mathworld.wolfram.com/JosephusProblem.html
Can anyone help?
TIA, Ian