3
$\begingroup$

I would like to re-ask this question if I may? Specifically I am after the step by step output rather than the math to arrive directly at the last man standing. The math to directly answer the example question in the title.
Such that I can come up with a formula in excel to model the Josephus problem for any size circle and any count and output in columns as each elimination takes place to form a table/grid.

I want to be able to represent this table in 2 ways: 1. Eliminating each item in it's original position/row leaving that cell blank such that the last man standing would be the only item in the list but in it's original row (col1:1-8; col2:1,2,3,4,BLANK,6,7,8; col3:1,BLANK,3,4,BLANK,6,7,8; and so on) 2. Contracting the list after each elimination such that the last man standing would be in the first row of the table (col1:1-8; col2:1,2,3,4,6,7,8; col3:1,3,4,6,7,8; and so on.

Regards, Ian

Remove the next nth element from a "circular?" list

I am trying to represent the following in Excel:
A list of items considered to be a arranged in a circle.
(ie. a list of integers e.g. 2 to 9 in a column in Excel)
Starting from 2 and counting down the list remove/delete the nth element.
((e.g if the count is every 3rd element until only one element remains) then remove the 3rd then 6th then 1st....as below)

2,3,4,5,6,7,8,9
2,3,5,6,7,8,9
2,3,5,6,8,9
3,5,6,8,9
3,5,8,9
5,8,9
5,8
8

TIA, Ian

  • 0
    I should add that I am asking only from a math point of view (though if anyone is willing to share any Excel ideas/implementations I would be very interested in that too). Thanks again2012-04-01
  • 1
    http://en.wikipedia.org/wiki/Josephus_problem2012-04-01
  • 0
    So, what is the question?2012-04-02
  • 0
    Steve D thank you for the link.2012-04-06
  • 0
    What I am after is (within Excel) to model each step for any size list and any size nth element. For the example above, using only worksheet functions, the above 8 rows would be 8 columns that show how the list decreases as every nth element is removed.2012-04-06
  • 0
    So to modify the math that directly produces the "last man standing" and output each item eliminated in turn or anything in between: "who was the 5th man executed in the case 9?" or "when does the man in the 5th place at start get executed? or does he survive?" and so on...2012-04-10
  • 0
    Have you seen the discussion of this problem in *Concrete Mathematics*? You can start with that...2012-05-06
  • 0
    Thanks @J.M. Are you referring to Concrete Mathematics by Graham, Knuth, and Patashnik. Unfortunately I don't have ready access to that but thanks anyway2012-05-06

0 Answers 0