SlideShare a Scribd company logo
1 of 16
Download to read offline
Topic To Be Covered:
Crypt-Arithmetic Problem in AI
Jagdamba Education Society's
SND College of Engineering & Research Centre
Department of Computer Engineering
SUBJECT: Artificial Intelligence & Robotics
Lecture No-13(UNIT-02)
Prof.Dhakane Vikas N
Crypt-Arithmetic Problem in AI
What is Crypt-Arithmetic Problem in AI???
 It is type of constrained satisfaction problem in Ai
 The Crypt-Arithmetic problem in Artificial Intelligence is a type of
encryption problem in which the written message in an alphabetical form
which is easily readable and understandable is converted into a numeric
form which is neither easily readable nor understandable.
 In simpler words, the crypt-arithmetic problem deals with the converting
of the message from the readable plain text to the non-readable cipher
text.
 The constraints which this problem follows during the conversion is as
follows:
Crypt-Arithmetic Problem in AI
What is Crypt-Arithmetic Problem in AI???
The rules or constraints For a crypt-arithmetic problem are as follows:
 There should be a unique digit to be replaced for a unique alphabet.
 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., left-hand side (L.H.S), or
right-hand side (R.H.S) .
 There must be only on solution to problem.
 Numbers must not begin with zero(e.g.0234 it is incorrect).
 Numerical base is 10 to be considered if required
 The result should satisfy the predefined arithmetic rules, i.e., 2+2 =4,
