12,581 research outputs found
Boltzmann samplers for random generation of lambda terms
Randomly generating structured objects is important in testing and optimizing
functional programs, whereas generating random -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
Slices, slabs, and sections of the unit hypercube
Using combinatorial methods, we derive several formulas for the volume of
convex bodies obtained by intersecting a unit hypercube with a halfspace, or
with a hyperplane of codimension 1, or with a flat defined by two parallel
hyperplanes. We also describe some of the history of these problems, dating to
Polya's Ph.D. thesis, and we discuss several applications of these formulas.Comment: 11 pages; minor corrections to reference
Software for Exact Integration of Polynomials over Polyhedra
We are interested in the fast computation of the exact value of integrals of
polynomial functions over convex polyhedra. We present speed ups and extensions
of the algorithms presented in previous work. We present the new software
implementation and provide benchmark computations. The computation of integrals
of polynomials over polyhedral regions has many applications; here we
demonstrate our algorithmic tools solving a challenge from combinatorial voting
theory.Comment: Major updat
Counting magic squares in quasi-polynomial time
We present a randomized algorithm, which, given positive integers n and t and
a real number 0< epsilon <1, computes the number Sigma(n, t) of n x n
non-negative integer matrices (magic squares) with the row and column sums
equal to t within relative error epsilon. The computational complexity of the
algorithm is polynomial in 1/epsilon and quasi-polynomial in N=nt, that is, of
the order N^{log N}. A simplified version of the algorithm works in time
polynomial in 1/epsilon and N and estimates Sigma(n,t) within a factor of
N^{log N}. This simplified version has been implemented. We present results of
the implementation, state some conjectures, and discuss possible
generalizations.Comment: 30 page
- …