arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 0901.3119cs.DM
收藏

煎饼排序中的平均翻转次数

Average number of flips in pancake sorting

Josef Cibulka

摘要:

我们得到了一堆不同大小的煎饼,唯一允许的操作是从顶部取几个煎饼并翻转它们。未烧焦的版本要求煎饼在最后按大小排序,而在烧焦的版本中,它们还需要朝向烧焦的一面向下。我们提出了一个算法的平均翻转次数,需要排序一堆n个烧焦的煎饼,等于7 n/4+O(1)和一个随机算法的未烧焦的版本,最多17 n/12+O(1)翻转平均。此外,我们还证明了在烧版中,任何算法的平均翻转次数至少为n+Ω(n/logn),并猜想某些算法可以达到n+Θ(n/logn).我们还稍微增加了g(n)的下限,g(n)是对最差的n个烧焦的煎饼堆进行排序所需的最小翻转次数。这个上界和Heydari和Sudborough在1997年发现的上界一起给出了对先前证明的最差堆栈I_n(n=3 mod 4且n>=15)进行排序所需的翻转次数。最后给出了n=19时f(n)和n=17时g(n)的精确值,并证明了n= 15时烧堆- I_{15}不是最差的,从而反驳了Cohen和Blum的一个猜想.

英文摘要:

We are given a stack of pancakes of different sizes and the only allowed operation is to take several pancakes from top and flip them. The unburnt version requires the pancakes to be sorted by their sizes at the end, while in the burnt version they additionally need to be oriented burnt-side down. We present an algorithm with the average number of flips, needed to sort a stack of n burnt pancakes, equal to 7n/4+O(1) and a randomized algorithm for the unburnt version with at most 17n/12+O(1) flips on average. In addition, we show that in the burnt version, the average number of flips of any algorithm is at least n+Ω(n/log n) and conjecture that some algorithm can reach n+Θ(n/log n). We also slightly increase the lower bound on g(n), the minimum number of flips needed to sort the worst stack of n burnt pancakes. This bound, together with the upper bound found by Heydari and Sudborough in 1997, gives the exact number of flips to sort the previously conjectured worst stack -I_n for n=3 mod 4 and n>=15. Finally we present exact values of f(n) up to n=19 and of g(n) up to n=17 and disprove a conjecture of Cohen and Blum by showing that the burnt stack -I_{15} is not the worst one for n=15.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