# What type of problem is solving 1 treasure in 1000 boxes?

Is the following problem a dynamic programming problem or some other type like stochastic optimization ?

You have 1000 boxes and only 1 box contains the "treasure". In order to find the correct box, you must line the boxes up 1-1000 and systematically remove one box, save the next box, remove the next box, etc, etc. What number box contains the treasure?

• Are the boxes identical? Do you get to choose the order or is it preconditioned? Do you have to start with box 1? – Mortified Through Math May 2 '17 at 22:45
• The question reminds me a bit of this: en.wikipedia.org/wiki/Josephus_problem – carmichael561 May 2 '17 at 22:49
• I don't understand the question. The treasure box is not determined by your search algorithm, it could be any of them. Can you clarify? Perhaps show us what you mean with a smaller number, like five boxes. – lulu May 2 '17 at 22:49
• @lulu that's my thought. If the boxes are identical and the treasure is hidden in a random box, there is no algorithm which will perform better than guessing. – Mortified Through Math May 2 '17 at 22:50
• @ALB exactly. I expect the OP means to put the numbers in a circle and is asking which will be the last number chosen, something like that...though that's a big reach from what is written. – lulu May 2 '17 at 22:51