21 research outputs found
Centre for Discrete Mathematics and Theoretical Computer Science Fast Generation of Fibonacci Permutations
In 1985, Simion and Schmidt showed that |Sn(τ3)|, the cardinality of the set of all length n permutations avoiding the patterns τ3 = {123, 213, 132} is the Fibonacci numbers, fn+1. They also developed a constructive bijection between the set of all binary strings with no two consecutive ones and Sn(τ3). In May 2004, Egge and Mansour generalized this Simion-Schmidt counting result and showed that, Sn(τp), the set of permutations avoiding the patterns τp = {12...p, 213, 132} is counted by the (p − 1)-generalized Fibonacci numbers, f (p−1) n+1. The Simion-Schmidt’s set of binary strings is F (2) n−1, the well known Fibonacci strings, which is a special case of F (p) n, p-generalized Fibonacci strings having no p − 1 consecutive ones. In May 2001, Vajnovszki proposed a loopless algorithm for generating F (p) n, a Gray code for F (p) n. This algorithm has a constant worst case time while the Hamming distance between any two consecutive strings in F (p) n is one. In this paper we formalize and generalize the Simion-Schmidt bijection so that the new and Sn(τp), and we show that, Sn(τp), the image of the bijection now is between F (p−1) n−1 ordered list F (p) n through this generalized bijection is a list for all length n permutations avoiding the patterns τp = {12...p, 213, 132} with the Hamming distance between any two consecutive permutations bounded by (p−1), and so a Gray code for Sn(τp). We also propose a loopless algorithm, which is a modification of Vajnovszki’s algorithm, and which generates Sn(τp) also in constant worst case time. Keywords: Pattern(s) avoiding permutations, Fibonacci numbers, generalized Fibonacci strings, Gray codes, continuous discrete bijections.
COMBINATORIAL GRAY CODES FOR CLASSES OF PATTERN AVOIDING PERMUTATIONS
Abstract. The past decade has seen a flurry of research into pattern avoiding permutations but little of it is concerned with their exhaustive generation. Many applications call for exhaustive generation of permutations subject to various constraints or imposing a particular generating order. In this paper we present generating algorithms and combinatorial Gray codes for several families of pattern avoiding permutations. Among the families under consideration are those counted by Catalan, large Schröder, Pell, even-index Fibonacci numbers and the central binomial coefficients. We thus provide Gray codes for the set of all permutations of {1,..., n} avoiding the pattern τ for all τ ∈ S3 and the Gray codes we obtain have distances 4 or 5. 1