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

Home > Logic
Catching your enemy (Posted on 2008-08-25) Difficulty: 2 of 5
You are hot on the trail of an enemy, who is hiding in one of 17 caves.

The caves form a linear array, and every night your enemy moves from the cave he is in to one of the caves on either side of it.

You can search two caves each day, with no restrictions on your choice. For example, if you search (1, 2), (2, 3), ..., (16, 17), then you are certain to catch him, though it might take you 16 days.

What is the shortest time in which you can be guaranteed of catching your enemy?

See The Solution Submitted by pcbouhid    
Rating: 2.3333 (3 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
solution | Comment 13 of 20 |

Start from one end:

day 1: search 1 & 3
day 2: search 1 & 3

If we didn't catch the enemy, he is obviously not in 1 & 3. He is also not in 2 (if was in 2 on day 1, he would have moved to either 1 or 3 on day 2 and would be caught on day 2). He is not in 4. Because if he was in 4 on day 1 and move to 3, he would be caught on day 2. It is possible he was in 4 on day 1 and moved to 5 on day 2. Basically, on day 2: 1, 2, 3, & 4 are out

day 3: search 5 & 7
day 4: search 5 & 7

Based on the same logic, he is not in 5, 6, 7, & 8.

If this was a 9 cave problem, the enemy would be caught on the fifth day (8 / 2 + 1).

Since this is a 17 cave problem. the enemy can be caught on 9 days (16 / 2 + 1)


  Posted by jpy on 2008-09-05 00:48:03
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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