Yes, but while it's instructive to use A. to solve the example
5x5 matrix  (I tried it too)  you still won't be able to use the
A. method to find  the best sum for the 15 x 15 matrix, since

    ! 14
8.71783e10

Not on my machine at least - perhaps with one with GB of
memory and a super-fast processor.  In any case, I get limit
error with your p 12 .  p 11 already takes about 270 Mb.
That's with a 32-bit OS.

I'd better not say how I did solve it,  except that it wasn't
a sophisticated method!

Mike

On 10/09/2011 3:41 AM, David Ward Lambert wrote:
>     NB. OH!  Leave alone the first row.
>
>     p=: i.@!@<: A. i.
>     p 5
> 0 1 2 3 4
> 0 1 2 4 3
> 0 1 3 2 4
> 0 1 3 4 2
> 0 1 4 2 3
> 0 1 4 3 2
> ...
> ----------------------------------------------------------------------
> 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