# Solution to Microsoft Puzzle : Fox in a Hole

**Here is the solution to the Puzzle of the Day 2084 : Microsoft Puzzle Fox in a Hole Puzzle
**

**Consider five holes ****in ****line. ****One occupied ****by a fox****.
**

**Each**

**night, the fox**moves

**to a neighboring hole**

**,**

**either to the**left

**or to the**right

**.**

**Each**

**morning, you**

**inspect**

**a hole of your choice.**

**What ****strategy would ensure that the fox is eventually caught****?**

**Here is the solution : **

There are multiple solutions to it which are as follows if you label the holes as A, B, C, D, E

- B, C, D, B, C, D
- B, C, D, D, C, B
- D, C, B, B, C, D
- D, C, B, D, C, B

Let’s explain the first one – B, C, D, B, C, D: If fox is hiding under H, what is the value of H. Lets divide the problem and choose the alternate holes, A,C,E or B,D. On the first morning fox is in one of the either combinations.

If the fox was in B,D – the sequence B,C,D would work. If the fox is not caught means that he is in A,C,E on the first morning. Which means on the fourth morning he has to be in B,D. Hence repeat the same sequence – B,C,D

Alternate explanation : Fox is in A,B,C,D,E. If fox is not in B, he will move to B,C,D,E. If not in C, then A,C,D,E. If not in D then move to B,D. If not in B, then it will move to C,E. Now if he is not in C, it must move to D.

For more puzzles like these visit “Puzzles” . To get these right into your mailbox click here