From: Robert Retzbach Date: 2006-01-07T03:49:15+09:00 Subject: Re: [QUIZ] Numeric Maze (#60) Ruby Quiz schrieb: >The three rules of Ruby Quiz: > >1. Please do not post any solutions or spoiler discussion for this quiz until >48 hours have passed from the time on this message. > >2. Support Ruby Quiz by submitting ideas as often as you can: > >http://www.rubyquiz.com/ > >3. Enjoy! > >-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > >by Christer Nilsson > >You have a starting point and a target, say 2 and 9. > >You have a set of three operations: > > double > halve (Odd numbers cannot be halved.) > add_two > >Problem: Move from the starting point to the target, minimizing the number of >operations. > > Examples: > > solve(2,9) # => [2,4,8,16,18,9] > solve(9,2) # => [9,18,20,10,12,6,8,4,2] > > > > This was really a nice riddle. I learned much about understanding and implementing a BFS algo. Thank you for that. But I waited for the new riddle to appear :\ I guess I have to wait another few days. But please don't say 'Tomorrow\'s quiz is about..' and similar. Well I was bored today :> I get an 403, when I try to touch /quiz61.html from rubyquiz.com Maybe it's is correct that I get that response, maybe not. Don't let us wait too long for that dice riddle :> - With kind regards from Duesseldorf, Germany Robert "Mr. Overheadman" Retzbach