[Jprogramming] Diagonal generalization
R.E. Boss
r.e.boss at planet.nl
Fri Jul 28 23:23:12 HKT 2006
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: programming-bounces at jsoftware.com
[mailto:programming-bounces at jsoftware.com] 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
More information about the Programming
mailing list