From c60baa7ab393298d6c8258d921e4480b54b1bf95 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 3 Jul 2011 00:55:23 +0200 Subject: [PATCH] exercises of the section 1.6 --- chapter01/exercise-1.6.2.pl | 9 +++++++++ chapter01/exercise-1.6.3.pl | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 chapter01/exercise-1.6.2.pl create mode 100644 chapter01/exercise-1.6.3.pl diff --git a/chapter01/exercise-1.6.2.pl b/chapter01/exercise-1.6.2.pl new file mode 100644 index 0000000..1f1f11a --- /dev/null +++ b/chapter01/exercise-1.6.2.pl @@ -0,0 +1,9 @@ +/* With GEO.PL, which is faster to compute, +'?- located_in(austin, north_america).' or '?- located_in(austin, usa).'? Why? */ + +/* + +'?- located_in(austin, north_america).' needs to solve '?- located_in(austin, usa).', +so it will be slower. + +*/ diff --git a/chapter01/exercise-1.6.3.pl b/chapter01/exercise-1.6.3.pl new file mode 100644 index 0000000..1e4105d --- /dev/null +++ b/chapter01/exercise-1.6.3.pl @@ -0,0 +1,12 @@ +/* Without using the computer, predict the order in which the Prolog system will find +the various solutions to the query '?- located_in(X, usa).' Then use the computer to +verify your prediction. */ + +/* + +X = atlanta ; +X = houston ; +X = austin ; +false. + +*/ \ No newline at end of file