partitions.package: Integer partitions

Description Details Author(s) References Examples

Description

Routines to enumerate all partitions of an integer; includes restricted and unequal partitions.

Details

This package comprises eight functions: P(), Q(), R(), and S() give the number of partitions, unequal partitions, restricted partitions, and block partitions of an integer.

Functions parts(), diffparts(), restrictedparts(), and blockparts() enumerate these partitions.

Function conjugate() gives the conjugate of a partition and function durfee() gives the size of the Durfee square.

NB the emphasis in this package is terse, efficient C code. This means that there is a minimum of argument checking. For example, function conjugate() assumes that the partition is in standard form (ie nonincreasing); supplying a vector in nonstandard form will result in garbage being returned silently. Note that a block partition is not necessarily in standard form.

Author(s)

Robin K. S. Hankin

References

Examples

1
2
3
4
5
6
 parts(5)
 diffparts(9)
 restrictedparts(15,10)
 P(10,give=TRUE)
 Q(10,give=TRUE)
 R(5,10)

partitions documentation built on May 19, 2017, 12:18 p.m.

Search within the partitions package
Search all R packages, documentation and source code