nothing else.
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic
problem as well as its constraints
better with the help of an example:
Example:-01(TO+GO=OUT)
STEP-01:
-These alphabets are replaced by numbers
such that all the constraints are satisfied. So
initially we have all blank spaces.
-We start from leftmost side ,there we have
leftmost symbol is:O
-It is the letter which is generated by carrying.
So, carry generated can be only one. SO, we
have O=1.
-When we are doing addition of n letters &
result of adding of letters is n+1 letters ,then
resulted letter value is always 1 as carry.
LETTER DIGIT
T
O 1
G
U
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic
problem as well its constraints better
with the help of an example:
Example:-01(TO+GO=OUT)
STEP-02:
-Next we have T+G=U & O+O=T
-We will go for O+O=T first.
-We have o=1, so O+O(1+1)=2(T)
LETTER DIGIT
T 2
O 1
G
U
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic
problem as well its constraints better
with the help of an example:
Example:-01(TO+GO=OUT)
STEP-03:
-Next we have T+G=U
-We T=2
-So,2+G=U
-Now here, We know U must generate carry
so,2+G Must be 10 or Greater that 10
-Means we must add such number in 2 so,
that it we can get carry generated(or we can
addition 10 or more than 10)
LETTER DIGIT
T 2
O 1
G
U
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic
problem as well its constraints better
with the help of an example:
Example:-01(TO+GO=OUT)
STEP-03:
-Now here, We know U must generate carry
so,2+G Must be 10 or Greater that 10
-Means we must add such number in 2 so, that
it we can get carry generated(or we can
addition 10 or more than 10)
-We have first Option(If we consider G=9):2+G
as 2+9(G)=11,her we get U=1
-But we cant chose U=1 as 1 is already assigned
to O.
-
LETTER DIGIT
T 2
O 1
G
U
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic
problem as well its constraints better
with the help of an example:
Example:-01(TO+GO=OUT)
STEP-03:
-We have second Option(If we consider
G=8):2+G as 2+8(G)=10,her we get U=0
-Which can be chosen & then we can tally the
answer as follows:
2 1
+ 8 1
-------------------
1 0 2
LETTER DIGIT
T 2
O 1
G 8
U 0
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic problem
as well its constraints better with the help of
an example:
Example:-02(SEND+MORE=MONEY)
STEP-01:
-These alphabets then are replaced by numbers
such that all the constraints are satisfied. So
initially we have all blank spaces.
-We start from leftmost side ,there we have
leftmost symbol is:M
-It is the letter which is generated by carrying.
So, carry generated can be only one. SO, we
have M=1.
-When we are doing adding of n letters & result
of adding of letters is n+1 letters ,then resulted
letter value is always 1 as carry.
LETTER DIGIT
S
E
N
D
M 1
O
R
Y
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic problem
as well its constraints better with the help of
an example:
Example:-02(SEND+MORE=MONEY)
STEP-02:
-Next we have S+M=O,WE KNOW M=1 ,SO WE
We have equation s+1=o(here s+m=O has to
generate carry as we have M=1)
-When s=8 ,carry cant be generated (as 8+1=9)
-Only when S=9 carry can be generated so we
have (9+1=10) and hence S=9 & O=0
LETTER DIGIT
S 9
E
N
D
M 1
O 0
R
Y
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic problem
as well its constraints better with the help of
an example:
Example:-02(SEND+MORE=MONEY)
STEP-03:
-Next we have E+O=N(here we have O=0)
-if we do E+0=N(In this case we are having E &
N having same value as anything get added in 0
result will be 0 only.)
-But we cant have E & N with same value
,according to constraint of cryptarithmatic
-So ,there must be carry generated above E,
which will get added at E.
-So, here we assume E+0+1=N i.e. E+1=N(N &
E are differ by 1)—exp(1)
LETTER DIGIT
S 9
E
N
D
M 1
O 0
R
Y
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic problem
as well its constraints better with the help of
an example:
Example:-02(SEND+MORE=MONEY)
STEP-04:
-Next we N+R=E
-Now here addition of N & R must generate
carry as we have assume carry need to be
generated above E.
-So, we need to add such a two numbers such
that they can generate carry, here we cant use
9 number as it is already used.
-So, we can have relation as follow
-N+R=E+10(10,here to represent carry)
-But there might be carry as well over the N so,
we write relation as N+R(+1)=E+10exp(2)
LETTER DIGIT
S 9
E
N
D
M 1
O 0
R
Y
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic problem
as well its constraints better with the help of
an example:
Example:-02(SEND+MORE=MONEY)
STEP-04:
--N+R=E+10(10,here to represent carry)
-But there might be carry as well over the N so,
we write relation as N+R(+1)=E+10— exp(2)
-So now we substitute expression(1) in exp(2)
-we get E+1+R(+1)=E+10
-If here we don’t consider carry R=9
-which is not possible because S=9
-so we need to consider carry her & so R=8
-We still cant have value of N so we go forward.
LETTER DIGIT
S 9
E
N
D
M 1
O 0
R 8
Y
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic problem
as well its constraints better with the help of
an example:
Example:-02(SEND+MORE=MONEY)
STEP-05:
--R=8
-We still cant have value of N so we go forward.
-Next we have D+E=Y has to be such that ,it
can generate carry because we have know carry
has to be generated above N
-Here we know Y must be greater than 11
because 0 and 1 value already taken for O and
M.
-So possibilities are 7+6 or 7+5
-If we take 7+5=12(D=7 & E=5 ,so Y=2)
-N=6
LETTER DIGIT
S 9
E 5
N 6
D 7
M 1
O 0
R 8
Y 2
Crypt-Arithmetic Problem in AI
Let’s understand the crypt arithmetic problem
as well its constraints better with the help of
an example:
Example:-02(SEND+MORE=MONEY)
STEP-05:
-
9 5 6 7
+ 1 0 8 5
---------------------------------
1 0 6 5 2
LETTER DIGIT
S 9
E 5
N
D 7
M 1
O 0
R 9
Y 2
Ai lecture  13(unit02)

More Related Content

What's hot

vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...
vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...
vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...
akshaya870130
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
Nikhil Sharma
 
Travelling Salesman
Travelling SalesmanTravelling Salesman
Travelling Salesman
Shuvojit Kar
 

What's hot (20)

Analysis of algorithms
Analysis of algorithmsAnalysis of algorithms
Analysis of algorithms
 
5 csp
5 csp5 csp
5 csp
 
Algorithms Lecture 7: Graph Algorithms
Algorithms Lecture 7: Graph AlgorithmsAlgorithms Lecture 7: Graph Algorithms
Algorithms Lecture 7: Graph Algorithms
 
Artificial Intelligence Searching Techniques
Artificial Intelligence Searching TechniquesArtificial Intelligence Searching Techniques
Artificial Intelligence Searching Techniques
 
Popular search algorithms
Popular search algorithmsPopular search algorithms
Popular search algorithms
 
Asymptotic Notations
Asymptotic NotationsAsymptotic Notations
Asymptotic Notations
 
vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...
vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...
vdocument.in_prof-saroj-kaushik1-introduction-to-artificial-intelligence-lect...
 
Multiple Classifier Systems
Multiple Classifier SystemsMultiple Classifier Systems
Multiple Classifier Systems
 
