partition an integer - Maple Help

Online Help

All Products    Maple    MapleSim


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

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

withcombinat,partition

partition

(1)

partition0

(2)

partition3

1,1,1,1,2,3

(3)

partition6,3

1,1,1,1,1,1,1,1,1,1,2,1,1,2,2,2,2,2,1,1,1,3,1,2,3,3,3

(4)

See Also

combinat[numbpart], type/partition


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