Abstract
Algorithms for the uniform random generation of a particular class of formal expressions (containing arithmetical expressions, propositional calculus formulas, tree representations, special algebraic expressions and program structures) are described. “Uniform” means that all non-equivalent expressions of the same size are equiprobable, where equivalence is induced by commutative or associative properties of certain symbols (e.g.“a+b”≡“b+a”). In the special case where no commutative symbols occur, it is shown that the problem can be treated by a modification of Hickey's and Cohen's well known generation algorithm for context-free languages. In order to obtain a speed up in the generation time, a new, parallelizable algorithm is developed, which turns out to be applicable also to the general case (occurrence of commutative symbols).
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.