Question
Famous alphametic A puzzle in which the digits in a correct mathematical expression, such as a sum, are replaced by letters is called cryptarithm; if,
Famous alphametic A puzzle in which the digits in a correct mathematical expression, such as a sum, are replaced by letters is called cryptarithm; if, in addition, the puzzles words make sense, it is said to be an alphametic. The most well-known alphametic was published by the renowned British puzzlist Henry E. Dudeney (18571930): 122 Brute Force and Exhaustive Search
S E N D + MORE= MONEY
Two conditions are assumed: rst, the correspondence between letters and decimal digits is one-to-one,i.e.,each letter represents one digit only and different letters represent different digits.Second the digit zero does not appear as the left-most digit in any of the numbers. To solve an alphametic means to nd which digit each letter represents. Note that a solutions uniqueness cannot be assumed and has to be veried by the solver.
a. Write a program for solving cryptarithms by exhaustive search. Assume that a given cryptarithm is a sum of two words.
b. Solve Dudeneys puzzle the way it was expected to be solved when it was rst published in 1924.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started