.po 5 .nh .ce TEST II CS524 .nf Instructor Dr P Juell NAME__________________________ 100 points Jan 30, 1990 OPEN BOOK .fi .sp 1. (20) Write a Prolog program to combine alternate items from two lists. e.g. .nf alist([a,b,c,d],[1,2],X). X=[a,1,b,2,c,d] alist([r,s],[a,b,c,d,e,f],X). X=[r,a,s,b,c,d,e,f] .fi 2. (20) The lisp version of the blocks program is 249 lines long while the PROS version is 40 lines long. Since the two programs do approximately the same operations explain why there is such a difference in size between the two. 3. (20) Specify in the blanks the most appropriate letter. Any one letter can only be used once. .nf ____ generate and test ____ knowledge engineering ____ GPS ____ Dendral ____ STRIPS a) rapid prototyping b) reformulates subsolutions c) contains multiple expert systems d) backward chaining e) recursive problem solver .fi 4. (20) Why are rules often used for expert systems instead of procedural code? 5. (20) The following are rules for a program to be written using the PROS production system. Write a program to perform the specified actions. .br STM can contain any number of A or B items. Leave in STM one C for each A more than there are B's or for each B more than there are A's. Do not leave any A's or B's in STM.