v(1..6).
e(1,2). e(1,3). e(1,4).
e(2,4). e(2,5). e(2,6).
e(3,1). e(3,4). e(3,5).
e(4,1).
e(5,2). e(5,3). e(5,4). e(5,6).
e(6,2). e(6,3). e(6,5).

{ p(X,Y) } :- e(X,Y).

:- {p(X,Y)} 0, v(X).
:- {p(X,Y)} 0, v(Y).
:- 2 {p(X,Y)}, v(X).
:- 2 {p(X,Y)}, v(Y).

%not p(2, 4). not p(1, 2).

#show p/2.

Resource created Monday 14 October 2019, 03:50:29 AM, last modified Monday 14 October 2019, 03:53:29 AM.

file: hamilton-mistake.lp


Back to top

COMP4418 19T3 (Knowledge Representation and Reasoning) is powered by WebCMS3
CRICOS Provider No. 00098G