Guest User

Untitled

a guest
Apr 16th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.32 KB | None | 0 0
  1. loves(vincent,mia).
  2. loves(marcellus, mia).
  3. loves(pumpkin, honney_bunny).
  4. loves(honney_bunny, pumpkin).
  5.  
  6. % original
  7. jealous(X, Y) :-
  8.     loves(X, Z),
  9.     loves(Y, Z).
  10.  
  11. % 1)
  12. jealous(X, Y) :-
  13.     loves(X, Z),
  14.     loves(Y, Z),
  15.     X \= Y.
  16.  
  17. % 2)
  18. jealous(X, Y) :-
  19.     X \= Y,
  20.     loves(X, Z),
  21.     loves(Y, Z).
Add Comment
Please, Sign In to add comment