Generating alternating permutations lexicographically |
| |
Authors: | Bruce Bauslaugh Frank Ruskey |
| |
Affiliation: | (1) Department of Computer Science, University of Victoria, V8W 2Y2 Victoria, B.C., Canada;(2) Dept. of Mathematics, Simon Fraser University, V5A 1S6 Burnaby, B.C., Canada |
| |
Abstract: | A permutation 1 2 ... n is alternating if 1<2>3<4 .... We present a constant average-time algorithm for generating all alternating permutations in lexicographic order. Ranking and unranking algorithms are also derived.Research supported by the Natural Sciences and Engineering Research Council of Canada under grant A3379. |
| |
Keywords: | F.2.2 G.2.1 |
本文献已被 SpringerLink 等数据库收录! |
|