Randomly generating structured objects is important in testing and optimizing functional programs, whereas generating random @math -terms is more specifically needed for testing and optimizing compilers. For that a tool called QuickCheck has been proposed, but in this tool the control of the random generation is left to the programmer. Ten years ago, a method called Boltzmann samplers has been proposed to generate combinatorial structures. In this paper, we show how Boltzmann samplers can be developed to generate lambda-terms, but also other data structures like trees. These samplers rely on a critical value which parameters the main random selector and which is exhibited here with explanations on how it is computed. Haskell programs are proposed to show how samplers are actually implemented.
In the introduction we cited papers that are clearly connected to this work. In a recent work, @cite_5 propose an improved random generation of binary trees and Motzkin trees, based on R ' e my algorithm @cite_22 (or algorithm R as Knuth calls it @cite_14 ). Instead of growing the trees from the root, they propose like R ' e my to grow the trees from inside by an operation called grafting. It is not clear how this can be generalized to @math -terms as this requires to find a combinatorial interpretation for the holonomic equations [which] is not [...] always possible, and even for simple combinatorial objects this is not elementary'' (Conclusion of @cite_5 page 16).
@cite_5 @cite_14 @cite_22
2108643443 1968399077 2545825365 2099601775
We present a replanning algorithm for repairing rapidly-exploring random trees when changes are made to the configuration space. Instead of abandoning the current RRT, our algorithm efficiently removes just the newly-invalid parts and maintains the rest. It then grows the resulting tree until a new solution is found. We use this algorithm to create a probabilistic analog to the widely-used D* family of deterministic algorithms, and demonstrate its effectiveness in a multirobot planning domain We study distorted metrics on binary trees in the context of phylogenetic reconstruction. Given a binary tree T on n leaves with a path metric d, consider the pairwise distances d(u,v) between leaves. It is well known that these determine the tree and the d length of all edges. Here, we consider distortions @math of d such that, for all leaves u and v, it holds that @math if either d(u,v)< M + f 2 or @math , where d satisfies f ≤ d(e) ≤ g for all edges e. Given such distortions, we show how to reconstruct in polynomial time a forest T1, ... ,Tα such that the true tree T may be obtained from that forest by adding α-1 edges and α-1 ≤ 2-Ω(M g) n. Our distorted metric result implies a reconstruction algorithm of phylogenetic forests with a small number of trees from sequences of length logarithmic in the number of species. The reconstruction algorithm is applicable for the general Markov model. Both the distorted metric result and its applications to phylogeny are almost tight. Consider a uniform random rooted tree on vertices labelled by @math , with edges directed towards the root. We imagine that each node of the tree has space for a single car to park. A number @math of cars arrive one by one, each at a node chosen independently and uniformly at random. If a car arrives at a space which is already occupied, it follows the unique path oriented towards the root until it encounters an empty space, in which case it parks there; if there is no empty space, it leaves the tree. Consider @math and let @math denote the event that all @math cars find spaces in the tree. Lackner and Panholzer proved (via analytic combinatorics methods) that there is a phase transition in this model. Then if @math , we have @math , whereas if @math we have @math . We give a probabilistic explanation for this phenomenon, and an alternative proof via the objective method. Along the way, we are led to consider the following variant of the problem: take the tree to be the family tree of a Galton-Watson branching process with Poisson(1) offspring distribution, and let an independent Poisson( @math ) number of cars arrive at each vertex. Let @math be the number of cars which visit the root of the tree. Then for @math , we have @math , whereas for @math , we have @math . This discontinuous phase transition turns out to be a generic phenomenon in settings with an arbitrary offspring distribution of mean at least 1 for the tree and arbitrary arrival distribution. We prove the existence of a polynomial time computable pseudorandom generator that @math -fools constant width regular read-once branching programs of length @math using a seed of length @math . The previous best pseudorandom generator for regular branching programs used a seed of length @math , and was due to Braverman et. al. and Brody and Verbin (FOCS 2010). Our pseudorandom generator is the INW generator due to Impagliazzo et. al. (STOC 1994). Our work shares some similarity with the recent work of Kouck ' y et. al. (STOC 2011)who get similar seed length for permutation branching programs. However, our work proceeds by analyzing the eigenvalues of the stochastic matrices that arise in the transitions of the branching program which arguably makes the technique more robust. As a corollary of our techniques, we present new results on the small biased spaces for group products'' problem by Meka and Zuckerman (RANDOM 2009). We get a pseudorandom generator with seed length @math . Previously, using the result of Kouck ' y et. al., it was possible to get a seed length of @math for this problem.