SlideShare a Scribd company logo
1 of 11
Cryptarithmetic Problem
Lecture-13
Hema Kashyap
1
Cryptarithmetic Problem
“It is an arithmetic problem which is represented in letters. It
involves the decoding of digit represented by a character. It is in
the form of some arithmetic equation where digits are distinctly
represented by some characters. The problem requires finding of
the digit represented by each character. Assign a decimal digit to
each of the letters in such a way that the answer to the problem is
correct. If the same letter occurs more than once, it must be
assigned the same digit each time. No two different letters may be
assigned the same digit”.
2
Procedure
• Cryptarithmatic problem is an interesting constraint satisfaction problem
for which different algorithms have been developed. Cryptarithm is a
mathematical puzzle in which digits are replaced by letters of the alphabet
or other symbols. Cryptarithmatic is the science and art of creating and
solving cryptarithms.
• The different constraints of defining a cryptarithmatic problem are as
follows.
1) Each letter or symbol represented only one and a unique digit throughout the problem.
2) When the digits replace letters or symbols, the resultant arithmetical operation must be
correct.
• The above two constraints lead to some other restrictions in the problem.
3
Example
• Consider that, the base of the number is 10. Then there must be at most 10
unique symbols or letters in the problem. Otherwise, it would not possible to
assign a unique digit to unique letter or symbol in the problem. To be semantically
meaningful, a number must not begin with a 0. So, the letters at the beginning of
each number should not correspond to 0. Also one can solve the problem by a
simple blind search. But a rule based searching technique can provide the solution
in minimum time.
4
Step 1
• In the above problem, M must be 1. You can visualize that, this is an
addition problem. The sum of two four digit numbers cannot be more than
10,000. Also M cannot be zero according to the rules, since it is the first
letter.
5
Step 2
• Now in the column s10, s+1 ≥ 10. S must be 8 because there is a 1 carried
over from the column EON or 9. O must be 0 (if s=8 and there is a 1
carried or s = 9 and there is no 1 carried) or 1 (if s=9 and there is a 1
carried). But 1 is already taken, so O must be 0.
6
Step 3
• There cannot be carry from column EON because any digit +0 < 10, unless
there is a carry from the column NRE, and E=9; But this cannot be the case
because then N would be 0 and 0 is already taken. So E < 9 and there is no
carry from this column. Therefore S=9 because 9+1=10.
7
Step 4
• In the column EON, E cannot be equal to N. So there must
be carry from the column NRE; E+1=N. We now look at the
column NRE, we know that E+1=N. Since we know that
carry from this column, N+R=1E (if there is no carry from
the column DEY) or N+R+1=1E (if there is a carry from the
column DEY).
• Let us see both the cases:
– No carry: N +R =10 +(N- 1)= N + 9
– R = 9
• But 9 is already taken, so this will not work
– Carry: N +R + 1= 9
– R = 9 – 1= 8 This must be solution for R
8
Step 5
• Now just think what are the digits we have left? They are 7, 6, 5,
4, 3 and 2. We know there must be a carry from the column DEY.
So D+E>10.N = E+1, So E cannot be 7 because then N would be
8 which is already taken. D is almost 7, so E cannot be 2 because
then D +E <10 and E cannot be 3 because then D+E=10 and
Y=0, but 0 is already taken. Also E cannot be 4 because if D
>6,D+E<10 and if D=6 or D=7 then Y=0 or Y=1, which are both
taken. So E is 5 or 6.
• If E=6, then D=7 and Y=3. So this part will work but look the
column N8E. Point that there is a carry from the column
D5Y.N+8+1=16(As there is a carry from this column). But then
N=7 and 7 is taken by D therefore E=5.
9
Step 6
• Now we have gotten this important digit, it
gets much simpler from here
N+8+1=15, N=6
10
Step 7
• The digits left are 7, 4, 3 and 2. We know there
is carry from the column D5Y, so the only pair
that works is D=7 and Y= 2.
Which is final solution of this problem.
11

More Related Content

What's hot

Travelling Salesman Problem
Travelling Salesman ProblemTravelling Salesman Problem
Travelling Salesman ProblemDaniel Raditya
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchTekendra Nath Yogi
 
backtracking algorithms of ada
backtracking algorithms of adabacktracking algorithms of ada
backtracking algorithms of adaSahil Kumar
 
01 Knapsack using Dynamic Programming
01 Knapsack using Dynamic Programming01 Knapsack using Dynamic Programming
01 Knapsack using Dynamic ProgrammingFenil Shah
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of AlgorithmsSwapnil Agrawal
 
Elements of dynamic programming
Elements of dynamic programmingElements of dynamic programming
Elements of dynamic programmingTafhim Islam
 
Graph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptxGraph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptxHome
 
Recurrence relations
Recurrence relationsRecurrence relations
Recurrence relationsIIUM
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AIKirti Verma
 
Introduction to NP Completeness
Introduction to NP CompletenessIntroduction to NP Completeness
Introduction to NP CompletenessGene Moo Lee
 
Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programingrupali_2bonde
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemMohammad Imam Hossain
 
CLOSEST PAIR (Final)
CLOSEST PAIR (Final)CLOSEST PAIR (Final)
CLOSEST PAIR (Final)Aruneel Das
 
Dynamic programming - fundamentals review
Dynamic programming - fundamentals reviewDynamic programming - fundamentals review
Dynamic programming - fundamentals reviewElifTech
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler DesignAkhil Kaushik
 

What's hot (20)

5 csp
5 csp5 csp
5 csp
 
Travelling Salesman Problem
Travelling Salesman ProblemTravelling Salesman Problem
Travelling Salesman Problem
 
Branch and bound
Branch and boundBranch and bound
Branch and bound
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
backtracking algorithms of ada
backtracking algorithms of adabacktracking algorithms of ada
backtracking algorithms of ada
 
01 Knapsack using Dynamic Programming
01 Knapsack using Dynamic Programming01 Knapsack using Dynamic Programming
01 Knapsack using Dynamic Programming
 
Parallel Processing
Parallel ProcessingParallel Processing
Parallel Processing
 
Design and Analysis of Algorithms
Design and Analysis of AlgorithmsDesign and Analysis of Algorithms
Design and Analysis of Algorithms
 
Elements of dynamic programming
Elements of dynamic programmingElements of dynamic programming
Elements of dynamic programming
 
Graph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptxGraph coloring problem(DAA).pptx
Graph coloring problem(DAA).pptx
 
Recurrence relations
Recurrence relationsRecurrence relations
Recurrence relations
 
Uninformed search /Blind search in AI
Uninformed search /Blind search in AIUninformed search /Blind search in AI
Uninformed search /Blind search in AI
 
Introduction to NP Completeness
Introduction to NP CompletenessIntroduction to NP Completeness
Introduction to NP Completeness
 
Daa:Dynamic Programing
Daa:Dynamic ProgramingDaa:Dynamic Programing
Daa:Dynamic Programing
 
AI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction ProblemAI 7 | Constraint Satisfaction Problem
AI 7 | Constraint Satisfaction Problem
 
CLOSEST PAIR (Final)
CLOSEST PAIR (Final)CLOSEST PAIR (Final)
CLOSEST PAIR (Final)
 
Dynamic programming - fundamentals review
Dynamic programming - fundamentals reviewDynamic programming - fundamentals review
Dynamic programming - fundamentals review
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
5.1 greedy
5.1 greedy5.1 greedy
5.1 greedy
 
Parsing in Compiler Design
Parsing in Compiler DesignParsing in Compiler Design
Parsing in Compiler Design
 

Viewers also liked

Lecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmLecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmHema Kashyap
 
Lecture 05 problem solving through ai
Lecture 05 problem solving through aiLecture 05 problem solving through ai
Lecture 05 problem solving through aiHema Kashyap
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesHema Kashyap
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)luzenith_g
 
