wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> easy >> Jinxed
(Message started by: alien2 on Jan 18th, 2013, 5:06am)

Title: Jinxed
Post by alien2 on Jan 18th, 2013, 5:06am
A rainbow appears above a meadow and you spot a 1 ft tall leprechaun with a crown on his head. He starts to run so you run after him. You jump and catch him, nearly losing him in a shroud of sudden mist. You stand up holding him in your hands, thinking he'll run again if you put him down. He says to you: "I am the king of all the leprechauns. Unlike with other captured leprechauns, you'll get wishes from me only if you pass a test.

You see, you are standing on a corner square of a checkered parcel, whose grass has two shades of green. There are 100 squares arranged in a ten-by-ten grid. You must look for 100 shamrocks, as there is one in each square. The mist reduces your range of sight to the maximum of 9 squares, that is, a square you're standing on and all adjacent ones. You're allowed to move like the king in chess, so that one step takes you to any adjacent square. If you see all the shamrocks in the parcel by making the least number of steps, I will grant you three wishes. If not, you'll be permanently jinxed. You can think this through, as your attempt begins with your first step.

There is another option to consider. You could put me down and let me go. If you do that, I won't jinx you, but I'll grant you no wishes either."

If you were to decide to give it a try, what is the least number of steps needed to get your wishes?

Title: Re: Jinxed
Post by Grimbal on Jan 18th, 2013, 9:09am
I manage [hide]28[/hide] steps (not counting the 1st corner)

And somehow it resists any effort of improvement.

PS: but don't believe leprechauns.  They are pathologic liars.  They always try to twist your mind by making you solve silly tasks.  Just take his crown and let him run.  That's the best you can get.

Title: Re: Jinxed
Post by SMQ on Jan 31st, 2013, 6:54am

on 01/18/13 at 09:09:00, Grimbal wrote:
I manage [hide]28[/hide] steps (not counting the 1st corner)

Hmm, interesting. I have an elegant [hide]30-step[/hide] solution, and a less-elegant [hide]29-step[/hide] solution, but have not yet been able to match your best.

--SMQ

Title: Re: Jinxed
Post by alien2 on Jan 31st, 2013, 7:00am
I get [hide]29[/hide] steps too. We must ge jinxed SMQ. :P

Title: Re: Jinxed
Post by Grimbal on Feb 1st, 2013, 5:38am
I have to verify my solution, it seems.

Note that my [hide]28[/hide] steps don't count the initial corner square.  I am standing on the corner square and then do [hide]28[/hide] steps.

Title: Re: Jinxed
Post by Grimbal on Feb 3rd, 2013, 1:00pm
Here is my solution.  Zipped.

Title: Re: Jinxed
Post by SMQ on Feb 3rd, 2013, 1:22pm
Yep. That beats my best fair and square. Good work. :)

--SMQ



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board