;;; Solution fsa-3d.lisp ;;; ;;; Modified fsa-3b to accept ;;; ;;; the first two contestants admired the second two contestants ;;; ;;; but reject ;;; ;;; the contestant admired the contestant admired the contestant ;;; ;;; To do this, it was necessary to duplicate the entire NP subnetwork. ;;; Duplicating the information is very inefficient; notice that ;;; changing the machine to also accept "professor" as a head noun ;;; ("the first professor admired the second contestant", etc.) would ;;; require making the same changes each in two different places ;;; (both in the subject and object noun phrase). (setf *fsa* '((Alphabet (the and first second two three contestant contestants)) (States (q0 q1 q2 q3 q4 q5 q0a q1a q2a q3a q4a q5a)) (Initial q0) (Final (q3 q4 q4a)) (Transitions ;; Sub-FSA for the object NP (((q0 the) q1) ((q1 first) q2) ((q1 second) q2) ((q1 two) q3) ((q1 three) q3) ((q1 contestant) q4) ((q1 contestants) q4) ((q2 two) q3) ((q2 three) q3) ((q2 contestant) q4) ((q2 and) q5) ((q3 contestants) q4) ((q5 second) q4) ;; Verb bridging the 2 sub-FSAs for the NPs ((q4 admired q0a) ;; Sub-FSA for the object NP ((q0a the) q1a) ((q1a first) q2a) ((q1a second) q2a) ((q1a two) q3a) ((q1a three) q3a) ((q1a contestant) q4a) ((q1a contestants) q4a) ((q2a two) q3a) ((q2a three) q3a) ((q2a contestant) q4a) ((q2a and) q5a) ((q3a contestants) q4a) ((q5a second) q3a)))))