Restricted growth arrays#

These combinatorial objects are in bijection with set partitions.

class sage.combinat.restricted_growth.RestrictedGrowthArrays(n)[source]#

Bases: UniqueRepresentation, Parent

EXAMPLES:

sage: from sage.combinat.restricted_growth import RestrictedGrowthArrays
sage: R = RestrictedGrowthArrays(3)
sage: R == loads(dumps(R))
True
sage: TestSuite(R).run(skip=['_test_an_element',                            # needs sage.libs.flint
....:   '_test_enumerated_set_contains', '_test_some_elements'])
>>> from sage.all import *
>>> from sage.combinat.restricted_growth import RestrictedGrowthArrays
>>> R = RestrictedGrowthArrays(Integer(3))
>>> R == loads(dumps(R))
True
>>> TestSuite(R).run(skip=['_test_an_element',                            # needs sage.libs.flint
...   '_test_enumerated_set_contains', '_test_some_elements'])
cardinality()[source]#

EXAMPLES:

sage: from sage.combinat.restricted_growth import RestrictedGrowthArrays
sage: R = RestrictedGrowthArrays(6)
sage: R.cardinality()                                                       # needs sage.libs.flint
203
>>> from sage.all import *
>>> from sage.combinat.restricted_growth import RestrictedGrowthArrays
>>> R = RestrictedGrowthArrays(Integer(6))
>>> R.cardinality()                                                       # needs sage.libs.flint
203