1. ## I have the answer, but not an explanation =/

Here's the problem which is partially completed:

There are five boxes labeled 0 through four. Your task is to put a digit from 0 through 4 inside each box so that this condition held:

* The digit you put in the box labeled "0" must be the same as the number of 0's you use. Same for the box labeled "1", and the box labeled "2"... and so on ...

We've been given a head start on this problem, the boxes should be filled with 1, 2, 1, 0, 0.

However, despite my several attempts, I can not figure out a logical way to get to this answer. Obviously, an answer alone doesn't help me learn. So an explanation is appreciated!

2. Hi Sarah,

Originally Posted by Sarah-
We've been given a head start on this problem, the boxes should be filled with 1, 2, 1, 0, 0.
this is wrong isn't it? it says there's one used zero but you used two zeros. Maybe you mean <2,1,2,0,0>? This is how i did it:

We'll start from back, i.e. from box "4". What digit can be in this box? 4? surely not, we'd have to put 4 into at least three other boxes and this would consequently require a huge amount of different digits that must be used, you can see it is not satisfiable. The same applies for putting 3,2,1 into the box "4" - verify this is true. So we must have 0 in the box "4".

Now the box "3", you can eliminate putting 4 into it 'cause the 0 in the box "4" says so. Again try subsequently putting 3,2,1 into it and you'll find quickly, similarly as for the box "4", that this is not possible - verify it. So in the box "3" must be 0. We have < , , ,0,0> so far.

Now for the box "2", you can eliminate 4,3. Trying 2 forces <2,1,2,0,0> so we have a solution. Putting 1 in the box "2" we have
< , ,1,0,0> so we must use digit 2 once, we see we cannot put it into the box "1" because we'd have to put 1 into "0", but there are two used zeros already. So we must put the 2 into "0" which leads to <2, ,1,0,0> which is easily verified to be unsatisfiable. It only remains to try to put 0 into "2", so we have < , ,0,0,0> so far. It is now easily verified that this is not satisfiable because we have at least three used zeros but we cannot put 3 or 4 into the box "0".

It is very likely there's some trick to do it faster which I'm missing, but this is certainly faster then going through all possibilities bruteforce.

3. Originally Posted by Sarah-
Here's the problem which is partially completed:

There are five boxes labeled 0 through four. Your task is to put a digit from 0 through 4 inside each box so that this condition held:

* The digit you put in the box labeled "0" must be the same as the number of 0's you use. Same for the box labeled "1", and the box labeled "2"... and so on ...

We've been given a head start on this problem, the boxes should be filled with 1, 2, 1, 0, 0.

However, despite my several attempts, I can not figure out a logical way to get to this answer. Obviously, an answer alone doesn't help me learn. So an explanation is appreciated!
Then Good for You! Because that answer does NOT satisfy the very first rule: The number of "0"s used is 2, not 1. (That is assuming that the numbers are ordered "box 0", "box 1", "box 2", "box 3", "box 4".)