Lecture 11 Informed Search
Lecture 11 Informed SearchLecture 11 Informed Search
Lecture 11 Informed SearchHema Kashyap
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligenceUmesh Meher
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmHema Kashyap
 
16890 unit 2 heuristic search techniques
16890 unit 2 heuristic  search techniques16890 unit 2 heuristic  search techniques
16890 unit 2 heuristic search techniquesJais Balta
 
Lecture 11 informed consent to treatment
Lecture 11 informed consent to treatmentLecture 11 informed consent to treatment
Lecture 11 informed consent to treatmentDr Ghaiath Hussein
 
Amit ppt
Amit pptAmit ppt
Amit pptamitp26
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logicAmey Kerkar
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Yasir Khan
 

Viewers also liked (18)

Lecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmLecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithm
 
Chapter 2 (final)
Chapter 2 (final)Chapter 2 (final)
Chapter 2 (final)
 
Lecture 05 problem solving through ai
Lecture 05 problem solving through aiLecture 05 problem solving through ai
Lecture 05 problem solving through ai
 
Problem space
Problem spaceProblem space
Problem space
 
Lecture 12 Heuristic Searches
Lecture 12 Heuristic SearchesLecture 12 Heuristic Searches
Lecture 12 Heuristic Searches
 
State Space Search(2)
State Space Search(2)State Space Search(2)
State Space Search(2)
 
Lecture 11 Informed Search
Lecture 11 Informed SearchLecture 11 Informed Search
Lecture 11 Informed Search
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Lecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithmLecture 14 Heuristic Search-A star algorithm
Lecture 14 Heuristic Search-A star algorithm
 
16890 unit 2 heuristic search techniques
16890 unit 2 heuristic  search techniques16890 unit 2 heuristic  search techniques
16890 unit 2 heuristic search techniques
 
Breadth first search
Breadth first searchBreadth first search
Breadth first search
 
Lecture 11 informed consent to treatment
Lecture 11 informed consent to treatmentLecture 11 informed consent to treatment
Lecture 11 informed consent to treatment
 
Alpha beta prouning
Alpha beta prouningAlpha beta prouning
Alpha beta prouning
 
AI: AI & Problem Solving
AI: AI & Problem SolvingAI: AI & Problem Solving
AI: AI & Problem Solving
 
Minimax
MinimaxMinimax
Minimax
 
Amit ppt
Amit pptAmit ppt
Amit ppt
 
Knowledge representation and Predicate logic
Knowledge representation and Predicate logicKnowledge representation and Predicate logic
Knowledge representation and Predicate logic
 
Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence Knowledge Representation in Artificial intelligence
Knowledge Representation in Artificial intelligence
 

Similar to Lecture 13 Criptarithmetic problem

Insider mathematical
Insider   mathematicalInsider   mathematical
Insider mathematicalAditi Saxena
 
November 2, 2015
November 2, 2015November 2, 2015
November 2, 2015khyps13
 
Sept. 29, 2014
Sept. 29, 2014Sept. 29, 2014
Sept. 29, 2014khyps13
 
Maths revision year 7 to year 11
Maths revision year 7 to year 11Maths revision year 7 to year 11
Maths revision year 7 to year 11Caitlin Gregory
 
Taller de Geometria
Taller de GeometriaTaller de Geometria
Taller de GeometriaSuly Vitonas
 
September 22, 2014
September 22, 2014September 22, 2014
September 22, 2014khyps13
 
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 mathCareerGOD
 
Word+problems+le1
Word+problems+le1Word+problems+le1
Word+problems+le1Edgar Mata
 
Rational irrational and_real_number_practice
Rational irrational and_real_number_practiceRational irrational and_real_number_practice
Rational irrational and_real_number_practiceeixarc
 
Lecture 06 a linear equations
Lecture 06 a linear equationsLecture 06 a linear equations
Lecture 06 a linear equationsHazel Joy Chong
 