Code generation errors and recovery
Code generation errors and recoveryCode generation errors and recovery
Code generation errors and recovery
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
Unit 1 chapter 1 Design and Analysis of Algorithms
Unit 1   chapter 1 Design and Analysis of AlgorithmsUnit 1   chapter 1 Design and Analysis of Algorithms
Unit 1 chapter 1 Design and Analysis of Algorithms
 
Introduction to NP Completeness
Introduction to NP CompletenessIntroduction to NP Completeness
Introduction to NP Completeness
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representation
 
Np complete
Np completeNp complete
Np complete
 
Turing Machine
Turing MachineTuring Machine
Turing Machine
 
0 1 knapsack using branch and bound
0 1 knapsack using branch and bound0 1 knapsack using branch and bound
0 1 knapsack using branch and bound
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Asymptotic notations
Asymptotic notationsAsymptotic notations
Asymptotic notations
 
Travelling Salesman
Travelling SalesmanTravelling Salesman
Travelling Salesman
 

Similar to Ai lecture 13(unit02)

Solution 1
Solution 1Solution 1
Solution 1
aldrins
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
Kelly Bresnahan
 
Solution 1
Solution 1Solution 1
Solution 1
aldrins
 
Sienna 10 dynamic
Sienna 10 dynamicSienna 10 dynamic
Sienna 10 dynamic
chidabdu
 
Math lecture 7 (Arithmetic Sequence)
Math lecture 7 (Arithmetic Sequence)Math lecture 7 (Arithmetic Sequence)
Math lecture 7 (Arithmetic Sequence)
Osama Zahid
 
September 9, 2014
September 9, 2014September 9, 2014
September 9, 2014
khyps13
 
A0 integers ppt v16trial
A0 integers ppt v16trialA0 integers ppt v16trial
A0 integers ppt v16trial
scans
 

Similar to Ai lecture 13(unit02) (20)

Solution 1
Solution 1Solution 1
Solution 1
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
 
An Introduction to Linear Programming
An Introduction to Linear ProgrammingAn Introduction to Linear Programming
An Introduction to Linear Programming
 
Solution 1
Solution 1Solution 1
Solution 1
 
Sienna 10 dynamic
Sienna 10 dynamicSienna 10 dynamic
Sienna 10 dynamic
 
Math lecture 7 (Arithmetic Sequence)
Math lecture 7 (Arithmetic Sequence)Math lecture 7 (Arithmetic Sequence)
Math lecture 7 (Arithmetic Sequence)
 
Course project solutions 2019
Course project solutions 2019Course project solutions 2019
Course project solutions 2019
 
(1) collections algorithms
(1) collections algorithms(1) collections algorithms
(1) collections algorithms
 
Binary Indexed Tree / Fenwick Tree
Binary Indexed Tree / Fenwick TreeBinary Indexed Tree / Fenwick Tree
Binary Indexed Tree / Fenwick Tree
 
Solving Equations in Complex Numbers
Solving Equations in Complex NumbersSolving Equations in Complex Numbers
Solving Equations in Complex Numbers
 
September 9, 2014
September 9, 2014September 9, 2014
September 9, 2014
 
Public Key Cryptography
Public Key CryptographyPublic Key Cryptography
Public Key Cryptography
 
Complex numbers
Complex numbersComplex numbers
Complex numbers
 
Lop1
Lop1Lop1
Lop1
 
Number systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s compNumber systems - binary, BCD, 2s comp
Number systems - binary, BCD, 2s comp
 
Complex numbers
Complex numbersComplex numbers
Complex numbers
 
A MATLAB project on LCR circuits
A MATLAB project on LCR circuitsA MATLAB project on LCR circuits
A MATLAB project on LCR circuits
 
A0 integers ppt v16trial
A0 integers ppt v16trialA0 integers ppt v16trial
A0 integers ppt v16trial
 
Lecture 13 Criptarithmetic problem
Lecture 13 Criptarithmetic problemLecture 13 Criptarithmetic problem
Lecture 13 Criptarithmetic problem
 
DEV
DEVDEV
DEV
 

More from vikas dhakane

More from vikas dhakane (20)

Ai lecture 14(unit03)
Ai lecture  14(unit03)Ai lecture  14(unit03)
Ai lecture 14(unit03)
 
Ai lecture 13(unit03)
Ai lecture  13(unit03)Ai lecture  13(unit03)
Ai lecture 13(unit03)
 
Ai lecture 13(unit03)
Ai lecture  13(unit03)Ai lecture  13(unit03)
Ai lecture 13(unit03)
 
Ai lecture 12(unit03)
Ai lecture  12(unit03)Ai lecture  12(unit03)
Ai lecture 12(unit03)
 
