An explicit universal cycle for the (n-1)-permutations of an n-set

  • Authors:
  • Frank Ruskey;Aaron Williams

  • Affiliations:
  • University of Victoria, British Columbia, Canada;University of Victoria, British Columbia, Canada

  • Venue:
  • ACM Transactions on Algorithms (TALG)
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

We show how to construct an explicit Hamilton cycle in the directed Cayley graph &Cayrarr;({σn, σn−1}: Sn), where σk is the rotation (1 2 &cdots; k). The existence of such cycles was shown by Jackson [1996] but the proof only shows that a certain directed graph is Eulerian, and Knuth [2005] asks for an explicit construction. We show that a simple recursion describes our Hamilton cycle and that the cycle can be generated by an iterative algorithm that uses O(n) space. Moreover, the algorithm produces each successive edge of the cycle in constant time; such algorithms are said to be loopless. Finally, our Hamilton cycle can be used to construct an explicit universal cycle for the (n−1)-permutations of a n-set, or as the basis of an efficient algorithm for generating every n-permutation of an n-set within a circular array or linked list.