See http://www.jsoftware.com/books/help/dictionary/cfor.htm for the verb
comb: NB. All size x combinations of i.y
Select the ones with sum N. Or X.

R.E. Boss

-----Oorspronkelijk bericht-----
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens JC Coez
Verzonden: vrijdag 28 juli 2006 16:26
Aan: Programming forum
Onderwerp: Re: [Jprogramming] Diagonal generalization



> Perhaps you might like to refine your question.  The indicies of each 
> element are generated by
>
> ind =: $ #: [: i. [:*/$
>
To refine my question : given an integer X and a number n, I would like to 
find all combinations of n different integers from 1 to 9 for which the sum 
is  N. Just like in the kakuro puzzle.

JC Coez 

----------------------------------------------------------------------
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