Hi,

I wanted to know if there existed an good implementation in R of the
following classical subset Integers  :

$P_{n,m} = {k_1, \ldots, k_m \in \mathbb{N} : k_1 + \ldots + k_m = n }$

for any integers $m < n$. There is an obvious not optimal code which would
be to run through $m$ sums and put a boolean condition to report if the
integers respect these condition but it would take $m^n$ steps...

Thanks for your answers,

David Pham

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to