You are on page 1of 5

Acknowledgements

I am grateful to Jim Doran for bringing me into the topic of constraint satisfaction.
Sam Steel suggested me to write this book. Ray Turner and Nadim Obeid advised
me on a number of issues. Hans Guesgen and Joachim Hertzberg generously gave
me a copy of their book on this topic and discussed their work with me. Patrick
Prosser read an earlier draft of this book in detail, and gave me invaluable feedback.
Barbara Smith, Barry Crabtree and Andrew Davenport all spared their precious
time to read an earlier draft of this book. I would like to thank them all. My special
thanks goes to Alvin Kwan, who has read earlier versions of this book and had
lengthy discussions with me on many issues. The Department of Computer Science,
University of Essex, has provided me with a harmonious environment and a great
deal of support. Feedback from students who took my course on constraint satisfac-
tion has been useful. Andrew Carrick, Kate Brewin and Nigel Eyre made the publi-
cation of this book a relatively smooth exercise. Most importantly, I would like to
thank my wife Lorna. Without her support this book could never have been com-
pleted.

vii
Table of contents
Preface v
Acknowledgements vii
Table of contents ix
Figures xv
Notations and abbreviations xix
Chapter 1 Introduction 1
1.1 What is a constraint satisfaction problem? 1
1.1.1 Example 1 —The N-queens problem 1
1.1.2 Example 2 — The car sequencing problem 3
1.2 Formal Definition of the CSP 5
1.2.1 Definitions of domain and labels 5
1.2.2 Definitions of constraints 7
1.2.3 Definitions of satisfiability 8
1.2.4 Formal definition of constraint satisfaction problems 9
1.2.5 Task in a CSP 10
1.2.6 Remarks on the definition of CSPs 10
1.3 Constraint Representation and Binary CSPs 10
1.4 Graph-related Concepts 12
1.5 Examples and Applications of CSPs 17
1.5.1 The N-queens problem 17
1.5.2 The graph colouring problem 19
1.5.3 The scene labelling problem 21
1.5.4 Temporal reasoning 24
1.5.5 Resource allocation in AI planning and scheduling 25
1.5.6 Graph matching 26
1.5.7 Other applications 26
1.6 Constraint Programming 27
1.7 Structure Of Subsequent Chapters 28
1.8 Bibliographical Remarks 29
Chapter 2 CSP solving — An overview 31
2.1 Introduction 31
2.1.1 Soundness and completeness of algorithms 31
2.1.2 Domain specific vs. general methods 32
2.2 Problem Reduction 32
2.2.1 Equivalence 32
2.2.2 Reduction of a problem 33
2.2.3 Minimal problems 34
2.3 Searching For Solution Tuples 35
2.3.1 Simple backtracking 36
2.3.2 Search space of CSPs 38
2.3.3 General characteristics of CSP’s search space 40
2.3.4 Combining problem reduction and search 41
2.3.5 Choice points in searching 42
2.3.6 Backtrack-free search 43
2.4 Solution Synthesis 44
2.5 Characteristics of Individual CSPs 46
2.5.1 Number of solutions required 46
2.5.2 Problem size 47
2.5.3 Types of variables and constraints 47
2.5.4 Structure of the constraint graph in binary-
constraint-problems 47
2.5.5 Tightness of a problem 48
2.5.6 Quality of solutions 49
2.5.7 Partial solutions 50
2.6 Summary 51
2.7 Bibliographical Remarks 52
Chapter 3 Fundamental concepts in the CSP 53
3.1 Introduction 53
3.2 Concepts Concerning Satisfiability and Consistency 54
3.2.1 Definition of satisfiability 54
3.2.2 Definition of k-consistency 55
3.2.3 Definition of node- and arc-consistency 57
3.2.4 Definition of path-consistency 59
3.2.5 Refinement of PC 60
3.2.6 Directional arc- and path-consistency 63
3.3 Relating Consistency to Satisfiability 64
3.4 (i, j)-consistency 68
3.5 Redundancy of Constraints 69
3.6 More Graph-related Concepts 70
3.7 Discussion and Summary 76
3.8 Bibliographical Remarks 76

x
Chapter 4 Problem reduction 79
4.1 Introduction 79
4.2 Node and Arc-consistency Achieving Algorithms 80
4.2.1 Achieving NC 80
4.2.2 A naive algorithm for achieving AC 81
4.2.3 Improved AC achievement algorithms 83
4.2.4 AC-4, an optimal algorithm for achieving AC 84
4.2.5 Achieving DAC 88
4.3 Path-consistency Achievement Algorithms 90
4.3.1 Relations composition 91
4.3.2 PC-1, a naive PC Algorithm 92
4.3.3 PC-2, an improvement over PC-1 93
4.3.4 Further improvement of PC achievement algorithms 95
4.3.5 GAC4: problem reduction for general CSPs 99
4.3.6 Achieving DPC 99
4.4 Post-conditions of PC Algorithms 101
4.5 Algorithm for Achieving k-consistency 102
4.6 Adaptive-consistency 105
4.7 Parallel/Distributed Consistency Achievement 110
4.7.1 A connectionist approach to AC achievement 110
4.7.2 Extended parallel arc-consistency 112
4.7.3 Intractability of parallel consistency 115
4.8 Summary 115
4.9 Bibliographical Remarks 117
Chapter 5 Basic search strategies for solving CSPs 119
5.1 Introduction 119
5.2 General Search Strategies 120
5.2.1 Chronological backtracking 120
5.2.2 Iterative broadening 121
5.3 Lookahead Strategies 124
5.3.1 Forward Checking 124
5.3.2 The Directional AC-Lookahead algorithm 130
5.3.3 The AC-Lookahead algorithm 133
5.3.4 Remarks on lookahead algorithms 136
5.4 Gather-information-while-searching Strategies 136
5.4.1 Dependency directed backtracking 137
5.4.2 Learning nogood compound labels algorithms 143

xi

You might also like