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.

114 lines
4.5 KiB

5 months ago
  1. \begin{cofactors}
  2. $f$ \= $= (((\lnot p \land q) \land r) \lor (p \land \lnot s))$\\
  3. \>$f_{p}$ \= $= \lnot s$\\
  4. \>\>$f_{ps}$ \= $= \false$\\
  5. \>\>$f_{p\lnot s}$ \= $= \true$\\
  6. \>$f_{\lnot p}$ \= $= (q \land r)$\\
  7. \>\>$f_{\lnot pq}$ \= $= r$\\
  8. \>\>\>$f_{\lnot pqr}$ \= $= \true$\\
  9. \>\>\>$f_{\lnot pq\lnot r}$ \= $= \false$\\
  10. \>\>$f_{\lnot p\lnot q}$ \= $= \false$\\
  11. \end{cofactors}
  12. The final ROBDD:
  13. \begin{center}
  14. \scalebox{0.75}{
  15. \begin{tikzpicture}[>=latex,line join=bevel,]
  16. \pgfsetlinewidth{1bp}
  17. %%
  18. \pgfsetcolor{black}
  19. % Edge: f_E -> p0
  20. \draw [] (72.5bp,210.99bp) .. controls (72.5bp,200.92bp) and (72.5bp,185.47bp) .. (72.5bp,175.3bp);
  21. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  22. \pgfsetstrokecolor{strokecol}
  23. \draw (72.5bp,195.3bp) node {\Large$\bullet$};
  24. % Edge: f_p -> s1
  25. \draw [] (123.5bp,152.99bp) .. controls (123.5bp,142.92bp) and (123.5bp,127.47bp) .. (123.5bp,117.3bp);
  26. \draw (123.5bp,137.3bp) node {\Large$\bullet$};
  27. % Edge: f_!p -> q2
  28. \draw [] (21.5bp,152.99bp) .. controls (21.5bp,142.92bp) and (21.5bp,127.47bp) .. (21.5bp,117.3bp);
  29. % Edge: f_!pq -> r3
  30. \draw [] (70.712bp,94.988bp) .. controls (68.892bp,84.795bp) and (66.087bp,69.087bp) .. (64.272bp,58.925bp);
  31. % Edge: p0 -> q2
  32. \draw [] (65.409bp,155.21bp) .. controls (55.665bp,144.51bp) and (38.243bp,125.38bp) .. (28.531bp,114.72bp);
  33. \draw (41.998bp,129.51bp) node {\Large$\bullet$};
  34. % Edge: p0 -> s1
  35. \draw [] (79.591bp,155.21bp) .. controls (89.335bp,144.51bp) and (106.76bp,125.38bp) .. (116.47bp,114.72bp);
  36. % Edge: q2 -> r3
  37. \draw [] (27.55bp,96.737bp) .. controls (35.301bp,86.149bp) and (48.662bp,67.901bp) .. (56.425bp,57.297bp);
  38. % Edge: q2 -> 4
  39. \draw [] (21.5bp,94.988bp) .. controls (21.5bp,79.384bp) and (21.5bp,50.854bp) .. (21.5bp,49.086bp);
  40. \draw (21.5bp,69.086bp) node {\Large$\bullet$};
  41. % Edge: r3 -> 2
  42. \draw [] (60.281bp,36.791bp) .. controls (57.427bp,23.663bp) and (52.8bp,2.3815bp) .. (52.514bp,1.0642bp);
  43. % Edge: r3 -> 3
  44. \draw [] (64.497bp,36.791bp) .. controls (67.066bp,23.663bp) and (71.23bp,2.3815bp) .. (71.487bp,1.0642bp);
  45. \draw (67.647bp,20.692bp) node {\Large$\bullet$};
  46. % Edge: s1 -> 0
  47. \draw [] (121.71bp,94.988bp) .. controls (118.93bp,79.384bp) and (113.83bp,50.854bp) .. (113.52bp,49.086bp);
  48. % Edge: s1 -> 1
  49. \draw [] (125.11bp,94.988bp) .. controls (127.62bp,79.384bp) and (132.2bp,50.854bp) .. (132.49bp,49.086bp);
  50. \draw (129.31bp,68.833bp) node {\Large$\bullet$};
  51. % Node: f_E
  52. \begin{scope}
  53. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  54. \pgfsetstrokecolor{strokecol}
  55. \draw (94.0bp,233.0bp) -- (51.0bp,233.0bp) -- (51.0bp,211.0bp) -- (94.0bp,211.0bp) -- cycle;
  56. \draw (72.5bp,222.0bp) node {$f$};
  57. \end{scope}
  58. % Node: p0
  59. \begin{scope}
  60. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  61. \pgfsetstrokecolor{strokecol}
  62. \draw (72.5bp,164.0bp) ellipse (11.0bp and 11.0bp);
  63. \draw (72.5bp,164.0bp) node {$p$};
  64. \end{scope}
  65. % Node: f_p
  66. \begin{scope}
  67. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  68. \pgfsetstrokecolor{strokecol}
  69. \draw (145.0bp,175.0bp) -- (102.0bp,175.0bp) -- (102.0bp,153.0bp) -- (145.0bp,153.0bp) -- cycle;
  70. \draw (123.5bp,164.0bp) node {$f_{p}$};
  71. \end{scope}
  72. % Node: s1
  73. \begin{scope}
  74. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  75. \pgfsetstrokecolor{strokecol}
  76. \draw (123.5bp,106.0bp) ellipse (11.0bp and 11.0bp);
  77. \draw (123.5bp,106.0bp) node {$s$};
  78. \end{scope}
  79. % Node: f_!p
  80. \begin{scope}
  81. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  82. \pgfsetstrokecolor{strokecol}
  83. \draw (43.0bp,175.0bp) -- (0.0bp,175.0bp) -- (0.0bp,153.0bp) -- (43.0bp,153.0bp) -- cycle;
  84. \draw (21.5bp,164.0bp) node {$f_{\lnot p}$};
  85. \end{scope}
  86. % Node: q2
  87. \begin{scope}
  88. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  89. \pgfsetstrokecolor{strokecol}
  90. \draw (21.5bp,106.0bp) ellipse (11.0bp and 11.0bp);
  91. \draw (21.5bp,106.0bp) node {$q$};
  92. \end{scope}
  93. % Node: f_!pq
  94. \begin{scope}
  95. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  96. \pgfsetstrokecolor{strokecol}
  97. \draw (94.0bp,117.0bp) -- (51.0bp,117.0bp) -- (51.0bp,95.0bp) -- (94.0bp,95.0bp) -- cycle;
  98. \draw (72.5bp,106.0bp) node {$f_{\lnot pq}$};
  99. \end{scope}
  100. % Node: r3
  101. \begin{scope}
  102. \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  103. \pgfsetstrokecolor{strokecol}
  104. \draw (62.5bp,48.0bp) ellipse (11.0bp and 11.0bp);
  105. \draw (62.5bp,48.0bp) node {$r$};
  106. \end{scope}
  107. %
  108. \end{tikzpicture}
  109. }
  110. \end{center}