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

9 months ago
  1. \begin{center}
  2. \begin{forest}
  3. for tree={circle, draw, no edge,
  4. minimum size=2em,
  5. inner sep=0pt,
  6. s sep=2mm,
  7. l sep=4mm}
  8. [$f$, rectangle, draw, tikz={\draw [line] () to (a.north);}
  9. [$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);}
  10. [$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);}
  11. [$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);}
  12. [,phantom]
  13. [$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);}
  14. [$1$, rectangle, draw, name=one]
  15. [$0$, rectangle, draw, name=zero]
  16. ]
  17. ]
  18. ]
  19. [$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);}
  20. [,phantom]
  21. [$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);
  22. }
  23. [,phantom]
  24. [,phantom]
  25. ]
  26. ]
  27. ]
  28. ]
  29. \end{forest}
  30. \end{center}
  31. A binary decision diagram represents a Boolean formula $f$. It is a DAG with two terminal nodes that are
  32. labelled with 0 and 1. The internal nodes are labelled with the Boolean variables
  33. of the formula (here a, b, c, d and e). Each internal node has exactly two outgoing
  34. edges: one edge labeled with a T (the then-edge), and another edge that
  35. is labeled with an E (the else-edge) or marked with a circle. There is a unique
  36. 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
  37. level.