CS4341 Introduction to Artificial Intelligence. A97

Department of Computer Science
Worcester Polytechnic Institute


Homework 1


Puzzle:


(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 correct.

FORTY
+ TEN
+ TEN
-----
SIXTY

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

since:

29786
+ 850
+ 850
-----
31486

is arithmetically correct. Solutions to the puzzle should not repeat digits.

Homework 1

INDIVIDUAL homework due Thursday, Sept. 11, 1997 at 1:30 pm.

Your mission is to:

  1. 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.

  2. You need to hand in the following material by 1:30 p.m. Thursday, Sept. 11, 1997:

About Lisp: