Article ID Journal Published Year Pages File Type
4652062 Electronic Notes in Discrete Mathematics 2013 6 Pages PDF
Abstract

We prove that a stack of pancakes can be rearranged in all possible ways by a greedy process: Flip the maximum number of topmost pancakes that gives a new stack. We also show that the previous Gray code for rearranging pancakes (S. Zaks, A New Algorithm for Generation of Permutations BIT 24 (1984), 196-204) is a greedy process: Flip the minimum number of topmost pancakes that gives a new stack.

Related Topics
Physical Sciences and Engineering Mathematics Discrete Mathematics and Combinatorics