Re: siblings



Introduce any order of objects (f.e. age of persons) and include condition in your code:

older(tom, merry).
older(merry, john).
older(john, sally).

is_older(X, Y) :- older(X, Y).
is_older(X, Y) :- is_older(X2, Y), older(X2, Y).

......

sibling( X, Y ) :-
parent_child( Z, X ),
parent_child( Z, Y ),
X \= Y,
is_older(X, Y). // <- here,
// this is problem of order of (X, Y) and (Y, X)

Regards,
Tomasz Budzeń


.



Relevant Pages

  • Re: Proper ending for a blood thirsty guntard.
    ... >> John P wrote: ... I'm not ragging on you for your age here, but, you ... "fire for effect?" ... > I have no reason to believe really, ...
    (talk.politics.guns)
  • Re: Changing the Sutton/Dudley pedigree: The mother of John de Sutton the younger
    ... had died and borne the heir that united the Sutton and Stafford ... or that Sir John de Sutton the younger was able to enter ... his inheritance in 1383 about a year before he actually was of age. ... Grazebrook may have provided a clue in this ...
    (soc.genealogy.medieval)
  • Re: Proper ending for a blood thirsty guntard.
    ... > John P wrote: ... I'm not ragging on you for your age here, but, you ... Ever heard the term, "fire for effect?" ... I have no reason to believe really, ...
    (talk.politics.guns)
  • Re: Fraudulent work at home scam
    ... "john B." ... driving around to yard sale after yard sale is ... The point is that ability depends largely on the individual not some ... and runs fast (for his age) too. ...
    (rec.crafts.metalworking)
  • Re: NULLs: theoretical problems?
    ... Suppose we store a person named john whose age is 30. ... Below is how dbd handles it. ... To relate a node, say to a string, use the ...
    (comp.databases.theory)