Skip to content

RootedForests ​

The forests of rooted labeled trees on {1,…,n}\{1, \dots, n\}, each element a length-nn parent array (entry 00 marks a root). Count (n+1)n−1(n+1)^{n-1}.

✓ checked against that system · ! checked, with disagreements (hover a chip)OEISA000272✓
RootedForests(n)the rooted forests on {1,…,n}\{1, \dots, n\}, as parent arrays
Typed signatures
TypePackageApplies
(integer<0..>) -> indexed_collection<rooted_forest>combinatoricsalways

Domain: Collections

Examples

Basic #

(3+1)2=16(3+1)^{2} = 16

live ↗
InCount(RootedForests(3))\mathrm{Count}(\mathrm{RootedForests}(3))Out1616

Parent arrays; 00 marks a root

live ↗
InTake(RootedForests(2),3)\mathrm{Take}(\mathrm{RootedForests}(2), 3)Out[RootedForest⁡([0,1]),RootedForest⁡([2,0]),RootedForest⁡([0,0])]\bigl\lbrack{\operatorname{RootedForest}}([0, 1]), {\operatorname{RootedForest}}([2, 0]), {\operatorname{RootedForest}}([0, 0])\bigr\rbrack
About
Examples2
CrosswalkOEIS