Difference between revisions of "Binary decision diagram"

From ScienceZero
Jump to: navigation, search
Line 8: Line 8:
 
We now have a canonical reduced ordered binary decision diagram. All nodes now represents different functions that all are canonical.
 
We now have a canonical reduced ordered binary decision diagram. All nodes now represents different functions that all are canonical.
  
'''Problem:''' This procedure becomes impossible with more than 5 variables. With 6 variables the truth table alone will be 2^64 bits long!
+
'''Problem:''' This procedure becomes impossible with many variables.
 
+
  
 
'''Solution:''' Build the reduced tree directly from the boolean expression.
 
'''Solution:''' Build the reduced tree directly from the boolean expression.
  
 
'''How:''' To be determined...
 
'''How:''' To be determined...
 +
# Convert the starting boolean expression to conjunctive normal form. CNF can contain are AND, OR, and NOT. The not operator can only be used as part of a literal. ???

Revision as of 17:06, 6 May 2014

  1. Decide order of variables
  2. Create truth table
  3. Create tree from truth table
  4. Merge equivalent leaves - We want two leaves, [ 1 ] and [ 0 ]. Redirect all edges from the removed nodes to the equivalent leave
  5. Merge isomorphic nodes - Remove all nodes that have the same variable and identical children as another node. Redirect all edges that went into the redundant node into the one copy that you kept
  6. Eliminate redundant tests - Remove all nodes that has the same child twice. Redirect all edges into redundant node into the child node
  7. Repeat steps 4 5 6 until no more improvements can be made

We now have a canonical reduced ordered binary decision diagram. All nodes now represents different functions that all are canonical.

Problem: This procedure becomes impossible with many variables.

Solution: Build the reduced tree directly from the boolean expression.

How: To be determined...

  1. Convert the starting boolean expression to conjunctive normal form. CNF can contain are AND, OR, and NOT. The not operator can only be used as part of a literal. ???