I have several different types of tree nodes, each of which may have anywhere from 0 to 5 children. I\'m trying to figure out an algorithm to generate all possible trees of
http://books.google.co.uk/books?id=56LNfE2QGtYC&pg=PA23&lpg=PA23&dq=hansel%27s+algorithm&source=bl&ots=vMbfFj-iZi&sig=E0cI5XhVZ3q1Lg9eAJ_1zYQm53U&hl=en&ei=8udlStuKJ8ehjAfJ1ZSUAQ&sa=X&oi=book_result&ct=result&resnum=1