Well, for a 20x20 you're going to have to deal with something like 10^26
items to handle the general case - not very tractable no matter how you do
it.  A better understanding of the overall problem might allow you to prune
the possibilities but, as you've stated it, brute force does not scale well.
 For instance, if you really are dealing with APVs as in your example, there
should be tremendous shortcuts.

It looks like Raul and I got the same answer so at least he and I have the
same understanding of the problem even if that's not what you intended.

On 2/5/08, Geoff Canyon <[EMAIL PROTECTED]> wrote:
>
>
> On Feb 5, 2008, at 7:35 AM, Devon McCormick wrote:
>
> > For your example "i. 5 3", there should be 3^5 possible sums
> > (including
> > duplicates).
>
> This is the key phrase. I'm removing duplicates. Perhaps I should have
> said "unique sums."
>
> In any case, figuring them all out and then removing duplicates isn't
> an option because I'm likely going to be dealing with matrices up to
> at least 20x20, perhaps 30x30 or more.
>
> thanks,
>
> Geoff
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to