compute canonical integer representing partition - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Combinatorics : combinat : combinat/encodepart

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 1 and numbpart(n) uniquely representing this partition.

• 

Given a positive integer n and a positive integer m between 1 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

withcombinat:

partition3

1,1,1,1,2,3

(1)

decodepart3,1

1,1,1

(2)

decodepart3,2

1,2

(3)

decodepart3,3

3

(4)

encodepart1,2

2

(5)

See Also

combinat[inttovec], combinat[nextpart], combinat[numbpart], combinat[partition], combinat[prevpart], combinat[vectoint]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam