Computing Science weeSeepy: a small CP toolkit cp2015!

  Home Page
  News
  Notes
  Slides
  Code
  Links
  Exercises

  • NQueens: code up the n-queens, to find a first solution and to find all solutions. Consider implementing an allDifferent constraint, either Regin's constraint or maybe a counting allDiff.

  • Nogood: implement a nogood constraint, that takes as arguments an array of constrained integer variables var[0] to var[n-1], and an array of values val[0] to val[n-1]. It is nogood if the variables take these values. Encode this constraint such that it performs unit propagation, that it can be entailed, and used inside a nogood-recording restart search.

  • Maximum Clique (MC): code up a model for MC where input graphs are in DIMACS format (see GCol.java). You may wantto encode a constraint x + y >= c, a variable ordering heuristic that takes as an additional argument the degree of vertices, and a value ordering (such that you take 1 before 0).


Copyright © Patrick Prosser 2019.