SlideShare a Scribd company logo
1 of 14
Constraint Satisfaction Problems in
Artificial Intelligence
• constraint satisfaction means solving a problem under certain
constraints or rules.
• Constraint satisfaction is a technique where a problem is solved
when its values satisfy certain constraints or rules of the
problem. Such type of technique leads to a deeper
understanding of the problem structure as well as its complexity.
CSP Problems
Graph Coloring problem where the constraint is that no adjacent sides can have the same
color.
CSP Problems
Sudoku gameplay where the constraint is that no number from 0-9 can be repeated in the same row or
column.
CSP Problems
In crossword problem, the constraint is that there should be the correct formation of the words, and
it should be meaningful.
CSP Problems
•n-queen problem: In n-queen problem, the constraint is that no queen should be
placed either diagonally, in the same row or column.
Cryptarithmetic Problem
• Cryptarithmetic Problem: This problem has one most
important constraint that is, we cannot assign a different digit to
the same character. All digits should contain a unique alphabet.
• Cryptarithmetic Problem is a type of constraint satisfaction
problem where the game is about digits and its unique
replacement either with alphabets or other symbols.
• The task in cryptarithmetic problem is to substitute each digit
with an alphabet to get the result arithmetically correct.
Rules or constraints on a
cryptarithmetic problem
• There should be a unique digit to be replaced with a unique
alphabet.
• The result should satisfy the predefined arithmetic rules, i.e.,
2+2 =4, nothing else.
• Digits should be from 0-9 only.
• There should be only one carry forward, while performing the
addition operation on a problem.
• The problem can be solved from both sides, i.e., lefthand side
(L.H.S), or righthand side (R.H.S)
Cryptarithmetic Problem
• Given a cryptarithmetic problem, i.e., S E N D + M O R E = M O
N E Y
In this example, add both terms S E N D and M O R E to bring M O N E Y as a result.
•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.
Cryptarithmetic Problem
• Now, move ahead to the next terms E and O to get N as its
output.
Adding E and O, which means 5+0=0, which is not
possible
When we will solve further, we will get one carry, so after applying it, the answer will be
satisfied.
Cryptarithmetic Problem
• Further, adding the next two terms N and R we get,
But, we have already assigned E->5. Thus, the above result does not satisfy the
values
where 1 will be carry forward to the above term
Cryptarithmetic Problem
• Again, on adding the last two terms, i.e., the rightmost
terms D and E, we get Y as its result.
where 1 will be carry forward to the above term
Cryptarithmetic Problem
Examples
Examples

More Related Content

Similar to CSP.pptx

September 12, 2014
September 12, 2014September 12, 2014
September 12, 2014
khyps13
 
Example problems
Example problemsExample problems
Example problems
18902
 
Teas prep conquering the teas part 3
Teas prep conquering the teas part 3Teas prep conquering the teas part 3
Teas prep conquering the teas part 3
Lynn Bahena
 
November 30, 2015
November 30, 2015November 30, 2015
November 30, 2015
khyps13
 

Similar to CSP.pptx (20)

Problem Solving, Mathematical Investigation and Modelling - Topic 1
Problem Solving, Mathematical Investigation and Modelling - Topic 1Problem Solving, Mathematical Investigation and Modelling - Topic 1
Problem Solving, Mathematical Investigation and Modelling - Topic 1
 
September 12, 2014
September 12, 2014September 12, 2014
September 12, 2014
 
Algebra i
Algebra iAlgebra i
Algebra i
 
Insider mathematical
Insider   mathematicalInsider   mathematical
Insider mathematical
 
Combinatorics.ppt
Combinatorics.pptCombinatorics.ppt
Combinatorics.ppt
 
Linear equations in disguise
Linear equations in disguiseLinear equations in disguise
Linear equations in disguise
 
Example problems
Example problemsExample problems
Example problems
 
Lesson 4 Simple Linear Equations
Lesson 4   Simple Linear EquationsLesson 4   Simple Linear Equations
Lesson 4 Simple Linear Equations
 
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptxbcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
bcfbedbf-6679-4d5d-b8a5-7d4c9c48dba4.pptx
 
Teas prep conquering the teas part 3
Teas prep conquering the teas part 3Teas prep conquering the teas part 3
Teas prep conquering the teas part 3
 
Simple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-StepSimple Linear Regression: Step-By-Step
Simple Linear Regression: Step-By-Step
 
Number theory and cryptography
Number theory and cryptographyNumber theory and cryptography
Number theory and cryptography
 
