CS4341 Introduction to Artificial Intelligence. A97
Department of Computer Science
Worcester Polytechnic Institute
(Taken from Russell and Norvig, 1995)
This puzzle consists in finding a substitution of the letters
F, O, R, T, Y, E, N, S, I, X
by digits such that when each of these letters is replaced
by the corresponding digit, the following sum is still arithmetically
This puzzle has solutions. One of them is
F = 2, O = 9, R = 7, T = 8, Y = 6, E = 5, N = 0, S = 3, I = 1, X = 4
is arithmetically correct.
Solutions to the puzzle should not repeat digits.
INDIVIDUAL homework due Thursday, Sept. 11, 1997 at 1:30 pm.
Your mission is to:
- Write a computer program (preferably in Lisp, but C or scheme are also
allowed for this assignment) that implements the generate-and-test strategy
to solve this puzzle.
- Your program must satisfy the following conditions:
- It should find at least one solution to the puzzle.
- The generator must be
- complete, and
- You will receive extra credit if:
- your program produces a solution to the puzzle different to the one given above.
(Extra points for each additional correct solution found).
- your generator is informed.
- You need to hand in the following material by 1:30 p.m. Thursday, Sept. 11, 1997:
- A print out of:
- A (mathematically sound) proof that your generator is:
- complete, and
- A precise count of how many different candidate solutions your
generator would produce before exhausting all possibilities.
- For the extra credit you need to include also:
- A mathematically sound proof that your generator is informed.
- You can find Ibuki Common Lisp (ibcl), Kyoto Common Lisp (kcl), or
Scheme (scheme) on the CCC machines.
- Also, you can find the text software in the /cs/cs4341/ directory of
the CCC machines. You are welcome to look at the code contained there
but you cannot use it in your assignments. YOU MUST DEVELOP YOUR OWN
- To run Kyoto Common Lisp in the CCC machines: