DeepAI

# Second Best, Third Worst, Fourth in Line

We investigate decomposable combinatorial labeled structures more fully, focusing on the exp-log class of type a=1 or 1/2. For instance, the modal length of the second longest cycle in a random n-permutation is (0.2350...)n, whereas the modal length of the second smallest component in a random n-mapping is 2 (conjecturally, given n>=434). As in earlier work, our approach is to establish how well existing theory matches experimental data and to raise open questions.

11/10/2021

### Permute, Graph, Map, Derange

We study decomposable combinatorial labeled structures in the exp-log cl...
11/29/2021

### Rounds, Color, Parity, Squares

This is a sequel to our paper "Permute, Graph, Map, Derange", involving ...
05/11/2022

### Components and Cycles of Random Mappings

Each connected component of a mapping {1,2,...,n}→{1,2,...,n} contains a...
10/01/2020

### Counting 4-Patterns in Permutations Is Equivalent to Counting 4-Cycles in Graphs

Permutation σ appears in permutation π if there exists a subsequence of ...
03/16/2021

### A Hamilton Cycle in the k-Sided Pancake Network

We present a Hamilton cycle in the k-sided pancake network and four comb...
03/02/2022

### On the application of generative adversarial networks for nonlinear modal analysis

Linear modal analysis is a useful and effective tool for the design and ...
11/02/2017

### On the complexity of optimal homotopies

In this article, we provide new structural results and algorithms for th...

## 1 Calculs à la Heinz

As promised, we exhibit some hand calculations.  It is easy to show directly that for permutations and for mappings (see Section 3 of [1]).  More generally, .  Let us compute using Heinz’s algorithm.  From

 p[2,{1,1}] =c1p[1,{1,1}](10)+c2p[0,{1,2}](11) =c21p[0,{1,1}](00)+c2x1=(c21+c2)x,
 p[1,{1,2}]=c1p[0,{1,2}](00)=c1x,
 p[0,{1,3}]=x

we have

 p[3,{0,1}] =c1p[2,{1,1}](20)+c2p[1,{1,2}](21)+c3p[0,{1,3}](22) =c1(c21+c2)x+2c2(c1x)+c3x=(c31+3c1c2+c3)x.

Also, from

 p[2,{0,2}] =c1p[1,{1,2}](10)+c2p[0,{2,2}](11) =c21p[0,{1,2}](00)+c2x2=c21x+c2x2,
 p[1,{0,3}]=c1p[0,{1,3}](00)=c1x,
 p[0,{0,4}]=x0=1

