@hackage / set-cover

Solve exact set cover problems like Sudoku, 8 Queens, Soma Cube, Tetris Cube

Latest0.1.2.1

About

Metadata

  • Last updated , by HenningThielemann
  • License BSD-3-Clause
  • Categories Algorithms, Mathematics
  • Maintained by: Henning Thielemann <haskell@henning-thielemann.de>

  • Lottery factor: 1

Links

Installation

Package Flags

Use the -f option with cabal commands to enable flags

    buildexamples (off by default)

    Build example executables

    llvm (off by default)

    Enable efficient array processing using LLVM

Readme

Solver for exact set cover problems. Included examples: Sudoku, Nonogram, 8 Queens, Domino tiling, Mastermind, Alphametics, Graph coloring, Soma Cube, Tetris Cube, Cube of L's, Logika's Baumeister puzzle, Lonpos pyramid, Conway's puzzle. The generic algorithm allows to choose between slow but flexible Set from containers package and fast but cumbersome bitvectors.

For getting familiar with the package I propose to study the Queen8 example along with Math.SetCover.Exact.

The Sudoku and Nonogram examples also demonstrate how to interpret the set-cover solution in a human-friendly way.

Build examples with cabal install -fbuildExamples.

The package needs only Haskell 98. There is also an experimental implementation using LLVM and knead. Do not rely on that interface in released packages.