We present a new uniform random sampler for binary trees with n internal nodes consuming 2n + Θ(log(n) 2 ) random bits on average. This makes it quasi-optimal and out-performs the classical Remy algorithm. We also present a sampler for unary-binary trees with n nodes taking Θ(n) random bits on average. Both are the first linear-time algorithms to be optimal up to a constant.
Boltzmann samplers are a kind of random samplers; in 2004, Duchon, Flajolet, Louchard and Schaeffer showed that given a combinatorial class and a combinatorial specification for that class, one can automatically build a Boltzmann sampler. In this paper, we introduce a Boltzmann sampler for Motzkin trees built from a holonomic specification, that is, a specification that uses the pointing operator. This sampler is inspired by Rémy's algorithm on binary trees. We show that our algorithm gives an exact size sampler with a linear time and space complexity in average. IntroductionTrees are certainly among the most classical objects of computer science and also a central object of study in analytic combinatorics. In this paper, we are interested in the difficult question of the efficient random generation of trees.The class of binary planar trees, or Catalan trees, is perhaps the simplest class of trees. The number of Catalan trees with 2n + 1 nodes is the n-th Catalan number, that we denote by C n . Rémy's algorithm [11,10] gives an efficient way to uniformly sample a binary planar tree (Catalan tree) of a given size. It is based on the following recurrence on the Catalan numbers:
International audienceWe introduce the notion of pattern in the context of lattice paths, and investigate it in the specific case of Dyck paths. Similarly to the case of permutations, the pattern-containment relation defines a poset structure on the set of all Dyck paths, which we call the Dyck pattern poset . Given a Dyck path PP, we determine a formula for the number of Dyck paths covered by PP, as well as for the number of Dyck paths covering PP. We then address some typical pattern-avoidance issues, enumerating some classes of pattern-avoiding Dyck paths. We also compute the generating function of Dyck paths avoiding any single pattern in a recursive fashion, from which we deduce the exact enumeration of such a class of paths. Finally, we describe the asymptotic behavior of the sequence counting Dyck paths avoiding a generic pattern, we prove that the Dyck pattern poset is a well-ordering and we propose a list of open problems
In this article we develop a vectorial kernel method-a powerful method which solves in a unified framework all the problems related to the enumeration of words generated by a pushdown automaton. We apply it for the enumeration of lattice paths that avoid a fixed word (a pattern), or for counting the occurrences of a given pattern. We unify results from numerous articles concerning patterns like peaks, valleys, humps, etc., in Dyck and Motzkin paths. This refines the study by Banderier and Flajolet from 2002 on enumeration and asymptotics of lattice paths: we extend here their results to pattern-avoiding walks/bridges/meanders/excursions. We show that the autocorrelation polynomial of this forbidden pattern, as introduced by Guibas and Odlyzko in 1981 in the context of rational languages, still plays a crucial role for our algebraic languages. En passant, our results give the enumeration of some classes of self-avoiding walks, and prove several conjectures from the On-Line Encyclopedia of Integer Sequences. Finally, we also give the trivariate generating function (length, final altitude, number of occurrences of the pattern p), and we prove that the number of occurrences is normally distributed and linear with respect to the length of the walk: this is what Flajolet and Sedgewick call an instance of Borges's theorem. Keywords Lattice paths • Dyck paths • Motzkin paths • Łukasiewicz paths • Pattern avoidance • Autocorrelation • Finite automata • Markov chains • Pushdown automata • Generating functions • Wiener-Hopf factorization • Kernel method • Asymptotic analysis • Gaussian limit law • Borges' theorem We dedicate this article to the memory of Philippe Flajolet, our cheerful and inspiring mentor, founder of analytic combinatorics.
International audience We continue the investigations of lattice walks in the three-dimensional lattice restricted to the positive octant. We separate models which clearly have a D-finite generating function from models for which there is no reason to expect that their generating function is D-finite, and we isolate a small set of models whose nature remains unclear and requires further investigation. For these, we give some experimental results about their asymptotic behaviour, based on the inspection of a large number of initial terms. At least for some of them, the guessed asymptotic form seems to tip the balance towards non-D-finiteness.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.
hi@scite.ai
10624 S. Eastern Ave., Ste. A-614
Henderson, NV 89052, USA
Copyright © 2024 scite LLC. All rights reserved.
Made with 💙 for researchers
Part of the Research Solutions Family.