Math journal chapters 1 3
Math journal chapters 1 3Math journal chapters 1 3
Math journal chapters 1 3Ernie777
 
Mathematics high school level quiz - Part I
Mathematics high school level quiz - Part IMathematics high school level quiz - Part I
Mathematics high school level quiz - Part IITfC-Edu-Team
 
Grade mathematics: Quadratic Inequalities
Grade mathematics: Quadratic InequalitiesGrade mathematics: Quadratic Inequalities
Grade mathematics: Quadratic InequalitiesSofia Ty
 

Similar to Lecture 13 Criptarithmetic problem (20)

Insider mathematical
Insider   mathematicalInsider   mathematical
Insider mathematical
 
November 2, 2015
November 2, 2015November 2, 2015
November 2, 2015
 
Sept. 29, 2014
Sept. 29, 2014Sept. 29, 2014
Sept. 29, 2014
 
CSP.pptx
CSP.pptxCSP.pptx
CSP.pptx
 
Vedic maths 2
Vedic maths 2Vedic maths 2
Vedic maths 2
 
Combinatorics.ppt
Combinatorics.pptCombinatorics.ppt
Combinatorics.ppt
 
Maths revision year 7 to year 11
Maths revision year 7 to year 11Maths revision year 7 to year 11
Maths revision year 7 to year 11
 
Taller de Geometria
Taller de GeometriaTaller de Geometria
Taller de Geometria
 
Magical methods
Magical methodsMagical methods
Magical methods
 
M14 T1
M14 T1M14 T1
M14 T1
 
September 22, 2014
September 22, 2014September 22, 2014
September 22, 2014
 
Topic 1.1
Topic 1.1Topic 1.1
Topic 1.1
 
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
 
Word+problems+le1
Word+problems+le1Word+problems+le1
Word+problems+le1
 
Rational irrational and_real_number_practice
Rational irrational and_real_number_practiceRational irrational and_real_number_practice
Rational irrational and_real_number_practice
 
Lecture 06 a linear equations
Lecture 06 a linear equationsLecture 06 a linear equations
Lecture 06 a linear equations
 
Math journal chapters 1 3
Math journal chapters 1 3Math journal chapters 1 3
Math journal chapters 1 3
 
Number system
Number systemNumber system
Number system
 
Mathematics high school level quiz - Part I
Mathematics high school level quiz - Part IMathematics high school level quiz - Part I
Mathematics high school level quiz - Part I
 
Grade mathematics: Quadratic Inequalities
Grade mathematics: Quadratic InequalitiesGrade mathematics: Quadratic Inequalities
Grade mathematics: Quadratic Inequalities
 

More from Hema Kashyap

Lecture 30 introduction to logic
Lecture 30 introduction to logicLecture 30 introduction to logic
Lecture 30 introduction to logicHema Kashyap
 
Lecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-exampleLecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-exampleHema Kashyap
 
Lecture 28 genetic algorithm
Lecture 28 genetic algorithmLecture 28 genetic algorithm
Lecture 28 genetic algorithmHema Kashyap
 
Lecture 27 simulated annealing
Lecture 27 simulated annealingLecture 27 simulated annealing
Lecture 27 simulated annealingHema Kashyap
 
Lecture 26 local beam search
Lecture 26 local beam searchLecture 26 local beam search
Lecture 26 local beam searchHema Kashyap
 
Lecture 25 hill climbing
Lecture 25 hill climbingLecture 25 hill climbing
Lecture 25 hill climbingHema Kashyap
 
Lecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithmLecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithmHema Kashyap
 
Lecture 23 alpha beta pruning
Lecture 23 alpha beta pruningLecture 23 alpha beta pruning
Lecture 23 alpha beta pruningHema Kashyap
 
Lecture 22 adversarial search
Lecture 22 adversarial searchLecture 22 adversarial search
Lecture 22 adversarial searchHema Kashyap
 
Lecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchLecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchHema Kashyap
 
