Permutation Ascent

Author

Eric W. Weisstein
December 30, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Combinatorics/PermutationAscent.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PermutationAscent.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

Ascents[p_]:=Count[Partition[p,2,1],_?(Greater@@#&)]

Comparison with Runs

Count[Ascents/@Permutations[3],#]&/@Range[0,3]

Length[Runs[#]]&/@Permutations[3]

Count[%,#]&/@Range[0,3]

Total Numbers of Ascents

Table[Range[0,n].(Count[Ascents/@Permutations[Range[n]],#]&/@Range[0,n]),{n,8}]//Timing

Table[(n-1)n!/2,{n,10}]

n=2

{#,Ascents[#]}&/@Permutations[2]//ColumnForm

Count[Ascents/@Permutations[2],#]&/@Range[0,2]

Table[Eulerian[2,k],{k,0,2}]

n=3

{#,Ascents[#]}&/@Permutations[3]//ColumnForm

Count[Ascents/@Permutations[3],#]&/@Range[0,3]

Table[Eulerian[3,k],{k,0,3}]

n=4

{#,Ascents[#]}&/@Permutations[4]//ColumnForm

Count[Ascents/@Permutations[4],#]&/@Range[0,4]

Table[Eulerian[4,k],{k,0,4}]