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.

57 lines
1.8 KiB

9 months ago
  1. $$f = (r \land \lnot p) \lor (r \land \lnot p) \lor (s \land \lnot r) \lor (\lnot s \land r)\lor (r \land q),$$
  2. \begin{cofactors}
  3. $f_{p}$ \= $= \lnot r \lor(s \land \lnot r) \lor (\lnot s \land r) \lor (r \land q)$ \\
  4. \>$f_{pq}$ \= $= \true$\\
  5. \>$f_{p\lnot q}$ \= $= r \lor (s \land \lnot r) \lor (\lnot s \land r)$\\
  6. \>\>$f_{p\lnot qr}$ \= $= \true$\\
  7. \>\>$f_{p\lnot q\lnot r}$ \= $= s$\\
  8. \>\>\>$f_{p\lnot q\lnot rs}$ \= $= \true$\\
  9. \>\>\>$f_{p\lnot q\lnot r\lnot s}$ \= $= \false$\\
  10. $f_{\lnot p}$ \= $= r \lor(s \land \lnot r) \lor (\lnot s \land r) \lor (r \land q)$ \\
  11. \>$f_{\lnot pq}$ \= $= r \lor(s \land \lnot r) \lor (\lnot s \land r)$ \\
  12. \>$f_{\lnot p\lnot q}$ \= $= r \lor(s \land \lnot r) \lor (\lnot s \land r)$ \\
  13. \>\>$\Rightarrow q$ does not have an influence on the formula. These cofactors can be skipped.\\
  14. \>$f_{\lnot pr}$ \= $= \true$ \\
  15. \>$f_{\lnot p\lnot r}$ \= $= s = f_{p\lnot q\lnot r}$ \\
  16. \end{cofactors}
  17. The final ROBDD:\\
  18. \begin{center}
  19. \begin{bdd}[4em]
  20. \node[func node] (f) {$f$};
  21. \node[cofactor] (p1) [below of=f] {$q$};
  22. \node[cofactor] (q1) [below left of=p1] {$q$};
  23. \node[cofactor] (r1) [below right of=p1] {$r$};
  24. \node[cofactor] (r2) [below right of=q1,yshift=-0.8em,xshift=-1.5em] {$r$};
  25. \node[phantom] (q1L) [below left of=q1] {};
  26. \node[phantom] (r1L) [below left of=r1] {};
  27. \node[cofactor] (s1) [below left of=r2] {$s$};
  28. \node[phantom] (r2L) [below left of=r2] {};
  29. \node[phantom] (r2R) [below right of=r2] {};
  30. \node[phantom] (s2L) [below left of=s1] {};
  31. \node[phantom] (s2R) [below right of=s1] {};
  32. \funcEdge{f}{p1}
  33. \thenEdge{p1}{q1}
  34. \elseEdge{p1}{r1}
  35. \thenEdge{q1}{q1L}
  36. \negatedEdge{q1}{r2}
  37. \thenEdge{r2}{s1}
  38. \negatedEdge{r2}{r2R}
  39. \thenEdge{r1}{r1L}
  40. \elseEdge[bend left]{r1}{s1}
  41. \thenEdge{s1}{s2L}
  42. \negatedEdge{s1}{s2R}
  43. \end{bdd}
  44. \end{center}