Author/Authors :
David S. Cohen، نويسنده , , Manuel Blum، نويسنده ,
Abstract :
The “pancake problem” is a well-known open combinatorial problem that recently has been shown to have applications to parallel processing. Given a stack of n pancakes in arbitrary order, all of different sizes, the goal is to sort them into the size-ordered configuration having the largest pancake on the bottom and the smallest on top. The allowed sorting operation is a “spatula flip”, in which a spatula is inserted beneath any pancake, and all pancakes above the spatula are lifted and replaced in reverse order. The problem is to bound f(n), the minimum number of flips required in the worst case to sort a stack of n pancakes. Equivalently, we seek bounds on the number of prefix reversals necessary to sort a list of n elements. Bounds of 17n16 and (5n + 5)3 were shown by Gates and Papadimitriou in 1979. In this paper, we consider a traditional variation of the problem in which the pancakes are two sided (one side is “burnt”), and must be sorted to the size-ordered configuration in which every pancake has its burnt side down. Let g(n) be the number of flips required to sort n “burnt pancakes”. We find that 3n2 ⩽ g(n) ⩽ 2n − 2, where the upper bound holds for n ⩾ 10. We consider the conjecture that the most difficult case for sorting n burnt pancakes is −In, the configuration having the pancakes in proper size order, but in which each individual pancake is upside down. We present an algorithm for sorting −In in 23n14 + c flips, where c is a small constant, thereby establishing a bound of g(n) ⩽ 23n14 + c under the conjecture. Furthermore, the longstanding upper bound of f(n) is also improved to 23n14 + c under the conjecture.