Skip to main content
Log in

Generating alternating permutations lexicographically

  • Part I Computer Science
  • Published:
BIT Numerical Mathematics Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. L. Comtet:Advanced Combinatorics. D. Reidel, 1974.

  2. R. C. Entringer:A combinatorial interpretation of the Euler and Bernoulli numbers. Nieuw Archief voor Wiskunde 14:241–246, 1966.

    Google Scholar 

  3. T. Hough and F. Ruskey:An efficient implementation of the Eades, Hickey, Read adjacent interchange combination generation algorithm. J. Combinat. Math. and Combinat. Computing, 4:79–86, 1988.

    Google Scholar 

  4. A. D. Kalvin and Y. L. Varol:On the generation of all topological sortings. J. Algorithms, 4:150–162, 1983.

    Article  Google Scholar 

  5. R. Kemp:Fundamentals of the Average Case Analysis of Particular Algorithms. Wiley-Teubner, 1984.

  6. D. E. Knuth:Sorting and Searching. Addison-Wesley, 1973.

  7. D. E. Knuth and T. J. Buckholtz:Computing of Tangent, Euler, and Bernoulli numbers. Math. Computation, 21:663–688, 1967.

    Google Scholar 

  8. A. Nijenhuis and H. S. Wilf:Combinatorial Algorithms, 2nd Ed. Academic Press, 1978.

  9. R. J. Ord-Smith:Generation of permutations in lexicographic order (algorithm 323). Comm. ACM, 2:117, 1968.

    Article  Google Scholar 

  10. G. Pruesse and F. Ruskey:Transposition Generation of the Linear Extensions of Certain Posets. Technical Report DCS-91-IR, U. Victoria, 1988.

  11. E. M. Reingold, J. Nievergelt, and N. Deo:Combinatorial Algorithms: Theory and Practice. Prentice-Hall, 1977.

  12. F. Ruskey:Transposition Generation of Alternating Permutations. Technical Report DCS-90-IR. U. Victoria, 1988.

  13. F. Ruskey and A. Proskurowski:Generating binary trees by transpositions. J. Algorithms, to appear.

  14. R. Sedgewick:Permutation generation methods. Computing Surveys, 9:137–164, 1977.

    Article  Google Scholar 

  15. H. S. Wilf:A unified setting for sequencing, ranking and selection algorithms for combinatorial objects. Advances in Math., 24:281–291, 1977.

    Google Scholar 

  16. S. Zaks:Lexicographic generation of ordered trees. Theoretical Computer Science, 10:63–82, 1980.

    Article  Google Scholar 

  17. S. Zaks and D. Richards:Generating trees and other combinatorial objects lexicographically. SIAM J. Computing, 8:73–81, 1979.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

Research supported by the Natural Sciences and Engineering Research Council of Canada under grant A3379.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Bauslaugh, B., Ruskey, F. Generating alternating permutations lexicographically. BIT 30, 17–26 (1990). https://doi.org/10.1007/BF01932127

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01932127

CR Categories

Navigation