FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserPrevious exampleNext example

Futoshiki (CP and MIP models)

Description
Playing Futoshiki: fill in the grid so that every row and column contains the numbers 1-5. The `greater than' of `less than' signs indicate where a number is larger or smaller than its neighbor.
  • The models futo.mos and futo_ka.mos solve a given Futoshiki grid with MIP and CP respectively.


Source Files

Data Files





futo1.dat

! Data set from "The Guardian", 30 Sep, 2006.

ISKNOWN: [(3 3) 2]

ISGREATER: [(1 2 1 1) true (1 3 1 2) true (2 1 2 2) true (2 3 2 2) true 
            (2 4 3 4) true (2 5 2 4) true (3 1 3 2) true (3 4 4 4) true
            (5 1 4 1) true (5 5 4 5) true ]

Back to examples browserPrevious exampleNext example