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.

89 lines
4.8 KiB

9 months ago
  1. DPLL algorithm:
  2. \scalebox{1}{
  3. \setlength\tabcolsep{3pt}
  4. \begin{tabular}{|l|c|c|c|c|c|c|c|c|c|c|}
  5. \hline
  6. Step & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline \hline
  7. Decision Level & 0 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 \\ \hline
  8. Assignment & - & $\lnot a$& $\lnot a,c$ & $\lnot a,b,c$ & $\lnot a,b,c,\lnot d$& - & $a$ &$a,\lnot b$ &$a,\lnot b,\lnot c$& $a,\lnot b,\lnot c,\lnot e$ \\ \hline
  9. Cl. 1: $\lnot a,\lnot b$ & 1 & \cmark & \cmark & \cmark & \cmark & 1 & $\lnot b$ & \cmark & \cmark & \cmark \\ \hline
  10. Cl. 2: $ a,c$ & 2 & $c$ & \cmark & \cmark & \cmark & 2 & \cmark & \cmark & \cmark & \cmark \\ \hline
  11. Cl. 3: $b,\lnot c$ & 3 & 3 & $b$ & \cmark & \cmark & 3 & 3 & $\lnot c$ & \cmark & \cmark \\ \hline
  12. Cl. 4: $\lnot b,d$ & 4 & 4 & 4 & $d$ & $\{\}$ \xmark & 4 & 4 & \cmark & \cmark & \cmark \\ \hline
  13. Cl. 5: $\lnot c,\lnot d$ & 5 & 5 & $\lnot d$ & $\lnot d$ & \cmark & 5 & 5 & 5 & \cmark & \cmark \\ \hline
  14. Cl. 6: $c,e$ & 6 & 6 & \cmark & \cmark & \cmark & 6 & 6 & 6 & $e$ & $\{\}$ \xmark \\ \hline
  15. Cl. 7: $c,\lnot e$ & 7 & 7 & \cmark & \cmark & \cmark & 7 & 7 & 7 & $\lnot e$ & \cmark \\ \hline
  16. \textcolor{gray}{Cl. 8: $a$}& - & - & - & - & learned $a$ & 8 & \cmark & \cmark & \cmark & \cmark \\ \hline \hline
  17. BCP & - & $c$ & $b$ & $\lnot d$ & - & $a$ & $\lnot b$ & $\lnot c$ & $\lnot e$ & - \\ \hline
  18. PL & - & - & - & - & - & - & - & - & - & - \\ \hline
  19. Decision & $\lnot a$& - & - & - & - & - & - & - & - & UNSAT \\ \hline
  20. \end{tabular}}
  21. Ad 5:
  22. \begin{center}
  23. \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
  24. thick,base node/.style={circle,draw,minimum size=20pt}, real node/.style={double,circle,draw,minimum size=20pt}]
  25. \node[base node] (1) {$\lnot a$};
  26. \node[base node] (2) [right of=1]{$c$};
  27. \node[base node] (3) [below right of=2] {$\lnot d$};
  28. \node[base node] (4) [above right of=2] {$b$};
  29. \node[base node] (5) [right of=4] {$d$};
  30. \node[base node] (6) [below right of=5] {$\bot$};
  31. \path[]
  32. (1) edge [] node {$2$} (2)
  33. (2) edge [] node {$5$} (3)
  34. edge [] node {$3$} (4)
  35. (4) edge [] node {$4$} (5)
  36. (5) edge [] node {} (6)
  37. (3) edge [] node {} (6);
  38. \end{tikzpicture}
  39. \end{center}
  40. \begin{prooftree}
  41. \AxiomC{$4. \; \lnot b \lor d$}
  42. \AxiomC{$5. \; \lnot c \lor \lnot d$}
  43. \BinaryInfC{$\lnot b \lor \lnot c$}
  44. \AxiomC{$3. \; b \lor \lnot c$}
  45. \BinaryInfC{$\lnot c$}
  46. \AxiomC{$2. \; a \lor c$}
  47. \BinaryInfC{$a$}
  48. \end{prooftree}
  49. Ad 10:
  50. \begin{center}
  51. \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=1.5cm,
  52. thick,base node/.style={circle,draw,minimum size=20pt}, real node/.style={double,circle,draw,minimum size=20pt}]
  53. \node (0) {};
  54. \node[base node] (1) [right of=0]{$a$};
  55. \node[base node] (2) [right of=1]{$\lnot b$};
  56. \node[base node] (3) [right of=2] {$\lnot c$};
  57. \node[base node] (4) [above right of=3] {$\lnot e$};
  58. \node[base node] (5) [below right of=3] {$e$};
  59. \node[base node] (6) [above right of=5] {$\bot$};
  60. \path[]
  61. (0) edge [] node {$8$} (1)
  62. (1) edge [] node {$1$} (2)
  63. (2) edge [] node {$3$} (3)
  64. (3) edge [] node {$7$} (4)
  65. edge [] node {$6$} (5)
  66. (4) edge [] node {} (6)
  67. (5) edge [] node {} (6);
  68. \end{tikzpicture}
  69. \end{center}
  70. \begin{prooftree}
  71. \AxiomC{$6. \; c \lor e$}
  72. \AxiomC{$7. \; c \lor \lnot e$}
  73. \BinaryInfC{$c$}
  74. \AxiomC{$3. \; b \lor \lnot c$}
  75. \BinaryInfC{$b$}
  76. \AxiomC{$1. \; \lnot a \lor \lnot b$}
  77. \BinaryInfC{$\lnot a$}
  78. \AxiomC{$8. \; a$}
  79. \BinaryInfC{$\bot$}
  80. \end{prooftree}