4.38 Exercise 4.38
There are five solutions to the modified problem:
;;; Amb-Eval input: |
(multiple-dwelling-2) |
|
;;; Starting a new problem |
;;; Amb-Eval value: |
((baker 1) (cooper 2) (fletcher 4) (miller 3) (smith 5)) |
|
;;; Amb-Eval input: |
try-again |
|
;;; Amb-Eval value: |
((baker 1) (cooper 2) (fletcher 4) (miller 5) (smith 3)) |
|
;;; Amb-Eval input: |
try-again |
|
;;; Amb-Eval value: |
((baker 1) (cooper 4) (fletcher 2) (miller 5) (smith 3)) |
|
;;; Amb-Eval input: |
try-again |
|
;;; Amb-Eval value: |
((baker 3) (cooper 2) (fletcher 4) (miller 5) (smith 1)) |
|
;;; Amb-Eval input: |
try-again |
|
;;; Amb-Eval value: |
((baker 3) (cooper 4) (fletcher 2) (miller 5) (smith 1)) |
|
;;; Amb-Eval input: |
try-again |
|
;;; There are no more values of |
(multiple-dwelling-2) |