From: James Edward Gray II Date: 2005-12-31T09:55:58+09:00 Subject: Re: Numeric Maze (#60) On Dec 30, 2005, at 5:37 PM, Jim Freeze wrote: > On 12/30/05, Christer Nilsson wrote: >> >> J. Ryan Sobol wrote: >>> Would it be appropriate to post my potential answers (not code) to >>> this question? >> >> Some examples: >> >> solve(1, 1) # => [1] > > > Is this a degenerate case? If to go from a to b in (a,b) through > transformation x,y or z, wouldn't there be two possible shortest > solutions: > > [1,2,1] > [1,0.5,1] Hmm, let's go back to the quiz and see if we can find an answer: On Dec 30, 2005, at 7:37 AM, Ruby Quiz wrote: > 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. The key phrase seems to be "minimizing the number of operations". I don't think we can get any smaller than zero and I don't see anything disallowing it, so I imagine it's fine. Just my opinion on an obviously debatable topic. James Edward Gray II