ps6 - Massachusetts Institute of Technology 16.410...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
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
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
D1, D2 (for variable D). Binary constraints between variable pairs are expressed as a set of legal assignments: AB C : {(A1, B1) (A2, B1)} AC C : {(A1, C1) (A2, C2)} BD C : {(B1, D1)} CD C : {(C2, D1)} BC C : no constraint AD C : no constraint We say that “an assignment is generated'' every time a variable in the problem gets a new (candidate) assignment. We assume that the variables are examined in alphabetical order and the values in numerical order. Below, we ask you to solve this problem using pure backtracking and also by using backtracking with forward checking. Stop when a valid solution is found. The search tree for this problem is given below. Each node (except the root) is labeled with the value involved in the assignment; the variable is the first letter of the value. Your answers will consist of a space-separated sequence of values corresponding to assignments as they are generated during the search. For example, {A1 B1}, etc. Root A1 A2 B2 C2 C1 D2 D1 D2 D1 B1 C2 C1 D2 D1 D2 D1 B2 C2 C1 D2 D1 D2 D1 B1 C2 C1 D2 D1 D2 D1
Background image of page 2
6.1.1 – Using pure backtracking, how many assignments are made before the answer is found? What is the assignment sequence?
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

ps6 - Massachusetts Institute of Technology 16.410...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online