Work Note 17, DM509, fall 2008
Exercises December 9 (S1) and 10 (S2)
-
Some Prolog repetition problems:
-
Define listlen(L,N) to succeed if L is a list of length N.
-
Define lastone(X,L) to succeed if X is the last element in the list L.
-
Define sublist(L1,L2) to succeed if L1 is a sublist of L2,
i.e., the elements in L1 must also be consecutive in L2.
-
Consider the statement
Some people like other people who do not like anyone.
This can be formalized as
∃X(p(X)∧∃Y(p(Y)∧likes(X,Y)∧∀Z(p(Z)⇒¬likes(Y,Z)))).
Convert this to clausal form.
-
Work sheet.
-
[H07] exercises 6.1, 6.4, 6.5, 6.6, 7.1, 7.2.
Last modified: Thu Dec 4 16:04:59 CET 2008
Kim Skak Larsen
(kslarsen@imada.sdu.dk)