title: Creating all binary trees with unique permutations
body: <p>I have a rather silly question which I swear is not homework. For the life of me, I cannot remember whether I ever studied an algorithm to do this, and my mind's eye / creativity is failing me.</p>
  
  <p>I have a list of unique nodes. I need to generate all unique permutations of a binary tree containing these nodes. Chirality, in case you are wondering, matters; a binary tree flipped on its axis (left / right) is not the same. </p>
  
  <p>Some background information, in case you are wondering: it's for a seed creation algorithm for an evolutionary program, so a large number of tiny seeds is fine. </p>
  
  <p><strong>Edit: Clarification of uniqueness</strong></p>
  
  <pre><code>Examples:
  
  This:
    1
   / \
  2   3
  
  Is not the same as this:
    1
   / \
  3   2
  
  Nor is it the same as this:
  
      1
     /
    3
   /
  2   
  
  Nor this:
  
  1
   \
    2
     \
      3
  </code></pre>