There are seven holes in a line. A fox can move left or right along the holes and you can watch only one hole per day. So in how many days can you catch the fox?
Since this is CS, have you tried writing a simulation program? You could simulate the movement of the fox using random numbers and implement the hole-watching strategy you want to test.
Seriously, I'm not sure you can answer that question without more information. How often does the fox move? Is it a smart fox (e.g. it goes back-and-forth between the two left-most holes) or are its movements purely random?
if fox is purely random and 'looks' are purely random you would expect to see fox once every 7 days on average.
In fact, the results are the same if the holes are in a circle or if the fox can choose any hole at random. The sample is always 7. There is always a 1/7 chance of success every time you look.
Join our real-time social learning platform and learn together with your friends!