No.   If there were an ENTER, you would have to press 4
keys for each of the 625 possible codes, 2500 number-presses
in all.

Since there is no ENTER, you can, if you're careful, try a
new code with each button-press.  But you have to put in the
first 3 digits with no chance of opening the lock; thereafter
you can try at most one new code per key entered, so the
minimum number of key-presses is 3+625=628 (I mistyped 629
in my earlier post).

Henry Rich 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Mark 
> D. Niemiec
> Sent: Wednesday, June 25, 2008 11:11 PM
> To: [email protected]
> Subject: Re: [Jprogramming] Applied J: burglarly
> 
> "Henry Rich" <[EMAIL PROTECTED]> wrote:
> > 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.
> 
> If there were a break (say, pressing Enter) between each 
> group of buttons,
> 625 presses should get all combinations. However, since there 
> is no break,
> sequences can overlap, greatly reducing the number of presses. Since
> each button can be used in up to 4 sequences, this places a 
> lower bound
> of 160 presses (4+>.625/4) on the solution.
> 
> If repeats are not allowed, this reduces the number of allowable codes
> to 320, and imposes a lower bound of 84 on the solution.
> 
>    $ ((*./@:(2&(~:/\))&>)#]) ,{4$<'abcde'
> 320
> 
> -- Mark D. Niemiec <[EMAIL PROTECTED]>
> 
> ----------------------------------------------------------------------
> For information about J forums see 
> http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to