Paul, I just wrote a test to check that my constraints were correct by hard coding the correct answer. I help an old friend tutoring students in haskell and thought it might be a good exercise for them to just code an exhaustive search just given the correct answer. I'll look at how you and lisp coded the real answer and maybe comment on functional logic programming when I've got the code in #27 to format like literate haskell :).