BIT Numerical Mathematics

, Volume 30, Issue 1, pp 17–26

Generating alternating permutations lexicographically

  • Bruce Bauslaugh
  • Frank Ruskey
Part I Computer Science

DOI: 10.1007/BF01932127

Cite this article as:
Bauslaugh, B. & Ruskey, F. BIT (1990) 30: 17. doi:10.1007/BF01932127

Abstract

A permutation π1 π2 ... πn is alternating if π1234 .... We present a constant average-time algorithm for generating all alternating permutations in lexicographic order. Ranking and unranking algorithms are also derived.

CR Categories

F.2.2G.2.1

Copyright information

© BIT Foundations 1990

Authors and Affiliations

  • Bruce Bauslaugh
    • 1
    • 2
  • Frank Ruskey
    • 1
  1. 1.Department of Computer ScienceUniversity of VictoriaVictoriaCanada
  2. 2.Dept. of MathematicsSimon Fraser UniversityBurnabyCanada