combinat[partition] - partition an integer
|
Calling Sequence
|
|
partition(n, m)
|
|
Parameters
|
|
n
|
-
|
non-negative integer; integer to partition
|
m
|
-
|
(optional) non-negative integer; maximum integer in partitions
|
|
|
|
|
Description
|
|
•
|
The procedure partition partitions an integer n into all possible sums without regard to order. The output is a list of lists of integers where the sum of the elements in each list is n.
|
•
|
See the function numbpart, which computes the number of partitions.
|
•
|
The command with(combinat,partition) allows the use of the abbreviated form of this command.
|
|
|
Examples
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
|
|
Download Help Document
Was this information helpful?