combinat[encodepart] - compute canonical integer representing partition
combinat[decodepart] - compute canonical partition represented by integer
|
Calling Sequence
|
|
encodepart(l)
decodepart(n, m)
|
|
Parameters
|
|
l
|
-
|
partition; non-decreasing list of positive integers
|
n
|
-
|
positive integer
|
m
|
-
|
positive integer
|
|
|
|
|
Description
|
|
•
|
The functions encodepart and decodepart provide a canonical labeling of all the partitions of n.
|
•
|
Given a partition l of n, encodepart(l) computes and returns the integer m between and numbpart(n) uniquely representing this partition.
|
•
|
Given a positive integer n and a positive integer m between and numbpart(n) the function decodepart(m, n) computes and returns the unique partition l represented by this positive integer.
|
•
|
The command with(combinat,encodepart) allows the use of the abbreviated form of this command.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
|
|
Download Help Document
Was this information helpful?