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.

49 lines
2.1 KiB

5 months ago
  1. \begin{minipage}{0.5\textwidth}
  2. \begin{tabbing}
  3. $f$ \= $= (p \leftrightarrow q) \land (r \leftrightarrow s)$\\
  4. \>$ f_r $ \= $= (p \leftrightarrow q) \land s$ \\
  5. \>\>$ f_{rs} $ \= $= (p \leftrightarrow q)$ \\
  6. \>\>\>$ f_{rsp} $ \= $= q$ \\
  7. \>\>\>\>$ f_{rspq} $ \= $= \top$ \\
  8. \>\>\>\>$ f_{rsp \lnot q} $ \= $= \bot$ \\
  9. \>\>\>$ f_{rs \lnot p} $ \= $= \lnot q = \lnot f_{rsp}$ \\
  10. \>\>$ f_{r \lnot s} $ \= $= \bot$ \\
  11. \>$ f_{\lnot r} = (p \leftrightarrow q) \land \lnot s$ \\
  12. \>\>$ f_{\lnot rs} $ \= $= \bot$ \\
  13. \>\>$ f_{\lnot r \lnot s} $ \= $= (p \leftrightarrow q) = f_{rs}$ \\
  14. \end{tabbing}
  15. \end{minipage}
  16. \begin{minipage}{0.5\textwidth}
  17. The final ROBDD:
  18. \begin{center}
  19. \begin{forest}
  20. for tree={circle, draw, no edge,
  21. minimum size=2em,
  22. inner sep=0pt,
  23. s sep=6mm,
  24. l sep=6mm}
  25. [$f$, rectangle, draw, tikz={\draw [line] () to (r.north);}
  26. [$f_r$, rectangle, draw, tikz={\draw [line] () to (s1.north west);}]
  27. [$r$, name=r, tikz={\draw [line] () to (s1.north); \draw [fulldot=.5] () to (s2.north);}
  28. [$f_{\lnot r \lnot s}$, rectangle, draw, tikz={\draw [line] () to (p.north west);}]
  29. [$f_{rs}$ , rectangle, draw, tikz={\draw [line] () to (p.north west);}]
  30. [$s$, name=s1, tikz={\draw [line] () to (p.north); \draw [fulldot=.5] () to (-0.2, -3.5);}
  31. [$f_{\lnot rsp}$, rectangle, draw, tikz={\draw [line] () to (q.north west);}]
  32. [$p$, name=p, tikz={\draw [line, bend right=14] () to (q.north); \draw [fulldot=.5, bend left=14] () to (q.north east);}
  33. [$q$, name=q, tikz={\draw [line] () to (-2.3, -6.2); \draw [fulldot=.5] () to (-1.5, -6.2);}
  34. ]
  35. [,phantom]
  36. ]
  37. [,phantom]
  38. [,phantom]
  39. ]
  40. [$s$, name=s2, tikz={\draw [line] () to (0.2,-3.5); \draw [fulldot=.5, bend left=70] () to (p.east);}]
  41. [,phantom]
  42. [,phantom]
  43. ]
  44. [$f_{\lnot r}$, rectangle, draw, tikz={\draw [fulldot=.5] () to (s2.north east);}]
  45. ]
  46. \end{forest}
  47. \end{center}
  48. \end{minipage}