partition - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


combinat

  

partition

  

partition an integer

 

Calling Sequence

Parameters

Description

Examples

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