this is for holding javascript data
Niclas Alexandersson edited c) Solving as graph colouring.tex
almost 10 years ago
Commit id: aa3602ef56c48e931b64d3cd5b99164a88440056
deletions | additions
diff --git a/c) Solving as graph colouring.tex b/c) Solving as graph colouring.tex
index 07f95d9..4936868 100644
--- a/c) Solving as graph colouring.tex
+++ b/c) Solving as graph colouring.tex
...
\section{c) Solving as graph colouring}
We can easily convert the problem into a graph colouring problem, by treating each lecture as a node, and adding edges between all lectures which overlap, and therefore conflict with each other.
\begin{verbatim}
reduce_lsp(courses):
...
for i in courses:
for j in courses:
if i /= j && isCollision(i, j)
edges.push( edges.add( (i, j) )
return edges
\end{verbatim}