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.

71 lines
3.7 KiB

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