All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > General
Where's Bob? (Posted on 2018-05-01) Difficulty: 3 of 5
FBI Agent Alice is hot on the trail of computer hacker Bob, who is hiding in one of 17 caves. The caves form a linear array, and every night Bob moves from the cave he is in to one of the caves on either side of it. Alice can search two caves each day, with no restrictions on her choice.

For example, if Alice searches (1 2), (2 3), ..., (16 17), then she is certain to catch Bob, though it might take her 16 days.

What is the shortest time in which Alice can be guaranteed of catching Bob?

No Solution Yet Submitted by Danish Ahmed Khan    
Rating: 4.6667 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
An improvement, but not a provable minimum | Comment 1 of 7
Since each of Alice's days can eliminate at most 2 caves, even if Bob never moves it still takes 9 days to know his location with certainty. We can take that as a lower limit. 

Now consider the following strategy. (Assume Bob is never found unless he must be):

First Pass

On day #1, Alice checks (1,3). Bob might be in [2,4] or else 5+, after he moves he's in [1,3] or 4+
On day #2, Alice checks (4,6). Bob might be in [1,3,5,7], or else in 8+. After he moves, he's in [2,4,6] or 7+
On day #3, Alice checks (7,9). Bob might be in [2,4,6,8,10] or else 11+. After he moves, he's in [1,3,5,7,9] or 10+
On day #4, Alice checks (10,12). Bob might be in [1,3,5,7,9,11,13] or else 14+. After he moves he's in [2,4,6,8,10,12] or 13+
On day #5, Alice checks (13,15). Bob might be in [2,4,6,8,10,12,14,16] or else 17. After he moves, he's in [1,3,5,7,9,11,13,15] or 16+.
On day #6, Alice checks (16,1). Bob is now guaranteed to be in an odd cave 3+. After he moves, he's in an even cave. 

Second Pass

On day #7, Alice checks (2,4) Bob is now in an even cave 6+, and after he moves he's in an odd cave 5+
On day #8, Alice checks (5,7) Bob is now in an odd cave 9+ and after he moves he's in an even cave 8+
On day #9, Alice checks (8,10) Bob is now in an even cave 12+, and after he moves he's in an odd cave 11+
On day #10, Alice checks (11,13) Bob is now in an odd cave 15+ and after he moves he's in an even cave 14+
On day #11, Alice checks (14,16) and finds Bob.

I haven't proved that 11 days is a minimum, but given the lower limit of 9 days there doesn't seem to be much wiggle room. Still, on day #6 we get no actual information from the 2nd guess. Even if Alice just guesses 16 twice, after Bob's move he's still in an even cave. Likewise, on day #11, Alice doesn't really need to check both caves, since after checking the first one she knows with certainty where Bob is located. It's at least possible that some other algorithm wouldn't "waste" these guesses and could result in only requiring 10 days.


  Posted by Paul on 2018-05-01 15:04:51
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information