Permutations generated by a depth 2 and infinite stack in series are algebraic
Abstract
We prove that the class of permutations generated by passing an ordered sequence 12… n through a stack of depth 2 and an infinite stack in series is in bijection with an unambiguous context-free language, where a permutation of length n is encoded by a string of length 3n. It follows that the sequence counting the number of permutations of each length has an algebraic generating function. We use the explicit context-free language to compute the generating function: align* Σn≥ 0 cn tn &= (1+q)(1+5q-q2-q3-(1-q)(1-q2)(1-4q-q2))8q align* where cn is the number of permutations of length n that can be generated, and q q(t) = 1-2t-1-4t2t is a simple variant of the Catalan generating function. This in turn implies that cn1/n 2+25.
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.