We must be solving different problems. There are 5^4=625 different combinations for 4 pushes of 5 buttons; so the shortest possible answer is 629 characters.
Maybe you're assuming the buttons can't be repeated? Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Raul Miller > Sent: Wednesday, June 25, 2008 5:42 PM > To: Programming forum > Subject: Re: [Jprogramming] Applied J: burglarly > > Here's the shortest sequence I've found, for four letter combinations > of 'abcde': > > abceadceabdecbadebcaedcbaecdbacdeabcdaecbdaebdcebdacebadcbedca > becadecabdcaebcdebacedbaedbcadbeadbcedabedacbdeacbeacdbecdabc > > That should be 123 characters, once it's "unwrapped". > > I used the code I posted earlier but using ? instead of ?. and > ran it several times. Slightly over 1% of my results have > length 123. > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