Lecture 20 problem reduction search
Lecture 20 problem reduction searchLecture 20 problem reduction search
Lecture 20 problem reduction searchHema Kashyap
 
Lecture 19 sma star algorithm
Lecture 19 sma star algorithmLecture 19 sma star algorithm
Lecture 19 sma star algorithmHema Kashyap
 
Lecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithmLecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithmHema Kashyap
 
Lecture 16 memory bounded search
Lecture 16 memory bounded searchLecture 16 memory bounded search
Lecture 16 memory bounded searchHema Kashyap
 
Lecture 15 monkey banana problem
Lecture 15 monkey banana problemLecture 15 monkey banana problem
Lecture 15 monkey banana problemHema Kashyap
 
Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Hema Kashyap
 
Lecture 09 uninformed problem solving
Lecture 09 uninformed problem solvingLecture 09 uninformed problem solving
Lecture 09 uninformed problem solvingHema Kashyap
 
Lecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesLecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesHema Kashyap
 
Lecture 07 search techniques
Lecture 07 search techniquesLecture 07 search techniques
Lecture 07 search techniquesHema Kashyap
 
Lecture 06 production system
Lecture 06 production systemLecture 06 production system
Lecture 06 production systemHema Kashyap
 

More from Hema Kashyap (20)

Lecture 30 introduction to logic
Lecture 30 introduction to logicLecture 30 introduction to logic
Lecture 30 introduction to logic
 
Lecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-exampleLecture 29 genetic algorithm-example
Lecture 29 genetic algorithm-example
 
Lecture 28 genetic algorithm
Lecture 28 genetic algorithmLecture 28 genetic algorithm
Lecture 28 genetic algorithm
 
Lecture 27 simulated annealing
Lecture 27 simulated annealingLecture 27 simulated annealing
Lecture 27 simulated annealing
 
Lecture 26 local beam search
Lecture 26 local beam searchLecture 26 local beam search
Lecture 26 local beam search
 
Lecture 25 hill climbing
Lecture 25 hill climbingLecture 25 hill climbing
Lecture 25 hill climbing
 
Lecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithmLecture 24 iterative improvement algorithm
Lecture 24 iterative improvement algorithm
 
Lecture 23 alpha beta pruning
Lecture 23 alpha beta pruningLecture 23 alpha beta pruning
Lecture 23 alpha beta pruning
 
Lecture 22 adversarial search
Lecture 22 adversarial searchLecture 22 adversarial search
Lecture 22 adversarial search
 
Lecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star searchLecture 21 problem reduction search ao star search
Lecture 21 problem reduction search ao star search
 
Lecture 20 problem reduction search
Lecture 20 problem reduction searchLecture 20 problem reduction search
Lecture 20 problem reduction search
 
Lecture 19 sma star algorithm
Lecture 19 sma star algorithmLecture 19 sma star algorithm
Lecture 19 sma star algorithm
 
Lecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithmLecture 18 simplified memory bound a star algorithm
Lecture 18 simplified memory bound a star algorithm
 
Lecture 16 memory bounded search
Lecture 16 memory bounded searchLecture 16 memory bounded search
Lecture 16 memory bounded search
 
Lecture 15 monkey banana problem
Lecture 15 monkey banana problemLecture 15 monkey banana problem
Lecture 15 monkey banana problem
 
Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..Lecture 10 Uninformed Search Techniques conti..
Lecture 10 Uninformed Search Techniques conti..
 
Lecture 09 uninformed problem solving
Lecture 09 uninformed problem solvingLecture 09 uninformed problem solving
Lecture 09 uninformed problem solving
 
Lecture 08 uninformed search techniques
Lecture 08 uninformed search techniquesLecture 08 uninformed search techniques
Lecture 08 uninformed search techniques
 
Lecture 07 search techniques
Lecture 07 search techniquesLecture 07 search techniques
Lecture 07 search techniques
 
Lecture 06 production system
Lecture 06 production systemLecture 06 production system
Lecture 06 production system
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 

