jeudi 24 janvier 2013

Worm sudoku: an application for alldiff with precedences

If you want to introduce CP exercises to your students slightly more difficult than basic sudoku, you can try this variant: wormsudoku (It comes from the book Taking Sudoku Seriously).

Fill in the grid so that every row, column, and block contains 1-9 exactly once. In addition, each worm must contain entries that increase from tail to head. For blue worms you must figure out yourself which end is the head.



Now I have a motivation to implement Alldiff with precedence ;-) :

The AllDifferent Constraint with Precedences, Christian BessiereNina NarodytskaClaude-Guy QuimperToby Walsh (CPAIOR11).

Although, the alldiff with preds can only be used for horizontal/vertical/inside a block worms. 

1 commentaire: