Independent Even Cycles in the Pancake Graph and Greedy Prefix-Reversal Gray Codes


The Pancake graph \(P_n,\,n\geqslant 3\), is a Cayley graph on the symmetric group generated by prefix-reversals. It is known that \(P_n\) contains any \(\ell \)-cycle for \(6\leqslant \ell \leqslant n!\). In this paper we construct a family of maximal (covering) sets of even independent (vertex-disjoint) cycles of lengths \(\ell \) bounded by \(O(n^2)\). We present the new concept of prefix-reversal Gray codes based on independent cycles which extends the known greedy prefix-reversal Gray code constructions given by Zaks and Williams. Cases of non-existence of codes based on the presented family of independent cycles are provided using the fastening cycle approach. We also give necessary condition for existence of greedy prefix-reversal Gray codes based on the independent cycles with arbitrary even lengths.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2


  1. 1.

    Gilbert, E.N.: Gray codes and paths on the \(n\)-cube. Bell Syst. Tech. J. 37, 815–826 (1958)

    MathSciNet  Article  Google Scholar 

  2. 2.

    Joichi, J.T., White, D.E., Williamson, S.G.: Combinatorial Gray codes. SIAM J. Comput. 9(1), 130–141 (1980)

    MathSciNet  Article  MATH  Google Scholar 

  3. 3.

    Kanevsky, A., Feng, C.: On the embedding of cycles in Pancake graphs. Parallel Comput. 21, 923–936 (1995)

    MathSciNet  Article  MATH  Google Scholar 

  4. 4.

    Konstantinova, E.V., Medvedev, A.N.: Cycles of length seven in the Pancake graph. Diskretn. Anal. Issled. Oper. 17(5), 46–55 (2010). (in Russian)

    MathSciNet  MATH  Google Scholar 

  5. 5.

    Konstantinova, E., Medvedev, A.: Small cycles in the Pancake graph. Ars Mathematica Contemporanea 7, 237–246 (2014)

    MathSciNet  MATH  Google Scholar 

  6. 6.

    Savage, C.: A survey of combinatorial Gray codes. SIAM Rev. 39, 605–629 (1996)

    MathSciNet  Article  MATH  Google Scholar 

  7. 7.

    Sheu, J.J., Tan, J.J.M., Hsu, L.H., Lin, M.Y.: On the cycle embedding of Pancake graphs. In: Proceedings of 1999 National Computer Symposium, pp. C414–C419 (1999)

  8. 8.

    Sheu, J.J., Tan, J.J.M., Chu, K.T.: Cycle embedding in pancake interconnection networks. In: Proceedings of the 23rd Workshop on Combinatorial Mathematics and Computation Theory in Taiwan, pp. 85–92 (2006)

  9. 9.

    Skiena, S.: Hypercubes, Implementing Discrete Mathematics: Combinatorics and Graph Theory with Mathematica, pp. 148–150. Addison–Wesley, Reading (1990)

    Google Scholar 

  10. 10.

    Williams, A.: The greedy gray code algorithm. LNCS 8037, 525–536 (2013)

    MathSciNet  MATH  Google Scholar 

  11. 11.

    Williams, A., Sawada, J.: Greedy Pancake flipping. Electron. Notes Discrete Math. 44, 357–362 (2013)

    Article  Google Scholar 

  12. 12.

    Zaks, S.: A new algorithm for generation of permutations. BIT 24, 196–204 (1984)

    MathSciNet  Article  MATH  Google Scholar 

Download references

Author information



Corresponding author

Correspondence to Alexey Medvedev.

Additional information

The research was supported by Grant 15-01-05867 of the Russian Foundation of Basic Research and by Grant NSh-1939.2014.1 of President of Russia for Leading Scientific Schools.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Konstantinova, E., Medvedev, A. Independent Even Cycles in the Pancake Graph and Greedy Prefix-Reversal Gray Codes. Graphs and Combinatorics 32, 1965–1978 (2016).

Download citation


  • Pancake graph
  • Pancake sorting
  • Even cycles
  • Disjoint cycle cover
  • Prefix-reversal Gray codes
  • Fastening cycle

Mathematics Subject Classification

  • 05C45
  • 05C25
  • 05C38
  • 90B10