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

Postby Jeff_UK » Wed Nov 18, 2015 11:54 am UTC

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!

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

Re: Find the Mole

Postby SirGabriel » Wed Nov 18, 2015 3:21 pm UTC

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

User avatar
jaap
Posts: 2085
Joined: Fri Jul 06, 2007 7:06 am UTC
Contact:

Re: Find the Mole

Postby jaap » Wed Nov 18, 2015 3:44 pm UTC

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

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

Re: Find the Mole

Postby SirGabriel » Wed Nov 18, 2015 6:24 pm UTC

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.

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

Re: Find the Mole

Postby emlightened » Thu Nov 19, 2015 8:57 pm UTC

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

My initial answer was:

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]
← approximately how gay I am.
"a nebulous cloud of different combinations of styling bodily features"
"on either side of a wrought iron fence made of tigers"

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

Re: Find the Mole

Postby Jeff_UK » Fri Nov 20, 2015 2:00 pm UTC




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!


Return to “Logic Puzzles”

Who is online

Users browsing this forum: Google Feedfetcher and 8 guests