# PartitionsAndPermutationsΒΆ

PartitionsAndPermutations contains functions for generating streams of integer partitions, and streams of sequences of integers composed from a multi-set.

- conjugates: Stream List Integer -> Stream List Integer
`conjugates(lp)`

is the stream of conjugates of a stream of partitions`lp`

.

- distinct_partitions: (Integer, Integer, Integer) -> Stream List Integer
`distinct_partitions(p, l, n)`

is the stream of partitions of`n`

into distinct numbers whose number of parts is no greater than`p`

and whose largest part is no greater than`l`

.

- distinct_partitions: Integer -> Stream List Integer
`distinct_partitions(n)`

is the stream of all partitions of`n`

into distinct numbers.

- odd_partitions: (Integer, Integer, Integer) -> Stream List Integer
`odd_partitions(p, l, n)`

is the stream of partitions of`n`

into odd numbers whose number of parts is no greater than`p`

and whose largest part is no greater than`l`

.

- odd_partitions: Integer -> Stream List Integer
`odd_partitions(n)`

is the stream of all partitions of`n`

into odd numbers.

- partitions: (Integer, Integer) -> Stream List Integer
`partitions(p, l)`

is the stream of all partitions whose number of parts and largest part are no greater than`p`

and`l`

.

- partitions: (Integer, Integer, Integer) -> Stream List Integer
`partitions(p, l, n)`

is the stream of partitions of`n`

whose number of parts is no greater than`p`

and whose largest part is no greater than`l`

.

- permutations: Integer -> Stream List Integer
`permutations(n)`

is the stream of permutations formed from`1, 2, 3, ..., n`

.

- sequences: (List Integer, List Integer) -> Stream List Integer
`sequences(l1, l2)`

is the stream of all sequences that can be composed from the multiset defined from two lists of integers`l1`

and`l2`

. For example, the pair`([1, 2, 4], [2, 3, 5])`

represents multi-set with 1`2`

, 2`3`

`'s`

, and 4`5`

`'s`

.

- sequences: List Integer -> Stream List Integer
`sequences([l0, l1, l2, .., ln])`

is the set of all sequences formed from`l0`

0`'s`

,`l1`

1`'s`

,`l2`

2`'s`

, ...,`ln`

`n`

`'s`

.