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
    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