[edit] Summary
| Description |
Visualization of the BDD for the Boolean formula x1 * x2 + x3 * x4 + ... + x19 * x20 using a bad variable ordering (x1,x3,x5,x7,x9,x11,x13,x15,x17,x19,x2,x4,x6,x8,x10,x12,x14,x16,x18,x20). One pixel in the picture corresponds to one BDD node, all nodes of one variable are represented by one line (level), and the number of nodes for that variable by the width of the line. The variables with the most nodes are x19 and x2 with 512 nodes each, i.e., the width of the picture is 512 pixels (x1:1, x3:2, x5:4, x7:8, x9:16, x11:32, x13:64, x15:128, x17:256, x19:512, x2:512, x4:256, x6:128, x8:64, x10:32, x12:16, x14:8, x16:4, x18:2, x20:1).
|
| Source |
self-made using CrocoPat, a tool for relational programming, and VisuBDD, a small Java program
|
| Date |
2005-09-01
|
| Author |
Dirk Beyer
|
Permission
(Reusing this image) |
GFDL and cc-by-sa-2.5
|
The PNG picture is 518 x 32 pixel.
Other BDD pictures for similar formulas:
BDD graph for the Boolean formula x1 * x2 + x3 * x4 + x5 * x6 + x7 * x8 using a good variable ordering
|
BDD graph for the Boolean formula x1 * x2 + x3 * x4 + x5 * x6 + x7 * x8 using a bad variable ordering
|
The following is the RML (Relational Manipulation Language) code that I fed to CrocoPat to produce the dat files for VisuBDD:
// RML program to generate BDD visualizations for the formula
// x1 & x2 | x3 & x4 | ... | x19 & x20,
// using two different variable orderings.
// "crocopat -e BDD_Variable_Ordering_VisuBDD.rml"
// generates two files in dat format.
// "java -classpath <your_CrocoPat_dir>
// VisuBDD.VisualizeSize BDD_Variable_Ordering_VisuBDD_Bad.dat"
// displays a visualization of the BDD graph on screen.
// There are two ('Boolean') values for the variables x1, ..., x20.
DOM("0");
DOM("1");
// F is the name of the Boolean formula.
F(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20) :=
(x1="1" & x2="1")
| (x3="1" & x4="1")
| (x5="1" & x6="1")
| (x7="1" & x8="1")
| (x9="1" & x10="1")
| (x11="1" & x12="1")
| (x13="1" & x14="1")
| (x15="1" & x16="1")
| (x17="1" & x18="1")
| (x19="1" & x20="1");
// Prints the number of nodes per variable in dat format for VisuBDD,
// using a good variable ordering resulting in linear size of the graph.
PRINT NODESPERVAR( F(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20) )
TO "BDD_Variable_Ordering_VisuBDD_Good.dat";
// Prints the number of nodes per variable in dat format for VisuBDD,
// using a bad variable ordering resulting in exponential size of the graph.
// The first term of the conjunction sets the variable ordering.
PRINT NODESPERVAR( TRUE(x1,x3,x5,x7,x9,x11,x13,x15,x17,x19,x2,x4,x6,x8,x10,x12,x14,x16,x18,x20) &
F(x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20) )
TO "BDD_Variable_Ordering_VisuBDD_Bad.dat";;
[edit] Licensing
|
I, the copyright holder of this work, hereby publish it under the following licenses:
You may select the license of your choice.
|
Click on a date/time to view the file as it appeared at that time.
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):