Ai lecture 12(unit03)
Ai lecture  12(unit03)Ai lecture  12(unit03)
Ai lecture 12(unit03)
 
Ai lecture 11(unit03)
Ai lecture  11(unit03)Ai lecture  11(unit03)
Ai lecture 11(unit03)
 
Ai lecture 11(unit03)
Ai lecture  11(unit03)Ai lecture  11(unit03)
Ai lecture 11(unit03)
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)
 
Ai lecture 10(unit03)
Ai lecture  10(unit03)Ai lecture  10(unit03)
Ai lecture 10(unit03)
 
Ai lecture 09(unit03)
Ai lecture  09(unit03)Ai lecture  09(unit03)
Ai lecture 09(unit03)
 
Ai lecture 07(unit03)
Ai lecture  07(unit03)Ai lecture  07(unit03)
Ai lecture 07(unit03)
 
Ai lecture 05(unit03)
Ai lecture  05(unit03)Ai lecture  05(unit03)
Ai lecture 05(unit03)
 
Ai lecture 05(unit03)
Ai lecture  05(unit03)Ai lecture  05(unit03)
Ai lecture 05(unit03)
 
Ai lecture 04(unit03)
Ai lecture  04(unit03)Ai lecture  04(unit03)
Ai lecture 04(unit03)
 
Ai lecture 04(unit03)
Ai lecture  04(unit03)Ai lecture  04(unit03)
Ai lecture 04(unit03)
 
Ai lecture 03(unit03)
Ai lecture  03(unit03)Ai lecture  03(unit03)
Ai lecture 03(unit03)
 
Ai lecture 03(unit03)
Ai lecture  03(unit03)Ai lecture  03(unit03)
Ai lecture 03(unit03)
 
Ai lecture 003(unit03)
Ai lecture  003(unit03)Ai lecture  003(unit03)
Ai lecture 003(unit03)
 
Ai lecture 003(unit03)
Ai lecture  003(unit03)Ai lecture  003(unit03)
Ai lecture 003(unit03)
 
Ai lecture 02(unit03)
Ai lecture  02(unit03)Ai lecture  02(unit03)
Ai lecture 02(unit03)
 

Recently uploaded

VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
dharasingh5698
 
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
 

Recently uploaded (20)

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
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 ...
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
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
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
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
 
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
 
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...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 

