added hittingset code and edited report
[ker1415-1.git] / report / ass2.tex
index abdce8c..32f6adf 100644 (file)
        \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...
-
-%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])])).
-
+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.
+Examples:
+node([a,b],[leaf,leaf])
+node([a,b], [node([c,d], [leaf,leaf]), node([e,f], [leaf,leaf])])
+node([a,b], [node([c,d], [node([g,h,i], [leaf,leaf,leaf]),leaf]), node([a,f], [leaf,leaf])])
+%insert hittingsettrees.png
 \subsubsection{Task 14: Implementation}
+\begin{listing}[H]
+       \caption{Code for generating a hitting set tree}
+       \prologcode{./src/task14.pl}
+\end{listing}
\ No newline at end of file