Questions tagged [integer-partition]

In number theory and combinatorics, a partition of a positive integer n, also called an integer partition, is a way of writing n as a sum of positive integers. Two sums that differ only in the order of their summands are considered the same partition. (If order matters, the sum becomes a composition.)

In number theory and combinatorics, a partition of a positive integer n, also called an integer partition, is a way of writing n as a sum of positive integers. Two sums that differ only in the order of their summands are considered the same partition. (If order matters, the sum becomes a composition.)

References:

47 questions
0
votes
2 answers

Recursive method for the integer partition algorithm

I need to find one of the possible partitions of a number (N) by the number of elements (M) involved, like this: Number 4 Partitions 4 3 1 2 2 2 1 1 1 3 1 1 1 1 I need to create a function P(N, M), that would return the following result for the…
juliano.net
  • 7,982
  • 13
  • 70
  • 164
-1
votes
2 answers

Divide an integer evenly with a maximum

I need an algorithm for the following: I'm given a specified target sum n, and a specified limit m. These are both positive integers. I want to find an integer partition of the target sum n that has as few summands as possible. Each summand must be…
1 2 3
4