Recently uploaded (20)

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 

Lecture 13 Criptarithmetic problem

  • 2. Cryptarithmetic Problem “It is an arithmetic problem which is represented in letters. It involves the decoding of digit represented by a character. It is in the form of some arithmetic equation where digits are distinctly represented by some characters. The problem requires finding of the digit represented by each character. Assign a decimal digit to each of the letters in such a way that the answer to the problem is correct. If the same letter occurs more than once, it must be assigned the same digit each time. No two different letters may be assigned the same digit”. 2
  • 3. Procedure • Cryptarithmatic problem is an interesting constraint satisfaction problem for which different algorithms have been developed. Cryptarithm is a mathematical puzzle in which digits are replaced by letters of the alphabet or other symbols. Cryptarithmatic is the science and art of creating and solving cryptarithms. • The different constraints of defining a cryptarithmatic problem are as follows. 1) Each letter or symbol represented only one and a unique digit throughout the problem. 2) When the digits replace letters or symbols, the resultant arithmetical operation must be correct. • The above two constraints lead to some other restrictions in the problem. 3
  • 4. Example • Consider that, the base of the number is 10. Then there must be at most 10 unique symbols or letters in the problem. Otherwise, it would not possible to assign a unique digit to unique letter or symbol in the problem. To be semantically meaningful, a number must not begin with a 0. So, the letters at the beginning of each number should not correspond to 0. Also one can solve the problem by a simple blind search. But a rule based searching technique can provide the solution in minimum time. 4
  • 5. Step 1 • In the above problem, M must be 1. You can visualize that, this is an addition problem. The sum of two four digit numbers cannot be more than 10,000. Also M cannot be zero according to the rules, since it is the first letter. 5
  • 6. Step 2 • Now in the column s10, s+1 ≥ 10. S must be 8 because there is a 1 carried over from the column EON or 9. O must be 0 (if s=8 and there is a 1 carried or s = 9 and there is no 1 carried) or 1 (if s=9 and there is a 1 carried). But 1 is already taken, so O must be 0. 6
  • 7. Step 3 • There cannot be carry from column EON because any digit +0 < 10, unless there is a carry from the column NRE, and E=9; But this cannot be the case because then N would be 0 and 0 is already taken. So E < 9 and there is no carry from this column. Therefore S=9 because 9+1=10. 7
  • 8. Step 4 • In the column EON, E cannot be equal to N. So there must be carry from the column NRE; E+1=N. We now look at the column NRE, we know that E+1=N. Since we know that carry from this column, N+R=1E (if there is no carry from the column DEY) or N+R+1=1E (if there is a carry from the column DEY). • Let us see both the cases: – No carry: N +R =10 +(N- 1)= N + 9 – R = 9 • But 9 is already taken, so this will not work – Carry: N +R + 1= 9 – R = 9 – 1= 8 This must be solution for R 8
  • 9. Step 5 • Now just think what are the digits we have left? They are 7, 6, 5, 4, 3 and 2. We know there must be a carry from the column DEY. So D+E>10.N = E+1, So E cannot be 7 because then N would be 8 which is already taken. D is almost 7, so E cannot be 2 because then D +E <10 and E cannot be 3 because then D+E=10 and Y=0, but 0 is already taken. Also E cannot be 4 because if D >6,D+E<10 and if D=6 or D=7 then Y=0 or Y=1, which are both taken. So E is 5 or 6. • If E=6, then D=7 and Y=3. So this part will work but look the column N8E. Point that there is a carry from the column D5Y.N+8+1=16(As there is a carry from this column). But then N=7 and 7 is taken by D therefore E=5. 9
  • 10. Step 6 • Now we have gotten this important digit, it gets much simpler from here N+8+1=15, N=6 10
  • 11. Step 7 • The digits left are 7, 4, 3 and 2. We know there is carry from the column D5Y, so the only pair that works is D=7 and Y= 2. Which is final solution of this problem. 11