title: How to create alternative graphs automatically?
body: <p>Graphs are useful tools to represent some pipe of processes. For example, there are methods to create a graph according to the set of calculations. For example, compilers take instructions and converted them to a graph to optimize code size and speed.
  Is there any way to create alternative graphs by defining one of the possibilities?</p>
  <p>I mean that the order of the process is not important sometimes. In this case, several graphs represent the same process in a different order. For example, the first graph is the same as the second graph.</p>
  <pre><code>    DIV
       /\
      /  \
     a    \
           \
           MUL
           / \
          /   \
         /     \
       MUL   SHIFT
       /\      /\
     MUL b    c  d
     / \
    e   f
  
    a/((e*f)*b*(c&lt;&lt;d))
  
  </code></pre>
  <pre><code>    DIV
       /\
      /  \
     a    \
           \
           MUL
           / \
          /   \
         /     \
       MUL    MUL
       /\      /\
      /  \    /  \
     e    b  f  SHIFT
                 / \
                c   d
      
  a/((e*b)*(f*(c&lt;&lt;d)))
  
  </code></pre>
  <p>In these two graphs, processes are the same with different representations. Can I create all the possible graphs automatically by defining the rules for each process?</p>