
Random Tree Generation
How would one randomly generate mathematical operation trees, specifying both the number of variables, and the complexity of operations? (i.e., you could create a mathematical expression with one variable and one operation, or one variable and a million operations).

I dont understand anything at all , can you give a more concrete example ?

http://www.math.wpi.edu/IQP/BVCalcHist/Image165.gif
What algorithm could I use to generate trees with restrictions upon (a) how many variables are used, and (b) the complexity of the tree (ie, a tree could theoretically only have one variable, no constants, and still be amusingly large)?