CONTENTS
i
Contents
1 Introduction 12 The Queens Problem 2
2.1 The queens program . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Solitaire Problems 5
3.1 Triangular solitaire . . . . . . . . . . . . . . . . . . . . . . . . . . 53.2 The triangular solitaire program . . . . . . . . . . . . . . . . . . . 83.3 A more efficent algorithm for triangular solitaire . . . . . . . . . . 103.4 The more efficient program . . . . . . . . . . . . . . . . . . . . . . 133.5 Conventional solitaire . . . . . . . . . . . . . . . . . . . . . . . . . 163.6 The conventional solitaire program . . . . . . . . . . . . . . . . . 17
4 The Pentominoes Problem 18
4.1 Pento . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.2 The pento program . . . . . . . . . . . . . . . . . . . . . . . . . . 204.3 Pento3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.4 The Pento3 program . . . . . . . . . . . . . . . . . . . . . . . . . 254.5 The Pento4 program . . . . . . . . . . . . . . . . . . . . . . . . . 274.6 Pento6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.7 The program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324.8 The two player pentomino game . . . . . . . . . . . . . . . . . . . 354.9 Exploring the move tree . . . . . . . . . . . . . . . . . . . . . . . 364.10 The program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5 The Cardinality of
D
3
48
5.1 The program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6 Nonograms 51
6.1 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536.2 Observation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 556.3 The program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7 Boolean Satisfiability 63
7.1 Longitudinal arithmetic . . . . . . . . . . . . . . . . . . . . . . . 647.2 Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 667.3 The program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67