The
Cullinan 1 Diamond (a.k.a.: The Great Star of Africa)
has been stolen. In order to catch the culprit, world renown scientists Bill Nye and Neil deGrasse Tyson have engineered a camera that can take pictures of the past. Unfortunately, taking pictures of the past is very expensive. You have been hired to develop the optimal strategy for the right moments to take the pictures. When you take a picture, you can see one of three things: The diamond in the case, an empty case, or the culprit in the act. After a detailed investigation, evidence suggests that the culprit was a master thief, but it must have taken him
more than
minutes to steal the diamond. Evidence also suggests that he must have stolen it on Sunday, within a
hour period.
What is the maximum number of pictures you need to take to catch the culprit if you use the best strategy?
Inspired by You Be the Detective .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Edit: This answer is wrong. I will update it soon.
If we know that the culprit must have stolen it somewhere between 00:00-24:00 , what's the best moment to take the first picture? We can cut the amount of search time in half by taking the picture at 12:00 ; this is because we will know if the diamond has already been stolen or not. If it hasn't already been stolen, then we know it will be stolen after 12:00 ; if it has been stolen, then we will look before 12:00 . We can apply this same technique over and over again to cut the search space in half. 24 hours = 1440 minutes needs to be divided by two 8 times in order to eliminate the search space down to less than 10 minutes . This commonly used algorithm is known as the bisection method .
Python 3.3