<p>We discuss some combinatorics associated with 1-away permutations, where an element can be displaced from its correct position by at most one location. Specifically, we look at a sorting algorithm for such permutations and analyze its number of comparisons, <InlineEquation ID="IEq1"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="10_2024_1146_Article_IEq1.gif" Format="GIF" Height="16" Rendition="HTML" Resolution="72" Type="Linedraw" Width="22" /> </InlineMediaObject> <EquationSource Format="TEX">\(C_n\)</EquationSource> <EquationSource Format="MATHML"><math> <msub> <mi>C</mi> <mi>n</mi> </msub> </math></EquationSource> </InlineEquation>. We find that the mean is a certain combination of two-fold convolutions of Fibonacci numbers and the variance is a certain combination of three-fold convolutions of Fibonacci numbers, with corresponding asymptotics (as <InlineEquation ID="IEq2"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="10_2024_1146_Article_IEq2.gif" Format="GIF" Height="10" Rendition="HTML" Resolution="72" Type="Linedraw" Width="58" /> </InlineMediaObject> <EquationSource Format="TEX">\(n\rightarrow \infty \)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>n</mi> <mo stretchy="false">→</mo> <mi>∞</mi> </mrow> </math></EquationSource> </InlineEquation>): <Equation ID="Equ6"> <MediaObject> <ImageObject Color="BlackWhite" FileRef="10_2024_1146_Article_Equ6.gif" Format="GIF" Height="40" Rendition="HTML" Resolution="72" Type="Linedraw" Width="286" /> </MediaObject> <EquationSource Format="TEX">\({\mathbb {E}}[C_n] \sim \frac{5 + \sqrt{5}}{10}\, n, \qquad {\mathbb {V}\textrm{ar}}[C_n]\sim \frac{\sqrt{5}}{25} \, n.\)</EquationSource> <EquationSource Format="MATHML"><math display="block"> <mrow> <mi mathvariant="double-struck">E</mi> <mrow> <mo stretchy="false">[</mo> <msub> <mi>C</mi> <mi>n</mi> </msub> <mo stretchy="false">]</mo> </mrow> <mo>∼</mo> <mfrac> <mrow> <mn>5</mn> <mo>+</mo> <msqrt> <mn>5</mn> </msqrt> </mrow> <mn>10</mn> </mfrac> <mspace width="0.166667em" /> <mi>n</mi> <mo>,</mo> <mspace width="2em" /> <mrow> <mi mathvariant="double-struck">V</mi> <mtext>ar</mtext> </mrow> <mrow> <mo stretchy="false">[</mo> <msub> <mi>C</mi> <mi>n</mi> </msub> <mo stretchy="false">]</mo> </mrow> <mo>∼</mo> <mfrac> <msqrt> <mn>5</mn> </msqrt> <mn>25</mn> </mfrac> <mspace width="0.166667em" /> <mi>n</mi> <mo>.</mo> </mrow> </math></EquationSource> </Equation>The proofs contain finer asymptotics down to exponentially small error terms. The relatively small variance admits a weak law and a central limit theorem via a super moment generating function. In view of the special nature of the data, such a specialized algorithm outperforms general comparison-based sorting algorithms.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Sorting 1-away permutations with underlying Fibonacci convolutions

  • Hosam Mahmoud

摘要

We discuss some combinatorics associated with 1-away permutations, where an element can be displaced from its correct position by at most one location. Specifically, we look at a sorting algorithm for such permutations and analyze its number of comparisons, \(C_n\) C n . We find that the mean is a certain combination of two-fold convolutions of Fibonacci numbers and the variance is a certain combination of three-fold convolutions of Fibonacci numbers, with corresponding asymptotics (as \(n\rightarrow \infty \) n ): \({\mathbb {E}}[C_n] \sim \frac{5 + \sqrt{5}}{10}\, n, \qquad {\mathbb {V}\textrm{ar}}[C_n]\sim \frac{\sqrt{5}}{25} \, n.\) E [ C n ] 5 + 5 10 n , V ar [ C n ] 5 25 n . The proofs contain finer asymptotics down to exponentially small error terms. The relatively small variance admits a weak law and a central limit theorem via a super moment generating function. In view of the special nature of the data, such a specialized algorithm outperforms general comparison-based sorting algorithms.