3
$\begingroup$

I am familiar with and have written MathCad algorithms for the partition functions 𝑝(𝑛,π‘˜),which gives the number of ways of partitioning 𝑛 into π‘˜ parts, π‘ž(𝑛,π‘˜), which gives the number of ways of partitioning 𝑛 into π‘˜ distinct parts, and 𝑃(𝑁,𝑀,𝑛), which gives the number of ways of partitioning 𝑛 into exactly 𝑀 parts of size at most 𝑁. I seek a recursive algorithm for 𝑄(𝑁,𝑀,𝑛), which gives the number of ways of partitioning 𝑛 into exactly 𝑀 distinct parts of size at most 𝑁. If there is an existing python algorithm, all the better. Thanks.

$\endgroup$

Your Answer

By clicking β€œPost Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.