3 Constraint-satisfaction problems

 

A large number of problems that computational tools are used to solve can be broadly categorized as constraint-satisfaction problems (CSPs). CSPs are composed of variables with possible values that fall into ranges known as domains. Constraints between the variables must be satisfied in order for constraint-satisfaction problems to be solved. Those three core concepts--variables, domains, and constraints--are simple to understand, and their generality underlies the wide applicability of constraint-satisfaction problem solving.

Let’s consider an example problem. Suppose you are trying to schedule a Friday meeting for Joe, Mary, and Sue. Sue has to be at the meeting with at least one other person. For this scheduling problem, the three people--Joe, Mary, and Sue--may be the variables. The domain for each variable may be their respective hours of availability. For instance, the variable Mary has the domain 2 p.m., 3 p.m., and 4 p.m. This problem also has two constraints. One is that Sue has to be at the meeting. The other is that at least two people must attend the meeting. A constraint-satisfaction problem solver will be provided with the three variables, three domains, and two constraints, and it will then solve the problem without having the user explain exactly how. Figure 3.1 illustrates this example.

3.1 Building a constraint-satisfaction problem framework

3.2 The Australian map-coloring problem

3.3 The eight queens problem

3.4 Word search

3.5 SEND+MORE=MONEY

3.6 Circuit board layout

3.7 Real-world applications

3.8 Exercises

sitemap