Class 11 Constraintsatisfactionproblem
Class 11 Constraintsatisfactionproblem
Class 11 Constraintsatisfactionproblem
problems (CSP)
AGENDA
Introduction to CSP
What is a constraint
Crypto Arithmetic puzzles
Constraint Domain
CSP as a search problem
Backtracking search for CSP
Role of Heuristics
INTRODUCTION TO CSP
• The solution is typically a state that can satisfy all the constraints.
csp
– a set of variables,
– a set of constraints.
• The aim is to choose a value for each variable so that the resulting possible
• Assignment problems
• Timetabling problems
• Transportation scheduling
• Factory scheduling
Crypt Arithmetic Puzzles
Constraints:
i.e., S E N D + M O R E = M O N E Y
Starting from the left hand side (L.H.S) , the terms are S and M.
Assign a digit which could give a satisfactory result.
Let’s assign S->9 and M->1.
Now, move ahead to the next terms E and O to get N as its output.
But, we have already assigned E->5. Thus, the above result does not satisfy the values
because we are getting a different value for E. So, we need to think more.
Again, after solving the whole problem, we will get a carryover on this term, so
our answer will be satisfied.
Step 4