Dominik Bathon wrote: > On Fri, 26 Aug 2005 15:24:22 +0200, Ruby Quiz > <james / grayproductions.net> wrote: > >> Bonus points for finding the shortest chain and/or a small execution >> time. > > > How about another bonus challenge: > > If your program can find the shortest chain between two words, then > extend/modify it to find a longest shortest chain for all words with n > letters in the dictionary. > In other words: find two words for which the shortest chain is at least > as long as the shortest chain between any other word pair. > > For example: > > $ ruby longest_shortest.rb -d /usr/share/dict/words 4 > idol > idyl > odyl > odal > oral > orad > brad > bead > beak > beck > back > bach > each > etch > utch > utah > utas > upas And another challenge, explain all the words your program emits.. who/what/where is utas? or utch? even 'orad' seems totaly foreign to me - but than perhaps thats normal as i'm just a german guy. Back to your question, yes sounds more like a challenge (in terms of acceptable runtime). I would like to suggest finding chains between words of different lengths. like this: refugees refugee refuges refutes reputes reputed deputed debuted debated rebated related relayed delayed decayed decoyed decoded decodes decides deciles defiles refiles refile refine repine rapine raping rating bating basing basin basis basts bests beats beams seams shams shame don't get me wrong, i just think your dictionary is a bit over the top... cheers Simon