Generating Alternating Permutations Lexicographically

Bruce Bauslaugh, Department of Computer Science, University of Victoria, Canada.
Frank Ruskey, Department of Computer Science, University of Victoria, Canada.

Abstract:

A permutation p1 p2 ... pn is alternating if p1 < p2 > p3 < p4 ...     We present a constant average-time algorithm for generating all alternating permutations in lexicographic order. Ranking and unranking algorithms are also derived.


Selected Publications that refer to this paper:
Back to list of publications.