Conquering the TEAS Part 3: Math
Conquering the TEAS Part 3: MathConquering the TEAS Part 3: Math
Conquering the TEAS Part 3: Math
 
BROWS - Time and Work.pptx
BROWS - Time and Work.pptxBROWS - Time and Work.pptx
BROWS - Time and Work.pptx
 
November 30, 2015
November 30, 2015November 30, 2015
November 30, 2015
 
Special webinar on tips for perfect score in sat math
Special webinar on tips for perfect score in sat mathSpecial webinar on tips for perfect score in sat math
Special webinar on tips for perfect score in sat math
 
Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...
Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...
Constraint Satisfaction Problem (CSP) : Cryptarithmetic, Graph Coloring, 4- Q...
 
MATH-9-Q1-M1-L4-PPT.pptx
MATH-9-Q1-M1-L4-PPT.pptxMATH-9-Q1-M1-L4-PPT.pptx
MATH-9-Q1-M1-L4-PPT.pptx
 
Number and operations review1
Number and operations review1Number and operations review1
Number and operations review1
 
Decimals part 01
Decimals part 01Decimals part 01
Decimals part 01
 

More from jainam bhavsar (6)

Webofthing_WOT_vs_IOT.pptx
Webofthing_WOT_vs_IOT.pptxWebofthing_WOT_vs_IOT.pptx
Webofthing_WOT_vs_IOT.pptx
 
Final_IoT_Protocol Stack.pptx
Final_IoT_Protocol Stack.pptxFinal_IoT_Protocol Stack.pptx
Final_IoT_Protocol Stack.pptx
 
iot_application_casestudies.pptx
iot_application_casestudies.pptxiot_application_casestudies.pptx
iot_application_casestudies.pptx
 
5 it awt week 8
5 it awt week 85 it awt week 8
5 it awt week 8
 
5 it awt week 7
5 it awt week 75 it awt week 7
5 it awt week 7
 
5 it awt week 6
5 it awt week 65 it awt week 6
5 it awt week 6
 

Recently uploaded

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Recently uploaded (20)

Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 

CSP.pptx

  • 1. Constraint Satisfaction Problems in Artificial Intelligence • constraint satisfaction means solving a problem under certain constraints or rules. • Constraint satisfaction is a technique where a problem is solved when its values satisfy certain constraints or rules of the problem. Such type of technique leads to a deeper understanding of the problem structure as well as its complexity.
  • 2. CSP Problems Graph Coloring problem where the constraint is that no adjacent sides can have the same color.
  • 3. CSP Problems Sudoku gameplay where the constraint is that no number from 0-9 can be repeated in the same row or column.
  • 4. CSP Problems In crossword problem, the constraint is that there should be the correct formation of the words, and it should be meaningful.
  • 5. CSP Problems •n-queen problem: In n-queen problem, the constraint is that no queen should be placed either diagonally, in the same row or column.
  • 6. Cryptarithmetic Problem • Cryptarithmetic Problem: This problem has one most important constraint that is, we cannot assign a different digit to the same character. All digits should contain a unique alphabet. • Cryptarithmetic Problem is a type of constraint satisfaction problem where the game is about digits and its unique replacement either with alphabets or other symbols. • The task in cryptarithmetic problem is to substitute each digit with an alphabet to get the result arithmetically correct.
  • 7. Rules or constraints on a cryptarithmetic problem • There should be a unique digit to be replaced with a unique alphabet. • The result should satisfy the predefined arithmetic rules, i.e., 2+2 =4, nothing else. • Digits should be from 0-9 only. • There should be only one carry forward, while performing the addition operation on a problem. • The problem can be solved from both sides, i.e., lefthand side (L.H.S), or righthand side (R.H.S)
  • 8. Cryptarithmetic Problem • Given a cryptarithmetic problem, i.e., S E N D + M O R E = M O N E Y In this example, add both terms S E N D and M O R E to bring M O N E Y as a result. •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.
  • 9. Cryptarithmetic Problem • Now, move ahead to the next terms E and O to get N as its output. Adding E and O, which means 5+0=0, which is not possible When we will solve further, we will get one carry, so after applying it, the answer will be satisfied.
  • 10. Cryptarithmetic Problem • Further, adding the next two terms N and R we get, But, we have already assigned E->5. Thus, the above result does not satisfy the values where 1 will be carry forward to the above term
  • 11. Cryptarithmetic Problem • Again, on adding the last two terms, i.e., the rightmost terms D and E, we get Y as its result. where 1 will be carry forward to the above term