You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
2.2 KiB
38 lines
2.2 KiB
\begin{center}
|
|
\begin{forest}
|
|
for tree={circle, draw, no edge,
|
|
minimum size=2em,
|
|
inner sep=0pt,
|
|
s sep=2mm,
|
|
l sep=4mm}
|
|
[$f$, rectangle, draw, tikz={\draw [line] () to (a.north);}
|
|
[$a$, name=a, tikz={\draw [line] () to node[pos=.7, above] {\scriptsize T \;} (b.north east); \draw [dot=.5] () to node[pos=.5, above] {\; \scriptsize E} (c2.north west);}
|
|
[$b$, name=b, tikz={\draw [dot=.5, bend left] () to node[pos=.5, right] {\scriptsize E \;} (c1.north east); \draw [line, bend right] () to node[pos=.5, left] {\; \scriptsize T} (c1.north west);}
|
|
[$c$, name=c1, s sep=20mm, tikz={\draw [line] () to node[pos=.7, left] {\scriptsize T \;} (one.north); \draw [dot=.5] () to node[pos=.5, above] {\; \scriptsize E} (e.north west);}
|
|
[,phantom]
|
|
[$e$, name=e, s sep=10mm, tikz={\draw [line, bend left] () to node[pos=.7, above] {\scriptsize T \;} (one.north east); \draw [dot=.5, bend left] () to node[pos=.2, below] {\; \scriptsize E} (one.east);}
|
|
[$1$, rectangle, draw, name=one]
|
|
[$0$, rectangle, draw, name=zero]
|
|
]
|
|
]
|
|
]
|
|
[$c$, name=c2, tikz={\draw [line, bend right] () to node[pos=.3, above] {\scriptsize T \;} (e.north); \draw [dot=.5, bend left] () to node[pos=.5, above] {\; \scriptsize E} (d.north);}
|
|
[,phantom]
|
|
[$d$, name=d, tikz={\draw [line] () to node[pos=.7, above] {\scriptsize T \;} (e.north east); \draw[dot=.5] () to node[pos=.3, below] {\; \scriptsize E} (zero.north);
|
|
}
|
|
[,phantom]
|
|
[,phantom]
|
|
]
|
|
]
|
|
]
|
|
]
|
|
\end{forest}
|
|
\end{center}
|
|
|
|
A binary decision diagram represents a Boolean formula $f$. It is a DAG with two terminal nodes that are
|
|
labelled with 0 and 1. The internal nodes are labelled with the Boolean variables
|
|
of the formula (here a, b, c, d and e). Each internal node has exactly two outgoing
|
|
edges: one edge labeled with a T (the then-edge), and another edge that
|
|
is labeled with an E (the else-edge) or marked with a circle. There is a unique
|
|
initial node called the function node labeled with $f$ that does not have any incoming edges and one outgoing edge to the internal variable node on the first
|
|
level.
|