updated task 12 and 13
[ker1415-1.git] / report / ass2.tex
index 3ea2ea4..abdce8c 100644 (file)
@@ -1,14 +1,27 @@
 \subsection{Implementation of the hitting-set algorithm}
 \subsubsection{Task 12: Generate conflict}
+\begin{listing}[H]
+       \caption{Generating conflict sets}
+       \prologcode{./src/task12.pl}
+\end{listing}
+
 
 \subsubsection{Task 13: Define your data structure}
-Our datastructure uses the predicate node to signify nodes and leaf for leaves. A node contains a list of edge labels and another list (with the same length as the amound of edge labels) that contains nodes or leaves. The edge label corresponds with its order in the list it is in.
-Good examples:
-isHittingSetTree(node([a,b],[leaf,leaf])).
-isHittingSetTree(node([a,b], [node([c,d], [leaf,leaf]), node([e,f], [leaf,leaf])])).
-isHittingSetTree(node([a,b], [node([c,d], [node([g,h,i], [leaf,leaf,leaf]),leaf]), node([a,f], [leaf,leaf])])).
+\begin{listing}[H]
+       \caption{Hitting set datastructure}
+       \prologcode{./src/hs.pl}
+\end{listing}
+% Het doel van deze opdracht was om je datastructure te laten zien, je hebt
+% alleen gezegd wat voor bomen geen hitting set kunnen zijn...
 
-Wrong examples:
+%Our datastructure uses the predicate node to signify nodes and leaf for leaves. A node contains a list of edge labels and another list (with the same length as the amound of edge labels) that contains nodes or leaves. The edge label corresponds with its order in the list it is in.
+%Good examples:
+%isHittingSetTree(node([a,b],[leaf,leaf])).
+%isHittingSetTree(node([a,b], [node([c,d], [leaf,leaf]), node([e,f], [leaf,leaf])])).
+%isHittingSetTree(node([a,b], [node([c,d], [node([g,h,i], [leaf,leaf,leaf]),leaf]), node([a,f], [leaf,leaf])])).
+%
+%Wrong examples:
+%
+%isHittingSetTree(node([a,b], [node([c,d], [node([g,h], [leaf,leaf,leaf]),leaf]), node([a,f], [leaf,leaf])])).
 
-isHittingSetTree(node([a,b], [node([c,d], [node([g,h], [leaf,leaf,leaf]),leaf]), node([a,f], [leaf,leaf])])).
 \subsubsection{Task 14: Implementation}