.nh .po 5 .ce TEST I CS524 .nf Instructor Dr P Juell NAME__________________________ 100 points, closed book Feb 9, 1994 .fi .sp 1. (20) One computer company has the following rules for computer configurations that they sell. A computer must has a disk drive, a CPU and a monitor. For a disk, you can have floppy drive, or a hard drive or both. The CPU can be a 386 or a 486. The CPU can have an optional floating point processor. .br Draw an AND/OR tree to describe these rules. The leaves or end points of the tree are not to represent two or more items. 2. (20) Write a LISP function, CHANGE, that has three arguments. The first is the source list, the next is the search value and the third the replace value. The value returned is to be the source list with every occurrence of the search value replaced by the replace value. You are not to use the builtin function that does this. .br .nf .ti +5 (CHANGE '((a b)((c b a) a) a) 'a 'z) = ((z b)((c b z) z) z) .fi 3. (20) What is it that makes it possible for the blocks world to handle problems such as the following? If blocks A and B are both on the table, do a .br (put-on 'a 'b) .br followed by a .br (put-on 'b 'a). 4. (10) The following is asserted in PROLOG: .br do_something(X,Y,[X,Y]). .br What answer will be produced for each of the following: do_something(A,B,[r,t]). do_something(yes,no,X). 5. (20) List three major benefits in using FOPC in problem solving. List three major problems in using FOPC in problem solving. 6. (10) List four properties that a search space could have that would helpful to a depth first search.