"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

Reply via email to