Restricted Integer Partitions – codegolf.stackexchange.com

Pk(n) means the amount of partitions of n into exactly k parts. Given n and k, calculate Pk(n). Tip: Pk(n) = Pk(n−k) + Pk−1(n−1), with initial values p0(0) = 1 and pk(n) = 0 if n ≤ 0 or k ≤ 0. [...

from Hot Questions - Stack Exchange OnStackOverflow
via Blogspot

Share this

0 Comment to "Restricted Integer Partitions – codegolf.stackexchange.com"