cs43 Use resolution to answer the query Fred is a collie col
cs43
Use resolution to answer the query Fred is a collie. collie(fred). Sam is Fred s master master(fred, sam). The day is Saturday. day(saturday). It is cold on Saturday, not (warm(saturday)). Fred is trained. trained(fred). Spaniels are good dogs and so are trained collies. Forall X[spaniel(X) (collie(X) a trained(X)) rightarrow gooddog(X)] If a dog is a good dog and has a master then he will be with his master. Forall (X, Y, Z) [gooddog(X) a master(X, Y) a location(Y, Z) rightarrow location(X, Z)] If it is Saturday and warm, then Sam is at the park. (day(saturday) a warm (Saturday)) rightarrow location(sam, park). If it is Saturday and not warm, then Sam is at the museum. (day(saturday) not (warm(saturday))) rightarrow location(sam, museum).Solution
conclusion: Fred is at the museum.
Fred is a trained collie, so he is a good dog. since he is a good dog, he has to be with his master. His master Sam is at the museum on cold saturdays. so Fred has to be at the museum with his master. thus the conclusion is Fred is at the museum.
