## Find the Mole

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

Jeff_UK
Posts: 66
Joined: Sat Nov 03, 2007 10:38 pm UTC

### Find the Mole

There are 5 mole hills in my garden:
A A A A A

There is one mole, who sleeps in one of the hills during the day.
I can inspect one hill every day and see if the mole is there (I won't wake him up, and if I find him, I can catch him)
He will always move one hill to the left or right during the night (the tunnel is linear, and does not wrap-around at the ends, and he can visit the same hill multiple nights, and hills I've previously inspected).

Can I catch the mole, how many days will it take?
"Please only print this post if you really need to"
...hmm....I wonder how much extra energy is required to generate that request...We need a cost/benefit analysis, STAT!

SirGabriel
Posts: 42
Joined: Wed Jul 16, 2014 11:54 pm UTC

### Re: Find the Mole

Spoiler:
I can do it in a week.

Number the molehills 1-5, from left to right.
Inspect the hills in the following order until you catch it:
Day 1 - 2
Day 2 - 2
Day 3 - 3
Day 4 - 4
Day 5 - 4
Day 6 - 3
Day 7 - 2

jaap
Posts: 2090
Joined: Fri Jul 06, 2007 7:06 am UTC
Contact:

### Re: Find the Mole

This is a repeat of:
viewtopic.php?f=3&t=62767

SirGabriel
Posts: 42
Joined: Wed Jul 16, 2014 11:54 pm UTC

### Re: Find the Mole

Spoiler:
Correction: you only need 6 moves, day 2 in my original solution wasn't actually doing anything useful. The solution can also be generalized to finish any number of molehills n>2 in 2n-4 days, as someone in the other thread pointed out.

emlightened
Posts: 42
Joined: Sat Sep 26, 2015 9:35 pm UTC
Location: Somewhere cosy.

### Re: Find the Mole

Spoiler:
Number them 1-5, left to right.

2,2,4,4,3,2

First two checks make sure it's in hill 3/4/5. Second two ensure that the mole was in hill 3 after second night, and is hence in 1/3. So you can then check 3, then 2, to catch it.

But I got wrong when the mole moved between holes, somewhere.

4, 3, 2, 1, 2, 1
4, 3, 2, 1, 2, 3
4, 3, 2, 3, 2, 1
4, 3, 2, 3, 2, 3
4, 3, 2, 3, 4, 3
4, 3, 2, 3, 4, 5

all fail.

Yeah, the only solutions are the ones in the other thread.[citation needed]

"Therefore it is in the interests not only of public safety but also public sanity if the buttered toast on cats idea is scrapped, to be replaced by a monorail powered by cats smeared with chicken tikka masala floating above a rail made from white shag pile carpet."

Jeff_UK
Posts: 66
Joined: Sat Nov 03, 2007 10:38 pm UTC

### Re: Find the Mole

Ah! I searched for moles and foxes, not mices! ...

Very good write up here:

"Please only print this post if you really need to"
...hmm....I wonder how much extra energy is required to generate that request...We need a cost/benefit analysis, STAT!