Skip to content

RestrictedGrowthStrings ​

The restricted-growth strings of length nn: words ww with w0=0w_0 = 0 and wi≤1+max⁡(w0,…,wi−1)w_i \le 1 + \max(w_0, …, w_{i-1}).

RestrictedGrowthStrings(n)the restricted-growth strings of length nn: words ww with w0=0w_0 = 0 and wi≤1+max⁡(w0,…,wi−1)w_i \le 1 + \max(w_0, …, w_{i-1})
CombinatoricaMap[# - 1 &, RGFs[n], {2}]
Typed signatures
TypePackageApplies
(integer<0..>) -> indexed_collection<restricted_growth_string>combinatoricsalways

Domain: Collections

Details
  • Count is the Bell number BnB_n (A000110); the canonical RGS encoding of a set partition of {1,…,n}\{1, …, n\} used by SetPartitions.

Maps

Into and out of RestrictedGrowthString, called as CombinatorialMap(x, "Name"). Properties are the laws we state and what FindStat records.

From RestrictedGrowthString

  • SetPartitionRestrictedGrowthString → SetPartitioninverseThe set partition a restricted growth string labels: block j holds the positions labelled j.

To RestrictedGrowthString

  • RestrictedGrowthStringSetPartition → RestrictedGrowthStringinverseA set partition's restricted growth string: each position labelled with its block's index, from 0.

Examples

1 more kept as data, checked against the oracles
Basic #

Count(RestrictedGrowthStrings(4))=15Count(RestrictedGrowthStrings(4)) = 15

live ↗
InCount(RestrictedGrowthStrings(4))\mathrm{Count}(\mathrm{RestrictedGrowthStrings}(4))Out1515

The first element in enumeration order

live ↗
InRestrictedGrowthStrings(4)[1]\mathrm{RestrictedGrowthStrings}(4)[1]OutRestrictedGrowthString⁡([0,0,0,0]){\operatorname{RestrictedGrowthString}}([0, 0, 0, 0])
Statistics #

blocks, a set-partition statistic, reached through the order isomorphism: the Stirling numbers

live ↗
InTally(CombinatorialStat(RestrictedGrowthStrings(4),Blocks))\mathrm{Tally}(\mathrm{CombinatorialStat}(\mathrm{RestrictedGrowthStrings}(4), \text{Blocks}))OutTuple⁡([1,2,3,4],[1,7,6,1])\operatorname{Tuple}(\bigl\lbrack1, 2, 3, 4\bigr\rbrack,\bigl\lbrack1, 7, 6, 1\bigr\rbrack)
About
Examples4
Checked againstCombinatorica 3 agree
CrosswalkOEISCombinatoricaSageMath

Implementation

mappedcombinatoricapackages/oracle/src/mappings.ts

Combinatorica's growth strings start at 1; ours start at 0.

See also: SetPartitions