login
Permutation trees of power n and height k.
6

%I #44 Jul 13 2022 18:42:44

%S 1,1,1,1,1,4,1,1,14,8,1,1,51,54,13,1,1,202,365,132,19,1,1,876,2582,

%T 1289,265,26,1,1,4139,19404,12859,3409,473,34,1,1,21146,155703,134001,

%U 43540,7666,779,43,1,1,115974,1335278,1471353,569275,120200,15456,1209,53,1

%N Permutation trees of power n and height k.

%C A permutation tree is a labeled rooted tree that has vertex set {0,1,2,..,n} and root 0 in which each child is larger than its parent and the children are in ascending order from the left to the right. The height of a permutation tree is the number of descendants of the root on the longest chain starting at the root and ending at a leaf. This defines C(n,height) for 1<=height<=n. Row sum is n!.

%C Setting T(n,k) = C(n,k+1) for 0<=k<n and additionally T(0,0) = 1 the T(n,k) can also be interpreted as coefficients of polynomials P_n(x) = Sum_{k=0..n-1} T(n,k) x^k. An analogous construction classifying permutation trees by width (number of leafs) gives the Eulerian numbers as defined in A008292 and the Eulerian polynomials as defined via DLMF 26.14.1. (See A123125 for the triangle with an (0,0)-based offset.)

%H Alois P. Heinz, <a href="/A179454/b179454.txt">Rows n = 0..141, flattened</a>

%H Jennifer Elder, Nadia Lafrenière, Erin McNicholas, Jessica Striker and Amanda Welch, <a href="https://doi.org/10.48550/arxiv.2206.13409">Homomesies on permutations -- an analysis of maps and statistics in the FindStat database</a>, math.CO, arXiv, 2022. (Def. 4.20 and Prop. 4.22.)

%H FindStat - Combinatorial Statistic Finder, <a href="http://www.findstat.org/StatisticsDatabase/St000308">The height index of a permutation</a>.

%H Peter Luschny, <a href="http://www.oeis.org/wiki/User:Peter_Luschny/PermutationTrees">Permutation Trees</a>.

%e As a (0,0)-based triangle with an additional column [1,0,0,0,...] at the left hand side:

%e [ 1 ]

%e [ 0, 1 ]

%e [ 0, 1, 1 ]

%e [ 0, 1, 4, 1 ]

%e [ 0, 1, 14, 8, 1 ]

%e [ 0, 1, 51, 54, 13, 1 ]

%e [ 0, 1, 202, 365, 132, 19, 1 ]

%e [ 0, 1, 876, 2582, 1289, 265, 26, 1 ]

%e [ 0, 1, 4139, 19404, 12859, 3409, 473, 34, 1]

%e --------------------------------------------

%e The height statistic over permutations, n=4.

%e [1, 2, 3, 4] => 2; [1, 2, 4, 3] => 3; [1, 3, 2, 4] => 3; [1, 3, 4, 2] => 3;

%e [1, 4, 2, 3] => 3; [1, 4, 3, 2] => 4; [2, 1, 3, 4] => 2; [2, 1, 4, 3] => 3;

%e [2, 3, 1, 4] => 2; [2, 3, 4, 1] => 2; [2, 4, 1, 3] => 2; [2, 4, 3, 1] => 3;

%e [3, 1, 2, 4] => 2; [3, 1, 4, 2] => 2; [3, 2, 1, 4] => 2; [3, 2, 4, 1] => 2;

%e [3, 4, 1, 2] => 2; [3, 4, 2, 1] => 3; [4, 1, 2, 3] => 1; [4, 1, 3, 2] => 2;

%e [4, 2, 1, 3] => 2; [4, 2, 3, 1] => 2; [4, 3, 1, 2] => 2; [4, 3, 2, 1] => 3;

%e Gives row(4) = [0, 1, 14, 8, 1]. - _Peter Luschny_, Dec 09 2015

%p b:= proc(n, t, h) option remember; `if`(n=0 or h=0, 1, add(

%p binomial(n-1, j-1)*b(j-1, 0, h-1)*b(n-j, t, h), j=1..n))

%p end:

%p T:= (n, k)-> b(n, 1, k-1)-`if`(k<2, 0, b(n, 1, k-2)):

%p seq(seq(T(n, k), k=min(n, 1)..n), n=0..12); # _Alois P. Heinz_, Aug 24 2017

%t b[n_, t_, h_] := b[n, t, h] = If[n == 0 || h == 0, 1, Sum[Binomial[n - 1, j - 1]*b[j - 1, 0, h - 1]*b[n - j, t, h], {j, 1, n}]];

%t T[n_, k_] := b[n, 1, k - 1] - If[k < 2, 0, b[n, 1, k - 2]];

%t Table[T[n, k], {n, 0, 12}, {k, Min[n, 1], n}] // Flatten (* _Jean-François Alcover_, Jun 05 2018, after _Alois P. Heinz_ *)

%o (Sage) # uses[bell_transform from A264428]

%o # Adds the column (1, 0, 0, 0, ..) to the left hand side and starts at n=0.

%o def A179454_matrix(dim):

%o a = [2]+[0]*(dim-1); b = [1]+[0]*(dim-1); L = [b,a]

%o for k in range(dim):

%o b = [sum((bell_transform(n, b))) for n in range(dim)]

%o L.append(b)

%o return matrix(ZZ, dim, lambda n, k: L[k+1][n]-L[k][n] if k<=n else 0)

%o A179454_matrix(9) # _Peter Luschny_, Dec 07 2015

%o (Sage) # Alternatively, based on FindStat statistic St000308:

%o def statistic_000308(pi):

%o if pi == []: return 0

%o h, i, branch, next = 0, len(pi), [0], pi[0]

%o while true:

%o while next < branch[len(branch)-1]:

%o del(branch[len(branch)-1])

%o current = 0

%o while next > current:

%o i -= 1

%o branch.append(next)

%o h = max(h, len(branch)-1)

%o if i == 0: return h

%o current, next = next, pi[i]

%o def A179454_row(n):

%o L = [0]*(n+1)

%o for p in Permutations(n):

%o L[statistic_000308(p)] += 1

%o return L

%o [A179454_row(n) for n in range(8)] # _Peter Luschny_, Dec 09 2015

%Y Cf. A008292, A123125, A179455, A179456, A264428.

%Y Row sums give A000142.

%K nonn,tabf

%O 0,6

%A _Peter Luschny_, Aug 11 2010