Ai lecture 13(unit02)

  • 1. Topic To Be Covered: Crypt-Arithmetic Problem in AI Jagdamba Education Society's SND College of Engineering & Research Centre Department of Computer Engineering SUBJECT: Artificial Intelligence & Robotics Lecture No-13(UNIT-02) Prof.Dhakane Vikas N
  • 2. Crypt-Arithmetic Problem in AI What is Crypt-Arithmetic Problem in AI???  It is type of constrained satisfaction problem in Ai  The Crypt-Arithmetic problem in Artificial Intelligence is a type of encryption problem in which the written message in an alphabetical form which is easily readable and understandable is converted into a numeric form which is neither easily readable nor understandable.  In simpler words, the crypt-arithmetic problem deals with the converting of the message from the readable plain text to the non-readable cipher text.  The constraints which this problem follows during the conversion is as follows:
  • 3. Crypt-Arithmetic Problem in AI What is Crypt-Arithmetic Problem in AI??? The rules or constraints For a crypt-arithmetic problem are as follows:  There should be a unique digit to be replaced for a unique alphabet.  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., left-hand side (L.H.S), or right-hand side (R.H.S) .  There must be only on solution to problem.  Numbers must not begin with zero(e.g.0234 it is incorrect).  Numerical base is 10 to be considered if required  The result should satisfy the predefined arithmetic rules, i.e., 2+2 =4, nothing else.
  • 4. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well as its constraints better with the help of an example: Example:-01(TO+GO=OUT) STEP-01: -These alphabets are replaced by numbers such that all the constraints are satisfied. So initially we have all blank spaces. -We start from leftmost side ,there we have leftmost symbol is:O -It is the letter which is generated by carrying. So, carry generated can be only one. SO, we have O=1. -When we are doing addition of n letters & result of adding of letters is n+1 letters ,then resulted letter value is always 1 as carry. LETTER DIGIT T O 1 G U
  • 5. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-01(TO+GO=OUT) STEP-02: -Next we have T+G=U & O+O=T -We will go for O+O=T first. -We have o=1, so O+O(1+1)=2(T) LETTER DIGIT T 2 O 1 G U
  • 6. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-01(TO+GO=OUT) STEP-03: -Next we have T+G=U -We T=2 -So,2+G=U -Now here, We know U must generate carry so,2+G Must be 10 or Greater that 10 -Means we must add such number in 2 so, that it we can get carry generated(or we can addition 10 or more than 10) LETTER DIGIT T 2 O 1 G U
  • 7. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-01(TO+GO=OUT) STEP-03: -Now here, We know U must generate carry so,2+G Must be 10 or Greater that 10 -Means we must add such number in 2 so, that it we can get carry generated(or we can addition 10 or more than 10) -We have first Option(If we consider G=9):2+G as 2+9(G)=11,her we get U=1 -But we cant chose U=1 as 1 is already assigned to O. - LETTER DIGIT T 2 O 1 G U
  • 8. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-01(TO+GO=OUT) STEP-03: -We have second Option(If we consider G=8):2+G as 2+8(G)=10,her we get U=0 -Which can be chosen & then we can tally the answer as follows: 2 1 + 8 1 ------------------- 1 0 2 LETTER DIGIT T 2 O 1 G 8 U 0
  • 9. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-02(SEND+MORE=MONEY) STEP-01: -These alphabets then are replaced by numbers such that all the constraints are satisfied. So initially we have all blank spaces. -We start from leftmost side ,there we have leftmost symbol is:M -It is the letter which is generated by carrying. So, carry generated can be only one. SO, we have M=1. -When we are doing adding of n letters & result of adding of letters is n+1 letters ,then resulted letter value is always 1 as carry. LETTER DIGIT S E N D M 1 O R Y
  • 10. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-02(SEND+MORE=MONEY) STEP-02: -Next we have S+M=O,WE KNOW M=1 ,SO WE We have equation s+1=o(here s+m=O has to generate carry as we have M=1) -When s=8 ,carry cant be generated (as 8+1=9) -Only when S=9 carry can be generated so we have (9+1=10) and hence S=9 & O=0 LETTER DIGIT S 9 E N D M 1 O 0 R Y
  • 11. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-02(SEND+MORE=MONEY) STEP-03: -Next we have E+O=N(here we have O=0) -if we do E+0=N(In this case we are having E & N having same value as anything get added in 0 result will be 0 only.) -But we cant have E & N with same value ,according to constraint of cryptarithmatic -So ,there must be carry generated above E, which will get added at E. -So, here we assume E+0+1=N i.e. E+1=N(N & E are differ by 1)—exp(1) LETTER DIGIT S 9 E N D M 1 O 0 R Y
  • 12. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-02(SEND+MORE=MONEY) STEP-04: -Next we N+R=E -Now here addition of N & R must generate carry as we have assume carry need to be generated above E. -So, we need to add such a two numbers such that they can generate carry, here we cant use 9 number as it is already used. -So, we can have relation as follow -N+R=E+10(10,here to represent carry) -But there might be carry as well over the N so, we write relation as N+R(+1)=E+10exp(2) LETTER DIGIT S 9 E N D M 1 O 0 R Y
  • 13. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-02(SEND+MORE=MONEY) STEP-04: --N+R=E+10(10,here to represent carry) -But there might be carry as well over the N so, we write relation as N+R(+1)=E+10— exp(2) -So now we substitute expression(1) in exp(2) -we get E+1+R(+1)=E+10 -If here we don’t consider carry R=9 -which is not possible because S=9 -so we need to consider carry her & so R=8 -We still cant have value of N so we go forward. LETTER DIGIT S 9 E N D M 1 O 0 R 8 Y
  • 14. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-02(SEND+MORE=MONEY) STEP-05: --R=8 -We still cant have value of N so we go forward. -Next we have D+E=Y has to be such that ,it can generate carry because we have know carry has to be generated above N -Here we know Y must be greater than 11 because 0 and 1 value already taken for O and M. -So possibilities are 7+6 or 7+5 -If we take 7+5=12(D=7 & E=5 ,so Y=2) -N=6 LETTER DIGIT S 9 E 5 N 6 D 7 M 1 O 0 R 8 Y 2
  • 15. Crypt-Arithmetic Problem in AI Let’s understand the crypt arithmetic problem as well its constraints better with the help of an example: Example:-02(SEND+MORE=MONEY) STEP-05: - 9 5 6 7 + 1 0 8 5 --------------------------------- 1 0 6 5 2 LETTER DIGIT S 9 E 5 N D 7 M 1 O 0 R 9 Y 2