Presentation is loading. Please wait.

Presentation is loading. Please wait.

Constraint Satisfaction Problem

Similar presentations


Presentation on theme: "Constraint Satisfaction Problem"— Presentation transcript:

1 Constraint Satisfaction Problem
By Syed Hisar Abbas Rizvi

2 Definition: Constraint satisfaction problems (CSPs) are mathematical problems defined as a set of objects whose state must satisfy a number of constraints or limitations. CSPs represent the entities in a problem as a homogeneous collection of finite constraints over variables, which is solved by constraint satisfaction methods. CSPs are the subject of intense research in both artificial intelligence and operations research, since the regularity in their formulation provides a common basis to analyze and solve problems of many seemingly unrelated families.

3 Examples: Simple problems that can be modeled as a constraint satisfaction problem include Eight queens puzzle Map coloring problem Sudoku, Crosswords, Futoshiki, Kakuro (Cross Sums), Numbrix, Hidato and many other logic puzzles "Real life" examples include automated planning and resource allocation. An example for puzzle solution is using a constraint model as a Sudoku solving algorithm.

4 Eight queens puzzle The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other. Thus, a solution requires that no two queens share the same row, column, or diagonal.

5 Specifying Constraint Problems
A constraint satisfaction problem (CSP) consists of a set of variables, a domain for each variable, and a set of constraints.

6 Task that can be Performed
Determine whether or not there is a model. Find a model. Find all of the models or enumerate the models. Count the number of models. Find the best model, given a measure of how good models are. Determine whether some statement holds in all models.

7 Solving a CSP Backtracking search Forward checking Arc consistency

8 Backtracking Backtracking is a general algorithm for finding all (or some) solutions to some computational problems, notably constraint satisfaction problems, that incrementally builds candidates to the solutions, and abandons each partial candidate c ("backtracks") as soon as it determines that c cannot possibly be completed to a valid solution.

9 Backtracking example

10 Backtracking example

11 Backtracking example

12 Backtracking example

13 Real-world CSPs Assignment problems Timetabling problems
e.g., who teaches what class Timetabling problems e.g., which class is offered when and where? Factory scheduling

14 Improving Backtracking Efficiency
General-purpose methods can give huge gains in speed: Which variable should be assigned next? In what order should its values be tried? Can we detect inevitable failure early? 4 Feb 2004 CS Constraint Satisfaction

15


Download ppt "Constraint Satisfaction Problem"

Similar presentations


Ads by Google