we deduce

 p[4,{0,0}] =c1p[3,{0,1}](30)+c2p[2,{0,2}](31)+c3p[1,{0,3}](32)+c4p[0,{0,4}](33) =c1(c31+3c1c2+c3)x+3c2(c21x+c2x2)+3c3(c1x)+c4 =c4+c1(c31+6c1c2+4c3)x+3c22x2 ={6+15x+3x2for permutations% ,142+87x+27x2for mappings

completing the argument.

It is likewise easy to show that for permutations and for mappings.  More generally, .  Let us compute using Heinz’s algorithm.  From

 q[2,{1,1}] =c1q[1,{1,1}](10)+c2q[0,{1,1}](11) =c21q[0,{1,1}](00)+c2y1=(c21+c2)y,
 q[1,{1,2}]=c1q[0,{1,1}](00)=c1y,
 q[0,{1,3}]=y3

we have

 q[3,{1,∞}] =c1q[2,{1,1}](20)+c2q[1,{1,2}](21)+c3q[0,{1,3}](22) =c1(c21+c2)y+2c2(c1y)+c3y3=(c31+3c1c2)y+c3y3.

Also, from

 q[2,{2,∞}] =c1q[1,{1,2}](10)+c2q[0,{2,2}](11) =c21q[0,{1,1}](00)+c2y2=c21y+c2y2,
 q[1,{3,∞}]=c1q[0,{1,3}](00)=c1y3,
 q[0,{4,∞}]=y0=1

we deduce

 q[4,{∞,∞}] =c1q[3,{1,∞}](30)+c2q[2,{2,∞}](31)+c3q[1,{3,∞}](32)+c4q[0,{4,∞}](33) =c1((c31+3c1c2)y+c3y3)+3c2(c21y+c2y2)+3c3(c1y3)+c4 =c4+c21(c21+6c2)y+3c22y2+4c1c3y3 ={6+7y+3y2+8y3for % permutations,142+19y+27y2+68y3for mappings

completing the argument.

## 2 Modes & Medians

The mode of a continuous distribution is the location of its highest peak; the median is its 50 percentile.  The length of the longest cycle in a random -permutation has cumulative probability

 limn→∞P{Λr

where is the order Dickman function [14]:

 xρ′1(x)+ρ1(x−1)=0 for x>1,ρ1(x)=1 for 0≤x≤1;
 xρ′r(x)+ρr(x−1)=ρr−1(x−1)% for x>1,ρr(x)=1 for 0≤x≤1

and .  For notational simplicity, let us write and .  Observe that should not be confused with a different generalization discussed in [1, 15].

From

 φ′(x)=−φ(x−1)x,x>1

we have

 φ′(1x)=−φ(1x−1)1x,0

hence the density is

 ddxφ(1x)=−xφ(1x−1)(−1x2)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩φ(1x−1)xif 0

Also, from

 φ′′(x)=φ(x−1)x2−φ′(x−1)x=φ(x−1)x2+φ(x−2)x(x−1),x>1

we have

 φ′′(1x)=φ(1x−1)1x2+φ(1x−2)1x(1x−1),0

hence (by the chain rule for second derivatives)

 d2dx2φ(1x) =φ′(1x)2x3+1x4φ′′(1x) =−2φ(1x−1)x2+φ(1x−1)x2+φ(1x−2)x2(1−x) =⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩1x2(1−x)−φ(1x−1)x2>1x(1−x)>0if 1/3

since the first condition implies , i.e., and the second condition implies , i.e., .  Thus is increasing on the left of and is decreasing on the right, which implies that the median size of is .

From

 ψ′(x)=φ(x−1)−ψ(x−1)x,x>2

we have

 φ′(x)−ψ′(x)=−φ(x−1)x−φ(x−1)−ψ(x−1)x=−2φ(x−1)+ψ(x−1)x

(a lemmata needed shortly) and

 ψ′(1x)=φ(1x−1)−ψ(1x−1)1x,0

hence the density is

 ddxψ(1x) =x(φ(1x−1)−ψ(1x−1))(−1x2) =ψ(1x−1)−φ(1x−1)x.

Also, from

 ψ′′(x) =−φ(x−1)−ψ(x−1)x2+φ′(x−1)−ψ′(x−1)x =−φ(x−1)+ψ(x−1)x2+−2φ(x−2)+ψ(x−2)x(x−1)

(by the lemmata) we have

hence (by the chain rule for second derivatives)

 d2dx2ψ(1x) =ψ′(1x)2x3+1x4ψ′′(1x) =φ(1x−1)−ψ(1x−1)1x2x3 +1x4⎡⎢ ⎢ ⎢ ⎢⎣−φ(1x−1)+ψ(1x−1)1x2+−2φ(1x−2)+ψ(1x−2)1x(1x−1)⎤⎥ ⎥ ⎥ ⎥⎦ =φ(1x−1)−ψ(1x−1)x2−2φ(1x−2)−ψ(1x−2)x2(1−x).

There exists a unique for which this expression () vanishes.  Plots of and appear in [16] and confirm that is the modal size of .  Broadhurst [17] obtained an exact equation for , involving Dickman dilogarithms and trilogarithms [18], then applied numerics. We have verified his value by purely floating point methods.

There is comparatively little to say about medians , defined as solutions of [14, 19]

 ρr(1x)=12

except that is well-known and no closed-form representations for , , seem to exist.

## 3 Knuth & Trabb Pardo

An alternative to Heinz’s algorithm is one proposed by Knuth & Trabb Pardo [14] for a restricted case. Define to be the number of -permutations whose longest cycle has nodes [20].  The following recursive formulas apply for :

 u1(k,n)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩k−1∑m=0(n−1)!(n−1−m)!u1(k,n−1−m)if n≥1 and k

and for :

 ur(k,n)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩k−1∑m=0(n−1)!(n−1−m)!ur(k,n−1−m)+n−1∑m=k(n−1)!(n−1−m)!ur−1(k,n−1−m)if n≥1 and k<⌊n/r⌋%,n!if n≥1 and k≥⌊n/r⌋,1otherwise.

Clearly and , hence

 u2(0,4)=u1(0,3)+3u1(0,2)+6u1(0,1)+6u1(0,0)=6.

Also and , hence

 u2(1,4)=u2(1,3)+[3u1(1,2)+6u1(1,1)+6u1(1,0)]=6+15=21.

Finally  The list

 {u2(k,4)}2k=0={6,21,24}={6,6+15,21+3}

conveys the same information as the polynomial did in Section 1, although the underlying calculations differed completely.

A proof is as follows [14].  We may think of as counting permutations on that possess fewer than cycles of length exceeding .  Call such a permutation -good.  Consider now a permutation on .  The node belongs to some cycle within of length .  Let denote the permutation which remains upon exclusion of from .  Suppose ; then is -good iff is -good.  Suppose ; then is -good iff is -good.  Thus the formula

 ur(k,n+1)=k−1∑m=0n!(n−m)!ur(k,n−m)+n∑m=kn!(n−m)!ur−1(k,n−m)

is true because is the number of possible choices for .

An analog of this recursion for mappings remains open, as far as is known.  Finding the number of possible choices for a component containing the node is more complicated than for a cycle containing .  Each component consists of a cycle with trees attached; each tree is rooted at a cyclic point but is otherwise made up of transient points.  We must account for the position of (cyclic or transient?) and the overall configuration (inventory of tree types and sizes?)  It would be helpful to learn about progress in enumerating such or, if this is impractical, some other procedure for moving forward.

## 4 Une conjecture correspondante

Short cycles have always presented more analytical difficulties than long cycles; this paper offers no exception.  Everything in this section is conjectural only.  Define to be the number of -permutations whose shortest cycle has nodes [20].  The following recursive formulas would seem to apply for :

 v1(k,n)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩n!if n≥1 and k=0,n−1∑m=k−1(n−1)!(n−1−m)!v1(k,n−1−m)if n≥1 and 0n,1otherwise

and for :

 vr(k,n)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩n!if n≥0 and k=0,Δr(k,n)+k−2∑m=0(n−1)!(n−1−m)!vr−1(k,n−1−m)+n−1∑m=k−1(n−1)!(n−1−m)!vr(k,n−1−m)if n≥1 and 0

The surprising new term has a simple formula for :

 Δ2(k,n)=(n−1)!Hn−k,wherej∑i=11i=Hj,j∑i=11is=Hj,s

and unexpected recursions for and :

 Δr(k,n)=⎧⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎨⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪⎩12(n−1)!(H2n−1−Hn−1,2)if r=3 and k=1,16(n−1)!(H3n−1−3Hn−1Hn−1,2+2Hn−1,3)%ifr=4 and k=1,Δr(k−1,n)−Δr−1(k,n)n−k+1if k≥2 and n≥k,0otherwise.

The values are unsigned Stirling numbers of the first kind, i.e., the number of -permutations that have exactly cycles.  (Why should these appear here?)

A plausibility argument supporting bears resemblance to the proof underlying .  We may think of as counting permutations on that possess fewer than cycles of length surpassed by .  Call such a permutation -bad.  Let & (of lengths & ) be as before.  Suppose ; then is -bad iff is -bad.  Suppose ; then is -bad iff is -bad.  This would suggest

 vr(k,n+1)=Δr+k−2∑m=0n!(n−m)!vr−1(k,n−m)+n∑m=k−1n!(n−m)!vr(k,n−m)

is true with , but experimental data contradict such an assertion.

Let us illustrate via example, in parallel with Section 3.  As preliminary steps, and , hence

 v1(2,3)=2v1(2,1)+2v1(2,0)=2,v1(3,3)=2v1(3,0)=2.

Clearly .  Also and , hence

 v2(1,2)=Δ2(1,2)+[v2(1,1)+v2(1,0)]=1+0=1,
 v2(1,3)=Δ2(1,3)+[v2(1,2)+2v2(1,1)+2v2(1,0)]=3+1=4,
 v2(1,4)=Δ2(1,4)+[v2(1,3)+3v2(1,2)+6v2(1,1)+6v2(1,0)]=11+7=18.

Finally

 v2(2,4)=Δ2(2,4)+v1(2,3)+[3v2(2,2)+6v2(2,1)+6v2(2,0)]=9+2+0=11,
 v2(3,4)=Δ2(3,4)+[v1(3,3)+3v1(3,2)]+[6v2(3,1)+6v2(3,0)]=6+2+0=8.

Again, the list

 {v2(k,4)}3k=1={18,11,8}={24−6,18−7,11−3=8}

conveys the same information as the polynomial did in Section 1.  Without the nonzero contribution of , our modification of Knuth & Trabb Pardo would yield results incompatible with Heinz.

## 5 Permutations

Here [21] are numerical results for :

1000 0.209685 0.012567 0.2110 0.2350 0.415946 1.095918
1500 0.209650 0.012562 0.2113 0.2353 0.408887 1.117858
2000 0.209633 0.012560 0.2115 0.2350 0.404309 1.131057
2500 0.209623 0.012559 0.2112 0.2352 0.400976 1.140134

Table 5.1: Statistics for Permute, rank two ()

as well as for and for .  Also

 limn→∞Lμn,2n=LG1(2,1)=0.20958087428418581398...,
 limn→∞Lσ2n,2n2=LG1(2,2)−LG1(2,1)2=0.01255379063590587814...,
 limn→∞Lνn,2n=ξ2=0.21172114641298273896...,
 limn→∞Lϑn,2n=x0=0.23503964593509109370...,
 limn→∞Sμn,2ln(n)2=e−γ2=0.28072974178344258491...,
 limn→∞Sσ2n,2nln(n)=SGP(2,2)=1.30720779891056809974....

The final asymptotic is based on [7, 8], not (inaccurate) Theorem 5 in [6].

Here [22] are numerical results for :

1000 0.088357 0.004499 0.0750 0.0010 0.155997 0.450101
1500 0.088344 0.004497 0.0753 0.0007 0.153079 0.468681
2000 0.088337 0.004496 0.0755 0.0005 0.151161 0.480325
2500 0.088333 0.004496 0.0756 0.0004 0.149752 0.488548

Table 5.2: Statistics for Permute, rank three ()

as well as for and for .  Also

 limn→∞Lμn,3n=LG1(3,1)=0.08831609888315363101...,
 limn→∞Lσ2n,3n2=LG1(3,2)−LG1(3,1)2=0.00449392318179080474...,
 limn→∞Lνn,3n=ξ3=0.07584372316630152789...,
 limn→∞Lϑn,3n=0,
 limn→∞Sμn,3ln(n)3=e−γ6=0.09357658059448086163...,
 limn→∞Sσ2n,3nln(n)2=SGP(3,2)=0.65360389945528404987....

The final asymptotic is based on [7, 8].

Here [23] are numerical results for :

1000 0.040353 0.001586 0.0260 0.0010 0.042215 0.118491
1500 0.040351 0.001585 0.0267 0.0007 0.041482 0.126180
2000 0.040349 0.001585 0.0265 0.0005 0.040987 0.131244
2500 0.040348 0.001585 0.0268 0.0004 0.040618 0.134938

Table 5.3: Statistics for Permute, rank four ()

as well as for and for .  Also

 limn→∞Lμn,4n=LG1(4,1)=0.04034198873687046287...,
 limn→∞Lσ2n,4n2=LG1(4,2)−LG1(4,1)2=0.00158383677354017280...,
 limn→∞Lνn,4n=ξ4=0.02713839684981404992...,
 limn→∞Lϑn,4n=0,
 limn→∞Sμn,4ln(n)4=e−γ24=0.02339414514862021540...,
 limn→∞Sσ2n,4nln(n)3=SG