Solving Sudoku a la Bird

December 9th, 2005 by Graham

I gave an overview of a Haskell approach to solving Sudoku puzzles, based upon lecture notes from Richard Bird. The approach is classic Bird: start with a simple but impractical solver, whose efficiency is then improved in a series of steps. The end result is an elegant program that is able to solve any Sudoku puzzle in an instant. It’s also an excellent example of what has been termed “wholemeal programming” — focusing on entire data structures rather than their elements. I’m planning on teaching this as part of the new Advanced Functional Programming module next semester.

One Response to “Solving Sudoku a la Bird”

  1. Graham Says:

    There is now a literate Haskell script for the Sudoku program, which is available on the web from

Leave a Reply