This is a variant of the sleeping princess puzzle.

There are fifteen foxholes, connected by underground tunnels as shown below. A fox is sleeping in one of them.

  • Every day, a hunter checks one of the foxholes, finding the fox if it is there.

  • Every night, the fox moves through a tunnel to a different, adjacent foxhole.

How can the hunter catch the fox?

  • $\begingroup$ Probably the same concept - but instead of odd-even, it's at the nth stage of the binary tree $\endgroup$
    – Quintec
    Sep 7, 2017 at 23:57
  • 1
    $\begingroup$ For some reason, just seeing 'hunter chasing fox' makes me think of IMOq3 $\endgroup$
    – Wen1now
    Sep 8, 2017 at 1:23
  • $\begingroup$ hunter comes in a day while fox moves in night. so hunter waits for whole day until tomorrow or he checks and go back? $\endgroup$
    – Oray
    Sep 8, 2017 at 5:23

1 Answer 1


Number the nodes as follows:

enter image description here

A valid solution is to check:


To see that this works, first note that the fox can only go from a hole in an even-numbered level of the tree to a hole in an odd-numbered level of the tree and vice-versa. If the fox starts in an odd level, the sequence 4,2,5,2,1,3,6,3,7 guarantees the hunter will catch it. This works because the hunter alternately looks at a hole at an odd level and then immediately checks the only possible remaining entrance to it, making sure the fox can never return to that hole:

enter image description here

If the fox has not been caught after this sequence, then you know it is in an even level of the tree. For the next day, it must have moved into a hole in an odd level, so we can use the same sequence again to seal its fate.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.