Massachusetts Institute of Technology
16.410 Principles of Automated Reasoning
and Decision Making
Problem Set #6
Due in class and online: Session 13
Constraint Satisfaction Problems
Objectives
In this problem set we examine the solution to constraint satisfaction problems
(CSPs).
A CSP involves finding a consistent set of assignments for a set of
variables
,
, where each variable,
, takes its values from a
domain
of values,
.
The
variable assignments are constrained to satisfy a set of
constraints
between some or all
of the variables.
In this problem set, we restrict ourselves to
binary constraints
, which
constrain two variables.
1
0
...,
,
−
n
X
X
i
X
i
D
We begin with a set of short-answer questions that cover basic concepts.
Then, we
proceed to a number of coding exercises, in which you implement a number of constraint
processing algorithms in Java.
The algorithms are to be tested on a set of problems of
different sizes, in order to evaluate their relative performance.
As with all programming problem sets you will be expected to provide, in addition to
your software, a set of junit tests, a main method that demonstrates the software applied
to the problems specified in the problem set, and a document explaining the design of
your solution and the results obtained from it.
Readings
Lecture notes L10 and L11.
AIMA Chapter 5.
Problem 1 – Backtracking on a Four-variable Problem
(25 points)
In this problem, we consider a very simplified situation in which there are only four
variables: A, B, C and D, and each of them have only two legal values, which we will
write as: A1, A2 (for variable A), B1, B2 (for variable B), C1, C2 (for variable C) and