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).