CS4811: Homework 3 --- Uninformed Search
S E N D M O R E +---------- M O N E YA solution to the puzzle is an assignment of a single digit to each symbol. The assignment should satisfy the arithmetic operation. For instance, a solution to the above problem is
9 5 6 7 1 0 8 5 +---------- 1 0 6 5 2Other puzzle rules are:
(+ (S E N D) (M O R E) (M O N E Y) )You may choose any programming language that runs on the department Unix platforms. If you implement your program on a nondepartmental machine make sure to transport and check it well ahead of the due date. If you plan to use a language other than Lisp/Scheme, C++, or Java check with me first.
Note that if your program generates assignments systematically, the part of the search algorithm that checks for nodes already in CLOSED is not necessary. This makes the CLOSED list unnecessary and saves a *significant* amount of memory. You may choose to use or eliminate the CLOSED list. If you experiment with and without CLOSED, you get 5 extra credits.
Test your program first with simple puzzles like
(+ (A) (B) (C)) (* (A) (B) (C)) (+ (A B) (C D) (E F))and then with
(+ (S E N D) (M O R E) (M O N E Y) )and then with two more examples that you choose.
You may limit the program to two operands and to only addition and multiplication.
enscript -2Gr -pMyProg.ps MyProgThe above command prints MyProg in 2 columns landscape format and leaves the output in MyProg.ps. Please check your output for wrapped lines and format accordingly. See the manual pages for enscript for more options. For your report use a format that can be opened on the department machines: StarOffice, pdf, or postscript.
E A T 8 1 9 P O T A T O 1 6 8 4 8 6 T H A T 9 2 1 9 T O M A T O 8 6 3 4 8 6 +---------- +--------- +------------- +------------- A P P L E 1 0 0 3 8 P U M P K I N 1 0 3 1 9 7 2