首页 | 本学科首页   官方微博 | 高级检索  
     


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 pgr1 pgr2 ... pgrn is alternating if pgr1<pgr2>pgr3<pgr4 .... 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 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号